summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-12-08 21:11:52 +0100
committerThomas Haller <thaller@redhat.com>2015-01-13 11:46:06 +0100
commitf41586f00c0662d593328caa735ed9b26ac71c48 (patch)
treefed2e8b54410e724149363fe436ae6791198f6cc
parentfbd30c7dd2b41fbf3b37b6e408119dab9b98185b (diff)
downloadNetworkManager-f41586f00c0662d593328caa735ed9b26ac71c48.tar.gz
keyfile/trival: move code
-rw-r--r--src/settings/plugins/keyfile/plugin.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/settings/plugins/keyfile/plugin.c b/src/settings/plugins/keyfile/plugin.c
index e79ad551b8..f27aea9db3 100644
--- a/src/settings/plugins/keyfile/plugin.c
+++ b/src/settings/plugins/keyfile/plugin.c
@@ -100,6 +100,23 @@ remove_connection (SCPluginKeyfile *self, NMKeyfileConnection *connection)
g_return_if_fail (removed);
}
+static NMKeyfileConnection *
+find_by_path (SCPluginKeyfile *self, const char *path)
+{
+ SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (self);
+ GHashTableIter iter;
+ NMSettingsConnection *candidate = NULL;
+
+ g_return_val_if_fail (path != NULL, NULL);
+
+ g_hash_table_iter_init (&iter, priv->connections);
+ while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
+ if (g_strcmp0 (path, nm_settings_connection_get_filename (candidate)) == 0)
+ return NM_KEYFILE_CONNECTION (candidate);
+ }
+ return NULL;
+}
+
static void
update_connection (SCPluginKeyfile *self,
NMKeyfileConnection *connection,
@@ -136,23 +153,6 @@ update_connection (SCPluginKeyfile *self,
g_object_unref (tmp);
}
-static NMKeyfileConnection *
-find_by_path (SCPluginKeyfile *self, const char *path)
-{
- SCPluginKeyfilePrivate *priv = SC_PLUGIN_KEYFILE_GET_PRIVATE (self);
- GHashTableIter iter;
- NMSettingsConnection *candidate = NULL;
-
- g_return_val_if_fail (path != NULL, NULL);
-
- g_hash_table_iter_init (&iter, priv->connections);
- while (g_hash_table_iter_next (&iter, NULL, (gpointer) &candidate)) {
- if (g_strcmp0 (path, nm_settings_connection_get_filename (candidate)) == 0)
- return NM_KEYFILE_CONNECTION (candidate);
- }
- return NULL;
-}
-
static void
new_connection (SCPluginKeyfile *self,
const char *name,