mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 07:48:10 +02:00
core: use NM_PLATFORM_GET instead of nm_platform_get() in function calls
Replacement was done with command: spatch --sp-file nm_platform_get.cocci --in-place --smpl-spacing --dir src where nm_platform_get.cocci contains: @@ identifier func; expression list args; @@ - func (nm_platform_get()) + func (NM_PLATFORM_GET) @@ identifier func; expression list args; @@ - func (nm_platform_get(), args) + func (NM_PLATFORM_GET, args)
This commit is contained in:
parent
ea1eb94d9b
commit
24d8604637
5 changed files with 10 additions and 10 deletions
|
|
@ -267,7 +267,7 @@ pppoe_vcc_config (NMDeviceAdsl *self)
|
|||
return FALSE;
|
||||
|
||||
/* Watch for the 'nas' interface going away */
|
||||
g_signal_connect (nm_platform_get (), NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
||||
g_signal_connect (NM_PLATFORM_GET, NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
||||
G_CALLBACK (link_changed_cb),
|
||||
self);
|
||||
|
||||
|
|
@ -508,7 +508,7 @@ adsl_cleanup (NMDeviceAdsl *self)
|
|||
nm_exported_object_clear_and_unexport (&priv->ppp_manager);
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (nm_platform_get (), G_CALLBACK (link_changed_cb), self);
|
||||
g_signal_handlers_disconnect_by_func (NM_PLATFORM_GET, G_CALLBACK (link_changed_cb), self);
|
||||
|
||||
if (priv->brfd >= 0) {
|
||||
close (priv->brfd);
|
||||
|
|
|
|||
|
|
@ -1389,7 +1389,7 @@ nm_default_route_manager_init (NMDefaultRouteManager *self)
|
|||
priv->entries_ip4 = g_ptr_array_new_full (0, (GDestroyNotify) _entry_free);
|
||||
priv->entries_ip6 = g_ptr_array_new_full (0, (GDestroyNotify) _entry_free);
|
||||
|
||||
priv->platform = g_object_ref (nm_platform_get ());
|
||||
priv->platform = g_object_ref (NM_PLATFORM_GET);
|
||||
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, G_CALLBACK (_platform_changed_cb), self);
|
||||
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, G_CALLBACK (_platform_changed_cb), self);
|
||||
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, G_CALLBACK (_platform_changed_cb), self);
|
||||
|
|
|
|||
|
|
@ -4330,7 +4330,7 @@ nm_manager_start (NMManager *self, GError **error)
|
|||
if (!nm_settings_start (priv->settings, error))
|
||||
return FALSE;
|
||||
|
||||
g_signal_connect (nm_platform_get (),
|
||||
g_signal_connect (NM_PLATFORM_GET,
|
||||
NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
||||
G_CALLBACK (platform_link_cb),
|
||||
self);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ add_signal_full (const char *name, NMPlatformSignalChangeType change_type, GCall
|
|||
data->name = name;
|
||||
data->change_type = change_type;
|
||||
data->received_count = 0;
|
||||
data->handler_id = g_signal_connect (nm_platform_get (), name, callback, data);
|
||||
data->handler_id = g_signal_connect (NM_PLATFORM_GET, name, callback, data);
|
||||
data->ifindex = ifindex;
|
||||
data->ifname = ifname;
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ _free_signal (const char *file, int line, const char *func, SignalData *data)
|
|||
if (data->received_count != 0)
|
||||
g_error ("NMPlatformSignalAssert: %s:%d, %s(): failure to free non-accepted signal: "SIGNAL_DATA_FMT, file, line, func, SIGNAL_DATA_ARG (data));
|
||||
|
||||
g_signal_handler_disconnect (nm_platform_get (), data->handler_id);
|
||||
g_signal_handler_disconnect (NM_PLATFORM_GET, data->handler_id);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
|
|
@ -1549,6 +1549,6 @@ main (int argc, char **argv)
|
|||
|
||||
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
|
||||
|
||||
g_object_unref (nm_platform_get ());
|
||||
g_object_unref (NM_PLATFORM_GET);
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ devtimeout_expired (gpointer user_data)
|
|||
nm_log_info (LOGD_SETTINGS, "Device for connection '%s' did not appear before timeout",
|
||||
nm_connection_get_id (NM_CONNECTION (self)));
|
||||
|
||||
g_signal_handler_disconnect (nm_platform_get (), priv->devtimeout_link_changed_handler);
|
||||
g_signal_handler_disconnect (NM_PLATFORM_GET, priv->devtimeout_link_changed_handler);
|
||||
priv->devtimeout_link_changed_handler = 0;
|
||||
priv->devtimeout_timeout_id = 0;
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self)
|
|||
devtimeout, ifname, nm_connection_get_id (NM_CONNECTION (self)));
|
||||
|
||||
priv->devtimeout_link_changed_handler =
|
||||
g_signal_connect (nm_platform_get (), NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
||||
g_signal_connect (NM_PLATFORM_GET, NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
||||
G_CALLBACK (link_changed), self);
|
||||
priv->devtimeout_timeout_id = g_timeout_add_seconds (devtimeout, devtimeout_expired, self);
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ dispose (GObject *object)
|
|||
|
||||
path_watch_stop (NM_IFCFG_CONNECTION (object));
|
||||
|
||||
nm_clear_g_signal_handler (nm_platform_get(), &priv->devtimeout_link_changed_handler);
|
||||
nm_clear_g_signal_handler (NM_PLATFORM_GET, &priv->devtimeout_link_changed_handler);
|
||||
nm_clear_g_source (&priv->devtimeout_timeout_id);
|
||||
|
||||
g_clear_object (&priv->inotify_helper);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue