trivial: remove unused 'existing' parameter from get_connections()

This commit is contained in:
Pavel Šimerda 2013-08-31 00:04:58 +02:00
parent f4118492b6
commit c5c8fbea12

View file

@ -2012,29 +2012,27 @@ local_slist_free (void *loc)
* get_connection: * get_connection:
* @manager: #NMManager instance * @manager: #NMManager instance
* @device: #NMDevice instance * @device: #NMDevice instance
* @existing: is set to %TRUE when an existing connection was returned
* *
* Returns one of the following: * Returns one of the following:
* *
* 1) An existing connection to be assumed. * 1) An existing #NMSettingsConnection to be assumed.
* *
* 2) A generated connection to be assumed. * 2) A generated #NMConnection to be assumed. You can distinguish this
* case using NM_IS_SETTINGS_CONNECTION().
* *
* 3) %NULL when none of the above is available. * 3) %NULL when no connection was detected or the @device doesn't support
* generating connections.
* *
* Supports both nm-device's match_l2_config() and update_connection(). * Supports both nm-device's match_l2_config() and update_connection().
*/ */
static NMConnection * static NMConnection *
get_connection (NMManager *manager, NMDevice *device, gboolean *existing) get_connection (NMManager *manager, NMDevice *device)
{ {
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager); NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (manager);
free_slist GSList *connections = nm_settings_get_connections (priv->settings); free_slist GSList *connections = nm_settings_get_connections (priv->settings);
NMConnection *connection = NULL; NMConnection *connection = NULL;
GSList *iter; GSList *iter;
if (existing)
*existing = FALSE;
/* We still support the older API to match a NMDevice object to an /* We still support the older API to match a NMDevice object to an
* existing connection using nm_device_find_assumable_connection(). * existing connection using nm_device_find_assumable_connection().
* *
@ -2050,8 +2048,6 @@ get_connection (NMManager *manager, NMDevice *device, gboolean *existing)
nm_log_info (LOGD_DEVICE, "(%s): Found matching connection '%s' (legacy API)", nm_log_info (LOGD_DEVICE, "(%s): Found matching connection '%s' (legacy API)",
nm_device_get_iface (device), nm_device_get_iface (device),
nm_connection_get_id (candidate)); nm_connection_get_id (candidate));
if (existing)
*existing = TRUE;
return candidate; return candidate;
} }
} }
@ -2086,8 +2082,6 @@ get_connection (NMManager *manager, NMDevice *device, gboolean *existing)
nm_device_get_iface (device), nm_device_get_iface (device),
nm_connection_get_id (candidate)); nm_connection_get_id (candidate));
g_object_unref (connection); g_object_unref (connection);
if (existing)
*existing = TRUE;
return candidate; return candidate;
} }
} }
@ -2192,7 +2186,7 @@ add_device (NMManager *self, NMDevice *device)
nm_log_info (LOGD_CORE, "(%s): exported as %s", iface, path); nm_log_info (LOGD_CORE, "(%s): exported as %s", iface, path);
g_free (path); g_free (path);
connection = get_connection (self, device, NULL); connection = get_connection (self, device);
/* Start the device if it's supposed to be managed */ /* Start the device if it's supposed to be managed */
unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings); unmanaged_specs = nm_settings_get_unmanaged_specs (priv->settings);