From 2f94dba7385fd0e0ef19a06eb4a2fcf6c43d7946 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 14 Feb 2022 19:23:28 +0100 Subject: New upstream version 1.35.91 --- src/libnm-client-impl/libnm.ver | 5 + src/libnm-client-impl/nm-access-point.c | 26 +- src/libnm-client-impl/nm-active-connection.c | 14 +- src/libnm-client-impl/nm-checkpoint.c | 4 +- src/libnm-client-impl/nm-client.c | 854 +++++++++++---------- src/libnm-client-impl/nm-dbus-helpers.c | 10 +- src/libnm-client-impl/nm-device-6lowpan.c | 2 +- src/libnm-client-impl/nm-device-adsl.c | 2 +- src/libnm-client-impl/nm-device-bond.c | 2 +- src/libnm-client-impl/nm-device-bridge.c | 2 +- src/libnm-client-impl/nm-device-bt.c | 10 +- src/libnm-client-impl/nm-device-ethernet.c | 12 +- src/libnm-client-impl/nm-device-generic.c | 2 +- src/libnm-client-impl/nm-device-infiniband.c | 4 +- src/libnm-client-impl/nm-device-ip-tunnel.c | 10 +- src/libnm-client-impl/nm-device-macsec.c | 4 +- src/libnm-client-impl/nm-device-macvlan.c | 6 +- src/libnm-client-impl/nm-device-modem.c | 24 +- src/libnm-client-impl/nm-device-olpc-mesh.c | 2 +- src/libnm-client-impl/nm-device-ovs-bridge.c | 2 +- src/libnm-client-impl/nm-device-ovs-port.c | 2 +- src/libnm-client-impl/nm-device-team.c | 2 +- src/libnm-client-impl/nm-device-tun.c | 6 +- src/libnm-client-impl/nm-device-veth.c | 2 +- src/libnm-client-impl/nm-device-vlan.c | 8 +- src/libnm-client-impl/nm-device-vrf.c | 2 +- src/libnm-client-impl/nm-device-vxlan.c | 6 +- src/libnm-client-impl/nm-device-wifi-p2p.c | 18 +- src/libnm-client-impl/nm-device-wifi.c | 34 +- src/libnm-client-impl/nm-device.c | 164 ++-- src/libnm-client-impl/nm-dhcp-config.c | 12 +- src/libnm-client-impl/nm-dns-manager.c | 8 +- src/libnm-client-impl/nm-dns-manager.h | 2 +- src/libnm-client-impl/nm-ip-config.c | 52 +- src/libnm-client-impl/nm-libnm-utils.c | 22 +- src/libnm-client-impl/nm-libnm-utils.h | 142 ++-- src/libnm-client-impl/nm-object.c | 16 +- src/libnm-client-impl/nm-property-infos-dbus.xml | 180 ++--- .../nm-property-infos-ifcfg-rh.xml | 392 ++-------- .../nm-property-infos-keyfile.xml | 181 ++--- src/libnm-client-impl/nm-property-infos-nmcli.xml | 438 ++++++----- src/libnm-client-impl/nm-remote-connection.c | 64 +- src/libnm-client-impl/nm-secret-agent-old.c | 238 +++--- src/libnm-client-impl/nm-settings-docs-gir.xml | 1 + src/libnm-client-impl/nm-vpn-connection.c | 6 +- src/libnm-client-impl/nm-vpn-plugin-old.c | 90 +-- src/libnm-client-impl/nm-vpn-service-plugin.c | 112 +-- src/libnm-client-impl/nm-wifi-p2p-peer.c | 20 +- src/libnm-client-impl/tests/test-libnm.c | 28 +- src/libnm-client-impl/tests/test-nm-client.c | 255 +++--- .../tests/test-remote-settings-client.c | 44 +- src/libnm-client-impl/tests/test-secret-agent.c | 128 +-- 52 files changed, 1677 insertions(+), 1995 deletions(-) (limited to 'src/libnm-client-impl') diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver index ce07a876..bb691ac2 100644 --- a/src/libnm-client-impl/libnm.ver +++ b/src/libnm-client-impl/libnm.ver @@ -1816,3 +1816,8 @@ global: nm_setting_connection_get_dns_over_tls; nm_setting_connection_dns_over_tls_get_type; } libnm_1_32_4; + +libnm_1_36_0 { +global: + nm_setting_ovs_dpdk_get_n_rxq; +} libnm_1_34_0; \ No newline at end of file diff --git a/src/libnm-client-impl/nm-access-point.c b/src/libnm-client-impl/nm-access-point.c index 3d12aa45..94b38f03 100644 --- a/src/libnm-client-impl/nm-access-point.c +++ b/src/libnm-client-impl/nm-access-point.c @@ -36,7 +36,7 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMAccessPoint, typedef struct { GBytes *ssid; - char * bssid; + char *bssid; guint32 flags; guint32 wpa_flags; guint32 rsn_flags; @@ -251,16 +251,16 @@ NM_BACKPORT_SYMBOL(libnm_1_0_6, int, nm_access_point_get_last_seen, (NMAccessPoi gboolean nm_access_point_connection_valid(NMAccessPoint *ap, NMConnection *connection) { - NMSettingConnection * s_con; - NMSettingWireless * s_wifi; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; - const char * ctype, *ap_bssid; - GBytes * setting_ssid; - GBytes * ap_ssid; - const char * setting_bssid; - const char * setting_mode; + const char *ctype, *ap_bssid; + GBytes *setting_ssid; + GBytes *ap_ssid; + const char *setting_bssid; + const char *setting_mode; NM80211Mode ap_mode; - const char * setting_band; + const char *setting_band; guint32 ap_freq, setting_chan, ap_chan; g_return_val_if_fail(NM_IS_ACCESS_POINT(ap), FALSE); @@ -395,13 +395,13 @@ nm_access_point_filter_connections(NMAccessPoint *ap, const GPtrArray *connectio /*****************************************************************************/ static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_hw_address(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_hw_address(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMAccessPoint * self = NM_ACCESS_POINT(dbobj->nmobj); + NMAccessPoint *self = NM_ACCESS_POINT(dbobj->nmobj); NMAccessPointPrivate *priv = NM_ACCESS_POINT_GET_PRIVATE(self); g_free(priv->bssid); diff --git a/src/libnm-client-impl/nm-active-connection.c b/src/libnm-client-impl/nm-active-connection.c index aa96219c..52e82b9f 100644 --- a/src/libnm-client-impl/nm-active-connection.c +++ b/src/libnm-client-impl/nm-active-connection.c @@ -62,10 +62,10 @@ enum { typedef struct _NMActiveConnectionPrivate { NMLDBusPropertyO property_o[_PROPERTY_O_IDX_NUM]; NMLDBusPropertyAO devices; - NMRefString * specific_object_path; - char * id; - char * uuid; - char * type; + NMRefString *specific_object_path; + char *id; + char *uuid; + char *type; guint32 state; guint32 state_flags; @@ -397,7 +397,7 @@ static void _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify_event) { gs_unref_object NMActiveConnection *self = notify_event->user_data; - NMActiveConnectionPrivate * priv = NM_ACTIVE_CONNECTION_GET_PRIVATE(self); + NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE(self); /* we expose here the value cache in @priv. In practice, this is the same * value as we received from the signal. In the unexpected case where they @@ -408,7 +408,7 @@ _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify void _nm_active_connection_state_changed_commit(NMActiveConnection *self, guint32 state, guint32 reason) { - NMClient * client; + NMClient *client; NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE(self); client = _nm_object_get_client(self); @@ -605,7 +605,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_connection_active = NML_DBUS_META static void nm_active_connection_class_init(NMActiveConnectionClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(NMActiveConnectionPrivate)); diff --git a/src/libnm-client-impl/nm-checkpoint.c b/src/libnm-client-impl/nm-checkpoint.c index c1f6b092..424d8e50 100644 --- a/src/libnm-client-impl/nm-checkpoint.c +++ b/src/libnm-client-impl/nm-checkpoint.c @@ -105,7 +105,7 @@ nm_checkpoint_init(NMCheckpoint *checkpoint) static void get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NMCheckpoint * checkpoint = NM_CHECKPOINT(object); + NMCheckpoint *checkpoint = NM_CHECKPOINT(object); NMCheckpointPrivate *priv = NM_CHECKPOINT_GET_PRIVATE(checkpoint); switch (prop_id) { @@ -145,7 +145,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_checkpoint = NML_DBUS_META_IFACE_ static void nm_checkpoint_class_init(NMCheckpointClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-client.c b/src/libnm-client-impl/nm-client.c index 0f9d8fe1..2cf12db5 100644 --- a/src/libnm-client-impl/nm-client.c +++ b/src/libnm-client-impl/nm-client.c @@ -71,7 +71,7 @@ _context_busy_watcher_attach_integration_source_cb(gpointer data, GObject *where void nm_context_busy_watcher_integrate_source(GMainContext *outer_context, GMainContext *inner_context, - GObject * context_busy_watcher) + GObject *context_busy_watcher) { GSource *source; @@ -141,7 +141,7 @@ typedef struct { CList iface_lst; union { const NMLDBusMetaIface *meta; - NMRefString * name; + NMRefString *name; } dbus_iface; CList changed_prop_lst_head; @@ -249,16 +249,16 @@ enum { }; typedef struct { - struct udev * udev; - GMainContext * main_context; - GMainContext * dbus_context; - GObject * context_busy_watcher; + struct udev *udev; + GMainContext *main_context; + GMainContext *dbus_context; + GObject *context_busy_watcher; GDBusConnection *dbus_connection; - NMLInitData * init_data; - GHashTable * dbus_objects; + NMLInitData *init_data; + GHashTable *dbus_objects; CList obj_changed_lst_head; - GCancellable * name_owner_get_cancellable; - GCancellable * get_managed_objects_cancellable; + GCancellable *name_owner_get_cancellable; + GCancellable *get_managed_objects_cancellable; CList queue_notify_lst_head; CList notify_event_lst_head; @@ -274,7 +274,7 @@ typedef struct { gsize log_call_counter; - guint8 * permissions; + guint8 *permissions; GCancellable *permissions_cancellable; char *name_owner; @@ -300,9 +300,9 @@ typedef struct { struct { NMLDBusPropertyO property_o[_PROPERTY_O_IDX_NM_NUM]; NMLDBusPropertyAO property_ao[_PROPERTY_AO_IDX_NM_NUM]; - char * connectivity_check_uri; - char * version; - guint32 * capabilities_arr; + char *connectivity_check_uri; + char *version; + guint32 *capabilities_arr; gsize capabilities_len; guint32 connectivity; guint32 state; @@ -319,14 +319,14 @@ typedef struct { struct { NMLDBusPropertyAO connections; - char * hostname; + char *hostname; bool can_modify; } settings; struct { GPtrArray *configuration; - char * mode; - char * rc_manager; + char *mode; + char *rc_manager; } dns_manager; } NMClientPrivate; @@ -363,11 +363,11 @@ G_DEFINE_TYPE_WITH_CODE(NMClient, static void _init_start_check_complete(NMClient *self); static void name_owner_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data); static void name_owner_get_call(NMClient *self); @@ -484,8 +484,8 @@ _nm_client_new_error_nm_not_cached(void) static void _nm_client_dbus_call_simple_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - GAsyncReadyCallback callback; - gpointer callback_user_data; + GAsyncReadyCallback callback; + gpointer callback_user_data; gs_unref_object GObject *context_busy_watcher = NULL; gpointer obfuscated_self_ptr; gpointer log_call_counter_ptr; @@ -506,21 +506,21 @@ _nm_client_dbus_call_simple_cb(GObject *source, GAsyncResult *result, gpointer u } void -_nm_client_dbus_call_simple(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_nm_client_dbus_call_simple(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, GAsyncReadyCallback callback, gpointer user_data) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; - gs_free char * log_str = NULL; + gs_free char *log_str = NULL; gsize log_call_counter; nm_assert(priv->name_owner); @@ -565,22 +565,22 @@ _nm_client_dbus_call_simple(NMClient * self, } void -_nm_client_dbus_call(NMClient * self, +_nm_client_dbus_call(NMClient *self, gpointer source_obj, gpointer source_tag, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback user_callback, gpointer user_callback_data, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, GAsyncReadyCallback internal_callback) { - NMClientPrivate *priv; + NMClientPrivate *priv; gs_unref_object GTask *task = NULL; nm_assert(!source_obj || G_IS_OBJECT(source_obj)); @@ -622,19 +622,19 @@ _nm_client_dbus_call(NMClient * self, } GVariant * -_nm_client_dbus_call_sync(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_nm_client_dbus_call_sync(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, gboolean strip_dbus_error, - GError ** error) + GError **error) { - NMClientPrivate *priv; + NMClientPrivate *priv; gs_unref_variant GVariant *ret = NULL; nm_assert(!cancellable || G_IS_CANCELLABLE(cancellable)); @@ -679,16 +679,16 @@ _nm_client_dbus_call_sync(NMClient * self, } gboolean -_nm_client_dbus_call_sync_void(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_nm_client_dbus_call_sync_void(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusCallFlags flags, int timeout_msec, gboolean strip_dbus_error, - GError ** error) + GError **error) { gs_unref_variant GVariant *ret = NULL; @@ -707,15 +707,15 @@ _nm_client_dbus_call_sync_void(NMClient * self, } void -_nm_client_set_property_sync_legacy(NMClient * self, +_nm_client_set_property_sync_legacy(NMClient *self, const char *object_path, const char *interface_name, const char *property_name, const char *format_string, ...) { - NMClientPrivate *priv; - GVariant * val; + NMClientPrivate *priv; + GVariant *val; gs_unref_variant GVariant *ret = NULL; va_list ap; @@ -816,12 +816,12 @@ _nm_client_queue_notify_object(NMClient *self, gpointer nmobj, const GParamSpec /*****************************************************************************/ gpointer -_nm_client_notify_event_queue(NMClient * self, +_nm_client_notify_event_queue(NMClient *self, int priority, NMClientNotifyEventCb callback, gsize event_size) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); NMClientNotifyEvent *notify_event; nm_assert(callback); @@ -836,7 +836,7 @@ _nm_client_notify_event_queue(NMClient * self, } NMClientNotifyEventWithPtr * -_nm_client_notify_event_queue_with_ptr(NMClient * self, +_nm_client_notify_event_queue_with_ptr(NMClient *self, int priority, NMClientNotifyEventWithPtrCb callback, gpointer user_data) @@ -855,8 +855,8 @@ _nm_client_notify_event_queue_with_ptr(NMClient * self, typedef struct { NMClientNotifyEvent parent; - GObject * source; - NMObject * obj; + GObject *source; + NMObject *obj; guint signal_id; } NMClientNotifyEventObjAddedRemove; @@ -882,7 +882,7 @@ _nm_client_notify_event_queue_emit_obj_signal_cb(NMClient *self, gpointer notify void _nm_client_notify_event_queue_emit_obj_signal(NMClient *self, - GObject * source, + GObject *source, NMObject *nmobj, gboolean is_added /* or else removed */, int prio_offset, @@ -924,7 +924,7 @@ _nm_client_notify_event_cmp(const CList *a, const CList *b, const void *user_dat static void _nm_client_notify_event_emit_parts(NMClient *self, int max_priority /* included! */) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); NMClientNotifyEvent *notify_event; while (TRUE) { @@ -947,7 +947,7 @@ static void _nm_client_notify_event_emit(NMClient *self) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - NMObjectBase * base; + NMObjectBase *base; _nm_client_notify_event_emit_parts(self, NM_CLIENT_NOTIFY_EVENT_PRIO_GPROP); @@ -1137,12 +1137,12 @@ nml_dbus_object_unref(NMLDBusObject *dbobj) static NMLDBusObjIfaceData * nml_dbus_object_iface_data_get(NMLDBusObject *dbobj, - const char * dbus_iface_name, + const char *dbus_iface_name, gboolean allow_create) { const NMLDBusMetaIface *meta_iface; - NMLDBusObjIfaceData * db_iface_data; - NMLDBusObjPropData * db_prop_data; + NMLDBusObjIfaceData *db_iface_data; + NMLDBusObjPropData *db_prop_data; guint count = 0; guint i; @@ -1245,8 +1245,8 @@ nml_dbus_obj_iface_data_destroy(NMLDBusObjIfaceData *db_iface_data) } gpointer -nml_dbus_object_get_property_location(NMLDBusObject * dbobj, - const NMLDBusMetaIface * meta_iface, +nml_dbus_object_get_property_location(NMLDBusObject *dbobj, + const NMLDBusMetaIface *meta_iface, const NMLDBusMetaProperty *meta_property) { char *target_c; @@ -1327,14 +1327,16 @@ nml_dbus_object_set_obj_state(NMLDBusObject *dbobj, NMLDBusObjState obj_state, N /*****************************************************************************/ static void -nml_dbus_object_obj_changed_link(NMClient * self, - NMLDBusObject * dbobj, +nml_dbus_object_obj_changed_link(NMClient *self, + NMLDBusObject *dbobj, NMLDBusObjChangedType changed_type) { nm_assert(NM_IS_CLIENT(self)); nm_assert(NML_IS_DBUS_OBJECT(dbobj)); nm_assert(changed_type != NML_DBUS_OBJ_CHANGED_TYPE_NONE); + /* Links @dbobj in the "obj_changed_lst", with the new "changed_type". */ + if (!NM_FLAGS_ALL((NMLDBusObjChangedType) dbobj->obj_changed_type, changed_type)) NML_NMCLIENT_LOG_T(self, "[%s]: changed-type 0x%02x linked", @@ -1365,13 +1367,19 @@ nml_dbus_object_obj_changed_link(NMClient * self, } static NMLDBusObjChangedType -nml_dbus_object_obj_changed_consume(NMClient * self, - NMLDBusObject * dbobj, +nml_dbus_object_obj_changed_consume(NMClient *self, + NMLDBusObject *dbobj, NMLDBusObjChangedType changed_type) { - NMClientPrivate * priv; + NMClientPrivate *priv; NMLDBusObjChangedType changed_type_res; + /* We have @dbobj which has some "obj_changed_type" set (consequently, + * it's linked in the "obj_changed_lst"). Here we consume the @changed_type, + * meaning, to clear those flags from "obj_change_type" (and return + * the flags that were cleared/present or NONE, if the current object + * doesn't have these changed-types. */ + nm_assert(NM_IS_CLIENT(self)); nm_assert(NML_IS_DBUS_OBJECT(dbobj)); nm_assert(changed_type != NML_DBUS_OBJ_CHANGED_TYPE_NONE); @@ -1383,6 +1391,8 @@ nml_dbus_object_obj_changed_consume(NMClient * self, dbobj->obj_changed_type &= ~changed_type; if (dbobj->obj_changed_type == NML_DBUS_OBJ_CHANGED_TYPE_NONE) { + /* No other "obj_change_type" left. Unlink the object from the + * "changed_type_list". */ c_list_unlink(&dbobj->obj_changed_lst); nm_assert(changed_type_res != NML_DBUS_OBJ_CHANGED_TYPE_NONE); NML_NMCLIENT_LOG_T(self, @@ -1394,6 +1404,9 @@ nml_dbus_object_obj_changed_consume(NMClient * self, priv = NM_CLIENT_GET_PRIVATE(self); + /* Actually, at this point, @dbobj is not linked in priv->obj_changed_lst_head, + * instead, it's linked on a temporary list. As we still have changes left after + * consuming "changed_type", we move it to priv->obj_changed_lst_head. */ nm_assert(!c_list_contains(&priv->obj_changed_lst_head, &dbobj->obj_changed_lst)); nm_c_list_move_tail(&priv->obj_changed_lst_head, &dbobj->obj_changed_lst); NML_NMCLIENT_LOG_T(self, @@ -1408,7 +1421,7 @@ static gboolean nml_dbus_object_obj_changed_any_linked(NMClient *self, NMLDBusObjChangedType changed_type) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; nm_assert(changed_type != NML_DBUS_OBJ_CHANGED_TYPE_NONE); @@ -1491,8 +1504,8 @@ static NMLDBusObject * _dbobjs_dbobj_create(NMClient *self, NMRefString *dbus_path_take) { nm_auto_ref_string NMRefString *dbus_path = g_steal_pointer(&dbus_path_take); - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); - NMLDBusObject * dbobj; + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); + NMLDBusObject *dbobj; nm_assert(!_dbobjs_dbobj_get_r(self, dbus_path)); @@ -1506,7 +1519,7 @@ static NMLDBusObject * _dbobjs_dbobj_get_or_create(NMClient *self, NMRefString *dbus_path_take) { nm_auto_ref_string NMRefString *dbus_path = g_steal_pointer(&dbus_path_take); - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; dbobj = _dbobjs_dbobj_get_r(self, dbus_path); if (dbobj) @@ -1550,8 +1563,8 @@ _dbobjs_get_nmobj_unpack_visible(NMClient *self, const char *dbus_path, GType gt /*****************************************************************************/ static gpointer -_dbobjs_obj_watcher_register_o(NMClient * self, - NMLDBusObject * dbobj, +_dbobjs_obj_watcher_register_o(NMClient *self, + NMLDBusObject *dbobj, NMLDBusObjWatchNotifyFcn notify_fcn, gsize struct_size) { @@ -1576,13 +1589,13 @@ _dbobjs_obj_watcher_register_o(NMClient * self, } static gpointer -_dbobjs_obj_watcher_register_r(NMClient * self, - NMRefString * dbus_path_take, +_dbobjs_obj_watcher_register_r(NMClient *self, + NMRefString *dbus_path_take, NMLDBusObjWatchNotifyFcn notify_fcn, gsize struct_size) { nm_auto_ref_string NMRefString *dbus_path = g_steal_pointer(&dbus_path_take); - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; nm_assert(NM_IS_CLIENT(self)); nm_assert(notify_fcn); @@ -1597,7 +1610,7 @@ static void _dbobjs_obj_watcher_unregister(NMClient *self, gpointer obj_watcher_base) { NMLDBusObjWatcher *obj_watcher = obj_watcher_base; - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; nm_assert(NM_IS_CLIENT(self)); nm_assert(obj_watcher); @@ -1654,7 +1667,7 @@ static void nml_dbus_property_o_notify_changed(NMLDBusPropertyO *pr_o, NMClient *self) { const NMLDBusPropertVTableO *vtable; - GObject * nmobj = NULL; + GObject *nmobj = NULL; gboolean is_ready = TRUE; gboolean changed_ready; GType gtype; @@ -1759,7 +1772,7 @@ nml_dbus_property_o_notify_changed_many(NMLDBusPropertyO *ptr, guint len, NMClie static void nml_dbus_property_o_notify_watch_cb(NMClient *self, gpointer obj_watcher) { - PropertyOData * pr_o_data = obj_watcher; + PropertyOData *pr_o_data = obj_watcher; NMLDBusPropertyO *pr_o = pr_o_data->pr_o; nm_assert(pr_o->obj_watcher == obj_watcher); @@ -1771,12 +1784,12 @@ nml_dbus_property_o_notify_watch_cb(NMClient *self, gpointer obj_watcher) } static NMLDBusNotifyUpdatePropFlags -nml_dbus_property_o_notify(NMClient * self, - NMLDBusPropertyO * pr_o, - NMLDBusObject * dbobj, +nml_dbus_property_o_notify(NMClient *self, + NMLDBusPropertyO *pr_o, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { const char *dbus_path = NULL; gboolean changed = FALSE; @@ -1837,6 +1850,7 @@ nml_dbus_property_o_clear(NMLDBusPropertyO *pr_o, NMClient *self) pr_o->meta_iface = NULL; pr_o->dbus_property_idx = 0; pr_o->is_ready = FALSE; + pr_o->nmobj = NULL; } void @@ -1850,9 +1864,9 @@ nml_dbus_property_o_clear_many(NMLDBusPropertyO *pr_o, guint len, NMClient *self typedef struct _NMLDBusPropertyAOData { NMLDBusObjWatcher obj_watcher; - NMLDBusPropertyAO * parent; + NMLDBusPropertyAO *parent; CList data_lst; - GObject * nmobj; + GObject *nmobj; struct _NMLDBusPropertyAOData *changed_next; bool is_ready : 1; bool is_notified : 1; @@ -1894,10 +1908,10 @@ _ASSERT_pr_ao(NMLDBusPropertyAO *pr_ao) static gboolean nml_dbus_property_ao_notify_changed_ao(PropertyAOData *pr_ao_data, - NMClient * self, + NMClient *self, gboolean is_added /* or else removed */) { - NMLDBusPropertyAO * pr_ao; + NMLDBusPropertyAO *pr_ao; const NMLDBusPropertVTableAO *vtable; if (!pr_ao_data->nmobj) @@ -1979,7 +1993,7 @@ nml_dbus_property_ao_notify_changed(NMLDBusPropertyAO *pr_ao, NMClient *self) while (pr_ao->changed_head) { const NMLDBusPropertVTableAO *vtable; - GObject * nmobj = NULL; + GObject *nmobj = NULL; gboolean is_ready = TRUE; GType gtype; @@ -2098,7 +2112,7 @@ nml_dbus_property_ao_notify_changed_many(NMLDBusPropertyAO *ptr, guint len, NMCl static void nml_dbus_property_ao_notify_watch_cb(NMClient *self, gpointer obj_watcher) { - PropertyAOData * pr_ao_data = obj_watcher; + PropertyAOData *pr_ao_data = obj_watcher; NMLDBusPropertyAO *pr_ao = pr_ao_data->parent; nm_assert(g_hash_table_lookup(pr_ao->hash, pr_ao_data) == pr_ao_data); @@ -2119,12 +2133,12 @@ nml_dbus_property_ao_notify_watch_cb(NMClient *self, gpointer obj_watcher) } NMLDBusNotifyUpdatePropFlags -nml_dbus_property_ao_notify(NMClient * self, - NMLDBusPropertyAO * pr_ao, - NMLDBusObject * dbobj, +nml_dbus_property_ao_notify(NMClient *self, + NMLDBusPropertyAO *pr_ao, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { CList stale_lst_head = C_LIST_INIT(stale_lst_head); PropertyAOData *pr_ao_data; @@ -2158,7 +2172,7 @@ nml_dbus_property_ao_notify(NMClient * self, if (value) { GVariantIter iter; - const char * path; + const char *path; g_variant_iter_init(&iter, value); while (g_variant_iter_next(&iter, "&o", &path)) { @@ -2344,23 +2358,23 @@ nml_dbus_property_ao_clear_many(NMLDBusPropertyAO *pr_ao, guint len, NMClient *s /*****************************************************************************/ NMLDBusNotifyUpdatePropFlags -_nml_dbus_notify_update_prop_ignore(NMClient * self, - NMLDBusObject * dbobj, +_nml_dbus_notify_update_prop_ignore(NMClient *self, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { return NML_DBUS_NOTIFY_UPDATE_PROP_FLAGS_NONE; } NMLDBusNotifyUpdatePropFlags -_nml_dbus_notify_update_prop_o(NMClient * self, - NMLDBusObject * dbobj, +_nml_dbus_notify_update_prop_o(NMClient *self, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - const char * path = NULL; + const char *path = NULL; NMRefString **p_property; if (value) @@ -2381,17 +2395,17 @@ _nml_dbus_notify_update_prop_o(NMClient * self, /*****************************************************************************/ static void -_obj_handle_dbus_prop_changes(NMClient * self, - NMLDBusObject * dbobj, +_obj_handle_dbus_prop_changes(NMClient *self, + NMLDBusObject *dbobj, NMLDBusObjIfaceData *db_iface_data, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - const NMLDBusMetaIface * meta_iface = db_iface_data->dbus_iface.meta; - const NMLDBusMetaProperty * meta_property = &meta_iface->dbus_properties[dbus_property_idx]; + const NMLDBusMetaIface *meta_iface = db_iface_data->dbus_iface.meta; + const NMLDBusMetaProperty *meta_property = &meta_iface->dbus_properties[dbus_property_idx]; gpointer p_property; - const char * dbus_type_s; - const GParamSpec * param_spec; + const char *dbus_type_s; + const GParamSpec *param_spec; NMLDBusNotifyUpdatePropFlags notify_update_prop_flags; nm_assert(G_IS_OBJECT(dbobj->nmobj)); @@ -2528,7 +2542,7 @@ _obj_handle_dbus_prop_changes(NMClient * self, { gconstpointer v; gsize l; - GBytes * b = NULL; + GBytes *b = NULL; if (value) { v = g_variant_get_fixed_array(value, &l, 1); @@ -2576,8 +2590,8 @@ notify: } static void -_obj_handle_dbus_iface_changes(NMClient * self, - NMLDBusObject * dbobj, +_obj_handle_dbus_iface_changes(NMClient *self, + NMLDBusObject *dbobj, NMLDBusObjIfaceData *db_iface_data) { NMLDBusObjPropData *db_prop_data; @@ -2648,9 +2662,9 @@ _obj_handle_dbus_iface_changes(NMClient * self, static void _obj_handle_dbus_changes(NMClient *self, NMLDBusObject *dbobj) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); - NMLDBusObjIfaceData *db_iface_data; - NMLDBusObjIfaceData *db_iface_data_safe; + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); + NMLDBusObjIfaceData *db_iface_data; + NMLDBusObjIfaceData *db_iface_data_safe; gs_unref_object GObject *nmobj_unregistering = NULL; _ASSERT_dbobj(dbobj, self); @@ -2791,7 +2805,7 @@ static void _dbus_handle_obj_changed_nmobj(NMClient *self) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; CList obj_changed_tmp_lst_head = C_LIST_INIT(obj_changed_tmp_lst_head); nm_assert(!nml_dbus_object_obj_changed_any_linked(self, ~NML_DBUS_OBJ_CHANGED_TYPE_NMOBJ)); @@ -2852,7 +2866,7 @@ static void _dbus_handle_obj_changed_dbus(NMClient *self, const char *log_context) { NMClientPrivate *priv; - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; CList obj_changed_tmp_lst_head = C_LIST_INIT(obj_changed_tmp_lst_head); priv = NM_CLIENT_GET_PRIVATE(self); @@ -2898,7 +2912,7 @@ _dbus_handle_obj_changed_dbus(NMClient *self, const char *log_context) static void _dbus_handle_changes_commit(NMClient *self, gboolean allow_init_start_check_complete) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; _dbus_handle_obj_changed_nmobj(self); @@ -2914,7 +2928,7 @@ _dbus_handle_changes_commit(NMClient *self, gboolean allow_init_start_check_comp } static void -_dbus_handle_changes(NMClient * self, +_dbus_handle_changes(NMClient *self, const char *log_context, gboolean allow_init_start_check_complete) { @@ -2923,17 +2937,17 @@ _dbus_handle_changes(NMClient * self, } static gboolean -_dbus_handle_properties_changed(NMClient * self, - const char * log_context, - const char * object_path, - const char * interface_name, +_dbus_handle_properties_changed(NMClient *self, + const char *log_context, + const char *object_path, + const char *interface_name, gboolean allow_add_iface, - GVariant * changed_properties, + GVariant *changed_properties, NMLDBusObject **inout_dbobj) { - NMLDBusObject * dbobj = NULL; - NMLDBusObjIfaceData *db_iface_data = NULL; - nm_auto_ref_string NMRefString *dbus_path = NULL; + NMLDBusObject *dbobj = NULL; + NMLDBusObjIfaceData *db_iface_data = NULL; + nm_auto_ref_string NMRefString *dbus_path = NULL; nm_assert(!changed_properties || g_variant_is_of_type(changed_properties, G_VARIANT_TYPE("a{sv}"))); @@ -3000,14 +3014,14 @@ _dbus_handle_properties_changed(NMClient * self, interface_name); else if (changed_properties) { GVariantIter iter_prop; - const char * property_name; - GVariant * property_value_tmp; + const char *property_name; + GVariant *property_value_tmp; g_variant_iter_init(&iter_prop, changed_properties); while (g_variant_iter_next(&iter_prop, "{&sv}", &property_name, &property_value_tmp)) { _nm_unused gs_unref_variant GVariant *property_value = property_value_tmp; - const NMLDBusMetaProperty * meta_property; - NMLDBusObjPropData * db_propdata; + const NMLDBusMetaProperty *meta_property; + NMLDBusObjPropData *db_propdata; guint property_idx; meta_property = nml_dbus_meta_property_get(db_iface_data->dbus_iface.meta, @@ -3045,14 +3059,14 @@ _dbus_handle_properties_changed(NMClient * self, } static gboolean -_dbus_handle_interface_added(NMClient * self, +_dbus_handle_interface_added(NMClient *self, const char *log_context, const char *object_path, - GVariant * ifaces) + GVariant *ifaces) { gboolean changed = FALSE; - const char * interface_name; - GVariant * changed_properties; + const char *interface_name; + GVariant *changed_properties; GVariantIter iter_ifaces; NMLDBusObject *dbobj = NULL; @@ -3076,10 +3090,10 @@ _dbus_handle_interface_added(NMClient * self, } static gboolean -_dbus_handle_interface_removed(NMClient * self, - const char * log_context, - const char * object_path, - NMLDBusObject ** inout_dbobj, +_dbus_handle_interface_removed(NMClient *self, + const char *log_context, + const char *object_path, + NMLDBusObject **inout_dbobj, const char *const *removed_interfaces) { gboolean changed = FALSE; @@ -3103,7 +3117,7 @@ _dbus_handle_interface_removed(NMClient * self, for (i = 0; removed_interfaces[i]; i++) { NMLDBusObjIfaceData *db_iface_data; - const char * interface_name = removed_interfaces[i]; + const char *interface_name = removed_interfaces[i]; db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, FALSE); if (!db_iface_data) { @@ -3133,16 +3147,16 @@ _dbus_handle_interface_removed(NMClient * self, static void _dbus_managed_objects_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * arg_object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *arg_object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - const char * log_context; + const char *log_context; gboolean changed; nm_assert(nm_streq0(interface_name, DBUS_INTERFACE_OBJECT_MANAGER)); @@ -3154,7 +3168,7 @@ _dbus_managed_objects_changed_cb(GDBusConnection *connection, if (nm_streq(signal_name, "InterfacesAdded")) { gs_unref_variant GVariant *interfaces_and_properties = NULL; - const char * object_path; + const char *object_path; if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("(oa{sa{sv}})"))) return; @@ -3169,7 +3183,7 @@ _dbus_managed_objects_changed_cb(GDBusConnection *connection, if (nm_streq(signal_name, "InterfacesRemoved")) { gs_free const char **interfaces = NULL; - const char * object_path; + const char *object_path; if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("(oas)"))) return; @@ -3190,19 +3204,19 @@ out: static void _dbus_properties_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * signal_interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; - NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - const char * interface_name; + NMClient *self = user_data; + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); + const char *interface_name; gs_unref_variant GVariant *changed_properties = NULL; - gs_free const char ** invalidated_properties = NULL; - const char * log_context = "properties-changed"; + gs_free const char **invalidated_properties = NULL; + const char *log_context = "properties-changed"; if (priv->get_managed_objects_cancellable) { /* we still wait for the initial GetManagedObjects(). Ignore the event. */ @@ -3239,12 +3253,12 @@ _dbus_properties_changed_cb(GDBusConnection *connection, static void _dbus_get_managed_objects_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMClient * self; - NMClientPrivate *priv; - gs_unref_variant GVariant *ret = NULL; - gs_unref_variant GVariant *managed_objects = NULL; - gs_free_error GError *error = NULL; - gs_unref_object GObject *context_busy_watcher = NULL; + NMClient *self; + NMClientPrivate *priv; + gs_unref_variant GVariant *ret = NULL; + gs_unref_variant GVariant *managed_objects = NULL; + gs_free_error GError *error = NULL; + gs_unref_object GObject *context_busy_watcher = NULL; nm_utils_user_data_unpack(user_data, &self, &context_busy_watcher); @@ -3273,8 +3287,8 @@ _dbus_get_managed_objects_cb(GObject *source, GAsyncResult *result, gpointer use if (managed_objects) { GVariantIter iter; - const char * object_path; - GVariant * ifaces_tmp; + const char *object_path; + GVariant *ifaces_tmp; g_variant_iter_init(&iter, managed_objects); while (g_variant_iter_next(&iter, "{&o@a{sa{sv}}}", &object_path, &ifaces_tmp)) { @@ -3294,12 +3308,12 @@ _dbus_get_managed_objects_cb(GObject *source, GAsyncResult *result, gpointer use static void _nm_client_get_settings_call_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMRemoteConnection *remote_connection; - NMClient * self; + NMRemoteConnection *remote_connection; + NMClient *self; gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; + gs_free_error GError *error = NULL; gs_unref_variant GVariant *settings = NULL; - NMLDBusObject * dbobj; + NMLDBusObject *dbobj; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); if (!ret && nm_utils_error_is_cancelled(error)) @@ -3352,17 +3366,17 @@ _nm_client_get_settings_call(NMClient *self, NMLDBusObject *dbobj) static void _dbus_settings_updated_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * signal_interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - const char * log_context = "settings-updated"; - NMLDBusObject * dbobj; + const char *log_context = "settings-updated"; + NMLDBusObject *dbobj; if (priv->get_managed_objects_cancellable) { /* we still wait for the initial GetManagedObjects(). Ignore the event. */ @@ -3391,17 +3405,17 @@ _dbus_settings_updated_cb(GDBusConnection *connection, static void _dbus_nm_connection_active_state_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * signal_interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - const char * log_context = "active-connection-state-changed"; - NMLDBusObject * dbobj; + const char *log_context = "active-connection-state-changed"; + NMLDBusObject *dbobj; guint32 state; guint32 reason; @@ -3441,17 +3455,17 @@ _dbus_nm_connection_active_state_changed_cb(GDBusConnection *connection, static void _dbus_nm_vpn_connection_state_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * signal_interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - const char * log_context = "vpn-connection-state-changed"; - NMLDBusObject * dbobj; + const char *log_context = "vpn-connection-state-changed"; + NMLDBusObject *dbobj; guint32 state; guint32 reason; @@ -3520,16 +3534,16 @@ _emit_permissions_changed(NMClient *self, const guint8 *old_permissions, const g static void _dbus_check_permissions_start_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; - NMClient * self; - NMClientPrivate * priv; - gs_unref_variant GVariant *ret = NULL; - nm_auto_free_variant_iter GVariantIter *v_permissions = NULL; - gs_free guint8 *old_permissions = NULL; - gs_free_error GError *error = NULL; - const char * pkey; - const char * pvalue; - int i; + nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; + NMClient *self; + NMClientPrivate *priv; + gs_unref_variant GVariant *ret = NULL; + nm_auto_free_variant_iter GVariantIter *v_permissions = NULL; + gs_free guint8 *old_permissions = NULL; + gs_free_error GError *error = NULL; + const char *pkey; + const char *pvalue; + int i; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); if (!ret && nm_utils_error_is_cancelled(error)) @@ -3611,14 +3625,14 @@ _dbus_check_permissions_start(NMClient *self) static void _dbus_nm_check_permissions_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * signal_interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *signal_interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("()"))) { @@ -3639,8 +3653,8 @@ _dbus_nm_check_permissions_cb(GDBusConnection *connection, static void _property_ao_notify_changed_connections_cb(NMLDBusPropertyAO *pr_ao, - NMClient * self, - NMObject * nmobj, + NMClient *self, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(self, @@ -3654,8 +3668,8 @@ _property_ao_notify_changed_connections_cb(NMLDBusPropertyAO *pr_ao, static void _property_ao_notify_changed_all_devices_cb(NMLDBusPropertyAO *pr_ao, - NMClient * self, - NMObject * nmobj, + NMClient *self, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(self, @@ -3669,8 +3683,8 @@ _property_ao_notify_changed_all_devices_cb(NMLDBusPropertyAO *pr_ao, static void _property_ao_notify_changed_devices_cb(NMLDBusPropertyAO *pr_ao, - NMClient * self, - NMObject * nmobj, + NMClient *self, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(self, @@ -3684,8 +3698,8 @@ _property_ao_notify_changed_devices_cb(NMLDBusPropertyAO *pr_ao, static void _property_ao_notify_changed_active_connections_cb(NMLDBusPropertyAO *pr_ao, - NMClient * self, - NMObject * nmobj, + NMClient *self, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(self, @@ -3701,10 +3715,10 @@ _property_ao_notify_changed_active_connections_cb(NMLDBusPropertyAO *pr_ao, typedef struct { NMLDBusObjWatcherWithPtr *obj_watcher; - const char * op_name; - NMLDBusObject * dbobj; - GTask * task; - GVariant * extra_results; + const char *op_name; + NMLDBusObject *dbobj; + GTask *task; + GVariant *extra_results; gpointer result; GType gtype; gulong cancellable_id; @@ -3801,8 +3815,8 @@ static void _request_wait_obj_watcher_cb(NMClient *self, gpointer obj_watcher_base) { NMLDBusObjWatcherWithPtr *obj_watcher = obj_watcher_base; - RequestWaitData * request_data = obj_watcher->user_data; - NMLDBusObject * dbobj; + RequestWaitData *request_data = obj_watcher->user_data; + NMLDBusObject *dbobj; dbobj = request_data->dbobj; @@ -3829,8 +3843,8 @@ static void _request_wait_cancelled_cb(GCancellable *cancellable, gpointer user_data) { RequestWaitData *request_data = user_data; - NMClient * self; - GError * error = NULL; + NMClient *self; + GError *error = NULL; nm_assert(cancellable == g_task_get_cancellable(request_data->task)); @@ -3848,17 +3862,17 @@ _request_wait_cancelled_cb(GCancellable *cancellable, gpointer user_data) } static void -_request_wait_start(GTask * task_take, +_request_wait_start(GTask *task_take, const char *op_name, GType gtype, const char *dbus_path, - GVariant * extra_results_take) + GVariant *extra_results_take) { - NMClient * self; + NMClient *self; gs_unref_object GTask *task = g_steal_pointer(&task_take); - RequestWaitData * request_data; - GCancellable * cancellable; - NMLDBusObject * dbobj; + RequestWaitData *request_data; + GCancellable *cancellable; + NMLDBusObject *dbobj; nm_assert(G_IS_TASK(task)); @@ -3922,11 +3936,11 @@ _request_wait_start(GTask * task_take, } static gpointer -_request_wait_finish(NMClient * client, +_request_wait_finish(NMClient *client, GAsyncResult *result, gpointer source_tag, - GVariant ** out_result, - GError ** error) + GVariant **out_result, + GError **error) { RequestWaitData *request_data = NULL; gpointer r; @@ -4501,7 +4515,7 @@ nm_client_set_logging(NMClient *client, const char *level, const char *domains, NMClientPermissionResult nm_client_get_permission_result(NMClient *client, NMClientPermission permission) { - NMClientPrivate * priv; + NMClientPrivate *priv; NMClientPermissionResult result = NM_CLIENT_PERMISSION_RESULT_UNKNOWN; g_return_val_if_fail(NM_IS_CLIENT(client), NM_CLIENT_PERMISSION_RESULT_UNKNOWN); @@ -4575,7 +4589,7 @@ nm_client_get_connectivity(NMClient *client) NMConnectivityState nm_client_check_connectivity(NMClient *client, GCancellable *cancellable, GError **error) { - NMClientPrivate *priv; + NMClientPrivate *priv; gs_unref_variant GVariant *ret = NULL; guint32 connectivity; @@ -4626,8 +4640,8 @@ nm_client_check_connectivity(NMClient *client, GCancellable *cancellable, GError * re-checking, and nm_client_check_connectivity(), which blocks. */ void -nm_client_check_connectivity_async(NMClient * client, - GCancellable * cancellable, +nm_client_check_connectivity_async(NMClient *client, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -4695,10 +4709,10 @@ nm_client_check_connectivity_finish(NMClient *client, GAsyncResult *result, GErr * Deprecated: 1.22: Use nm_client_save_hostname_async() or GDBusConnection. **/ gboolean -nm_client_save_hostname(NMClient * client, - const char * hostname, +nm_client_save_hostname(NMClient *client, + const char *hostname, GCancellable *cancellable, - GError ** error) + GError **error) { g_return_val_if_fail(NM_IS_CLIENT(client), FALSE); g_return_val_if_fail(!cancellable || G_IS_CANCELLABLE(cancellable), FALSE); @@ -4728,9 +4742,9 @@ nm_client_save_hostname(NMClient * client, * or cleared. **/ void -nm_client_save_hostname_async(NMClient * client, - const char * hostname, - GCancellable * cancellable, +nm_client_save_hostname_async(NMClient *client, + const char *hostname, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -4950,10 +4964,10 @@ nm_client_get_activating_connection(NMClient *client) static void activate_connection_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_unref_variant GVariant *ret = NULL; - const char * v_active_connection; - GError * error = NULL; + gs_unref_object GTask *task = user_data; + gs_unref_variant GVariant *ret = NULL; + const char *v_active_connection; + GError *error = NULL; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(object), result, &error); if (!ret) { @@ -5006,11 +5020,11 @@ activate_connection_cb(GObject *object, GAsyncResult *result, gpointer user_data * track the activation to its completion. **/ void -nm_client_activate_connection_async(NMClient * client, - NMConnection * connection, - NMDevice * device, - const char * specific_object, - GCancellable * cancellable, +nm_client_activate_connection_async(NMClient *client, + NMConnection *connection, + NMDevice *device, + const char *specific_object, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5076,17 +5090,17 @@ nm_client_activate_connection_finish(NMClient *client, GAsyncResult *result, GEr /*****************************************************************************/ static void -_add_and_activate_connection_done(GObject * object, +_add_and_activate_connection_done(GObject *object, GAsyncResult *result, gboolean use_add_and_activate_v2, - GTask * task_take) + GTask *task_take) { - _nm_unused gs_unref_object GTask *task = task_take; - gs_unref_variant GVariant *ret = NULL; - GError * error = NULL; - gs_unref_variant GVariant *v_result = NULL; - const char * v_active_connection; - const char * v_path; + _nm_unused gs_unref_object GTask *task = task_take; + gs_unref_variant GVariant *ret = NULL; + GError *error = NULL; + gs_unref_variant GVariant *v_result = NULL; + const char *v_active_connection; + const char *v_path; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(object), result, &error); if (!ret) { @@ -5122,17 +5136,17 @@ _add_and_activate_connection_v2_cb(GObject *object, GAsyncResult *result, gpoint } static void -_add_and_activate_connection(NMClient * self, +_add_and_activate_connection(NMClient *self, gboolean is_v2, - NMConnection * partial, - NMDevice * device, - const char * specific_object, - GVariant * options, - GCancellable * cancellable, + NMConnection *partial, + NMDevice *device, + const char *specific_object, + GVariant *options, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { - GVariant * arg_connection = NULL; + GVariant *arg_connection = NULL; gboolean use_add_and_activate_v2 = FALSE; const char *arg_device = NULL; gpointer source_tag; @@ -5239,11 +5253,11 @@ _add_and_activate_connection(NMClient * self, * track the activation to its completion. **/ void -nm_client_add_and_activate_connection_async(NMClient * client, - NMConnection * partial, - NMDevice * device, - const char * specific_object, - GCancellable * cancellable, +nm_client_add_and_activate_connection_async(NMClient *client, + NMConnection *partial, + NMDevice *device, + const char *specific_object, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5326,12 +5340,12 @@ nm_client_add_and_activate_connection_finish(NMClient *client, GAsyncResult *res * Since: 1.16 **/ void -nm_client_add_and_activate_connection2(NMClient * client, - NMConnection * partial, - NMDevice * device, - const char * specific_object, - GVariant * options, - GCancellable * cancellable, +nm_client_add_and_activate_connection2(NMClient *client, + NMConnection *partial, + NMDevice *device, + const char *specific_object, + GVariant *options, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5351,7 +5365,7 @@ nm_client_add_and_activate_connection2(NMClient * client, * @client: an #NMClient * @result: the result passed to the #GAsyncReadyCallback * @error: location for a #GError, or %NULL - * @out_result: (allow-none) (transfer full): the output result + * @out_result: (allow-none) (transfer full) (out): the output result * of type "a{sv}" returned by D-Bus' AddAndActivate2 call. Currently, no * output is implemented yet. * @@ -5364,10 +5378,10 @@ nm_client_add_and_activate_connection2(NMClient * client, * failure, in which case @error will be set. **/ NMActiveConnection * -nm_client_add_and_activate_connection2_finish(NMClient * client, +nm_client_add_and_activate_connection2_finish(NMClient *client, GAsyncResult *result, - GVariant ** out_result, - GError ** error) + GVariant **out_result, + GError **error) { return NM_ACTIVE_CONNECTION(_request_wait_finish(client, result, @@ -5392,10 +5406,10 @@ nm_client_add_and_activate_connection2_finish(NMClient * client, * Deprecated: 1.22: Use nm_client_deactivate_connection_async() or GDBusConnection. **/ gboolean -nm_client_deactivate_connection(NMClient * client, +nm_client_deactivate_connection(NMClient *client, NMActiveConnection *active, - GCancellable * cancellable, - GError ** error) + GCancellable *cancellable, + GError **error) { const char *active_path; @@ -5428,9 +5442,9 @@ nm_client_deactivate_connection(NMClient * client, * Asynchronously deactivates an active #NMActiveConnection. **/ void -nm_client_deactivate_connection_async(NMClient * client, +nm_client_deactivate_connection_async(NMClient *client, NMActiveConnection *active, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5591,16 +5605,16 @@ nm_client_get_connection_by_uuid(NMClient *client, const char *uuid) /*****************************************************************************/ static void -_add_connection_cb(GObject * source, +_add_connection_cb(GObject *source, GAsyncResult *result, gboolean with_extra_arg, gpointer user_data) { gs_unref_variant GVariant *ret = NULL; - gs_unref_object GTask *task = user_data; + gs_unref_object GTask *task = user_data; gs_unref_variant GVariant *v_result = NULL; - const char * v_path; - GError * error = NULL; + const char *v_path; + GError *error = NULL; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); if (!ret) { @@ -5636,13 +5650,13 @@ _add_connection_cb_with_extra_result(GObject *object, GAsyncResult *result, gpoi } static void -_add_connection_call(NMClient * self, +_add_connection_call(NMClient *self, gpointer source_tag, gboolean ignore_out_result, - GVariant * settings, + GVariant *settings, NMSettingsAddConnection2Flags flags, - GVariant * args, - GCancellable * cancellable, + GVariant *args, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5736,10 +5750,10 @@ _add_connection_call(NMClient * self, * completion and/or normalization of connection properties. **/ void -nm_client_add_connection_async(NMClient * client, - NMConnection * connection, +nm_client_add_connection_async(NMClient *client, + NMConnection *connection, gboolean save_to_disk, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5798,12 +5812,12 @@ nm_client_add_connection_finish(NMClient *client, GAsyncResult *result, GError * * Since: 1.20 **/ void -nm_client_add_connection2(NMClient * client, - GVariant * settings, +nm_client_add_connection2(NMClient *client, + GVariant *settings, NMSettingsAddConnection2Flags flags, - GVariant * args, + GVariant *args, gboolean ignore_out_result, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5834,10 +5848,10 @@ nm_client_add_connection2(NMClient * client, * Since: 1.20 */ NMRemoteConnection * -nm_client_add_connection2_finish(NMClient * client, +nm_client_add_connection2_finish(NMClient *client, GAsyncResult *result, - GVariant ** out_result, - GError ** error) + GVariant **out_result, + GError **error) { return NM_REMOTE_CONNECTION( _request_wait_finish(client, result, nm_client_add_connection2, out_result, error)); @@ -5880,11 +5894,11 @@ nm_client_add_connection2_finish(NMClient * client, * Deprecated: 1.22: Use nm_client_load_connections_async() or GDBusConnection. **/ gboolean -nm_client_load_connections(NMClient * client, - char ** filenames, - char *** failures, +nm_client_load_connections(NMClient *client, + char **filenames, + char ***failures, GCancellable *cancellable, - GError ** error) + GError **error) { gs_unref_variant GVariant *ret = NULL; @@ -5926,9 +5940,9 @@ nm_client_load_connections(NMClient * client, * See nm_client_load_connections() for more details. **/ void -nm_client_load_connections_async(NMClient * client, - char ** filenames, - GCancellable * cancellable, +nm_client_load_connections_async(NMClient *client, + char **filenames, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -5967,10 +5981,10 @@ nm_client_load_connections_async(NMClient * client, * Note that even in the success case, you might have individual @failures. **/ gboolean -nm_client_load_connections_finish(NMClient * client, - char *** failures, +nm_client_load_connections_finish(NMClient *client, + char ***failures, GAsyncResult *result, - GError ** error) + GError **error) { gs_unref_variant GVariant *ret = NULL; @@ -6040,8 +6054,8 @@ nm_client_reload_connections(NMClient *client, GCancellable *cancellable, GError * in-memory state matches the on-disk state. **/ void -nm_client_reload_connections_async(NMClient * client, - GCancellable * cancellable, +nm_client_reload_connections_async(NMClient *client, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6152,36 +6166,36 @@ nm_client_get_dns_configuration(NMClient *client) } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_dns_manager_configuration(NMClient * self, - NMLDBusObject * dbobj, +_notify_update_prop_dns_manager_configuration(NMClient *self, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); gs_unref_ptrarray GPtrArray *configuration_old = NULL; gs_unref_ptrarray GPtrArray *configuration_new = NULL; nm_assert(G_OBJECT(self) == dbobj->nmobj); if (value) { - GVariant * entry_var_tmp; + GVariant *entry_var_tmp; GVariantIter iter; - GPtrArray * array; + GPtrArray *array; configuration_new = g_ptr_array_new_with_free_func((GDestroyNotify) nm_dns_entry_unref); g_variant_iter_init(&iter, value); while (g_variant_iter_next(&iter, "@a{sv}", &entry_var_tmp)) { - gs_unref_variant GVariant *entry_var = entry_var_tmp; + gs_unref_variant GVariant *entry_var = entry_var_tmp; nm_auto_free_variant_iter GVariantIter *iterp_nameservers = NULL; nm_auto_free_variant_iter GVariantIter *iterp_domains = NULL; - gs_free char ** nameservers = NULL; - gs_free char ** domains = NULL; + gs_free char **nameservers = NULL; + gs_free char **domains = NULL; gboolean vpn = FALSE; - NMDnsEntry * entry; - char * interface = NULL; - char * str; + NMDnsEntry *entry; + char *interface = NULL; + char *str; gint32 priority = 0; if (!g_variant_lookup(entry_var, "nameservers", "as", &iterp_nameservers) @@ -6256,11 +6270,11 @@ nm_client_get_capabilities(NMClient *client, gsize *length) } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_nm_capabilities(NMClient * self, - NMLDBusObject * dbobj, +_notify_update_prop_nm_capabilities(NMClient *self, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); @@ -6310,10 +6324,10 @@ nm_client_get_checkpoints(NMClient *client) static void checkpoint_create_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - gs_unref_object GTask *task = user_data; - gs_unref_variant GVariant *ret = NULL; - const char * v_checkpoint_path; - GError * error = NULL; + gs_unref_object GTask *task = user_data; + gs_unref_variant GVariant *ret = NULL; + const char *v_checkpoint_path; + GError *error = NULL; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(object), result, &error); if (!ret) { @@ -6351,11 +6365,11 @@ checkpoint_create_cb(GObject *object, GAsyncResult *result, gpointer user_data) * Since: 1.12 **/ void -nm_client_checkpoint_create(NMClient * client, - const GPtrArray * devices, +nm_client_checkpoint_create(NMClient *client, + const GPtrArray *devices, guint32 rollback_timeout, NMCheckpointCreateFlags flags, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6421,9 +6435,9 @@ nm_client_checkpoint_create_finish(NMClient *client, GAsyncResult *result, GErro * Since: 1.12 **/ void -nm_client_checkpoint_destroy(NMClient * client, - const char * checkpoint_path, - GCancellable * cancellable, +nm_client_checkpoint_destroy(NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6481,9 +6495,9 @@ nm_client_checkpoint_destroy_finish(NMClient *client, GAsyncResult *result, GErr * Since: 1.12 **/ void -nm_client_checkpoint_rollback(NMClient * client, - const char * checkpoint_path, - GCancellable * cancellable, +nm_client_checkpoint_rollback(NMClient *client, + const char *checkpoint_path, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6526,8 +6540,8 @@ nm_client_checkpoint_rollback_finish(NMClient *client, GAsyncResult *result, GEr gs_unref_variant GVariant *ret = NULL; gs_unref_variant GVariant *v_result = NULL; GVariantIter iter; - GHashTable * hash; - const char * path; + GHashTable *hash; + const char *path; guint32 r; g_return_val_if_fail(NM_IS_CLIENT(client), NULL); @@ -6564,10 +6578,10 @@ nm_client_checkpoint_rollback_finish(NMClient *client, GAsyncResult *result, GEr * Since: 1.12 **/ void -nm_client_checkpoint_adjust_rollback_timeout(NMClient * client, - const char * checkpoint_path, +nm_client_checkpoint_adjust_rollback_timeout(NMClient *client, + const char *checkpoint_path, guint32 add_timeout, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6603,9 +6617,9 @@ nm_client_checkpoint_adjust_rollback_timeout(NMClient * client, * Since: 1.12 **/ gboolean -nm_client_checkpoint_adjust_rollback_timeout_finish(NMClient * client, +nm_client_checkpoint_adjust_rollback_timeout_finish(NMClient *client, GAsyncResult *result, - GError ** error) + GError **error) { g_return_val_if_fail(NM_IS_CLIENT(client), FALSE); g_return_val_if_fail( @@ -6632,9 +6646,9 @@ nm_client_checkpoint_adjust_rollback_timeout_finish(NMClient * client, * Since: 1.22 **/ void -nm_client_reload(NMClient * client, +nm_client_reload(NMClient *client, NMManagerReloadFlags flags, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6709,14 +6723,14 @@ nm_client_reload_finish(NMClient *client, GAsyncResult *result, GError **error) * Since: 1.24 **/ void -nm_client_dbus_call(NMClient * client, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +nm_client_dbus_call(NMClient *client, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6782,13 +6796,13 @@ nm_client_dbus_call_finish(NMClient *client, GAsyncResult *result, GError **erro * Since: 1.24 **/ void -nm_client_dbus_set_property(NMClient * client, - const char * object_path, - const char * interface_name, - const char * property_name, - GVariant * value, +nm_client_dbus_set_property(NMClient *client, + const char *object_path, + const char *interface_name, + const char *property_name, + GVariant *value, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -6839,7 +6853,7 @@ nm_client_dbus_set_property_finish(NMClient *client, GAsyncResult *result, GErro static void _init_fetch_all(NMClient *self) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; dbus_context = nm_g_main_context_push_thread_default_if_necessary(priv->dbus_context); @@ -6936,8 +6950,8 @@ static void _init_release_all(NMClient *self) { NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - CList ** dbus_objects_lst_heads; - NMLDBusObject * dbobj; + CList **dbus_objects_lst_heads; + NMLDBusObject *dbobj; int i; gboolean permissions_state_changed = FALSE; @@ -7008,10 +7022,10 @@ _init_release_all(NMClient *self) static void name_owner_changed(NMClient *self, const char *name_owner) { - NMClientPrivate * priv = NM_CLIENT_GET_PRIVATE(self); - gboolean changed; - gs_free char * old_name_owner_free = NULL; - const char * old_name_owner; + NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); + gboolean changed; + gs_free char *old_name_owner_free = NULL; + const char *old_name_owner; nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; name_owner = nm_str_not_empty(name_owner); @@ -7087,16 +7101,16 @@ name_owner_changed(NMClient *self, const char *name_owner) static void name_owner_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv; - const char * new_owner; + const char *new_owner; if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("(sss)"))) return; @@ -7113,12 +7127,12 @@ name_owner_changed_cb(GDBusConnection *connection, static void name_owner_get_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMClient * self; - NMClientPrivate *priv; - gs_unref_object GObject *context_busy_watcher = NULL; - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; - const char * name_owner = NULL; + NMClient *self; + NMClientPrivate *priv; + gs_unref_object GObject *context_busy_watcher = NULL; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; + const char *name_owner = NULL; nm_utils_user_data_unpack(user_data, &self, &context_busy_watcher); @@ -7164,8 +7178,8 @@ name_owner_get_call(NMClient *self) static inline gboolean _nml_cleanup_context_busy_watcher_on_idle_cb(gpointer user_data) { - nm_auto_unref_gmaincontext GMainContext *context = NULL; - gs_unref_object GObject *context_busy_watcher = NULL; + nm_auto_unref_gmaincontext GMainContext *context = NULL; + gs_unref_object GObject *context_busy_watcher = NULL; nm_utils_user_data_unpack(user_data, &context, &context_busy_watcher); @@ -7178,7 +7192,7 @@ void nml_cleanup_context_busy_watcher_on_idle(GObject *context_busy_watcher_take, GMainContext *context) { gs_unref_object GObject *context_busy_watcher = g_steal_pointer(&context_busy_watcher_take); - GSource * cleanup_source; + GSource *cleanup_source; nm_assert(G_IS_OBJECT(context_busy_watcher)); nm_assert(context); @@ -7292,9 +7306,9 @@ _init_start_check_complete(NMClient *self) static void _init_start_cancelled_cb(GCancellable *cancellable, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); - GError * error; + GError *error; nm_assert(NM_IS_CLIENT(self)); nm_assert(priv->init_data); @@ -7315,7 +7329,7 @@ static gboolean _init_start_cancel_on_idle_cb(gpointer user_data) { NMClient *self = user_data; - GError * error; + GError *error; nm_utils_error_set_cancelled(&error, FALSE, NULL); _init_start_complete(self, error); @@ -7358,10 +7372,10 @@ _init_start_with_bus(NMClient *self) static void _init_start_bus_get_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMClient * self = user_data; + NMClient *self = user_data; NMClientPrivate *priv; GDBusConnection *dbus_connection; - GError * error = NULL; + GError *error = NULL; nm_assert(NM_IS_CLIENT(self)); @@ -7402,7 +7416,7 @@ _init_start(NMClient *self) static void get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NMClient * self = NM_CLIENT(object); + NMClient *self = NM_CLIENT(object); NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(object); switch (prop_id) { @@ -7487,7 +7501,7 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) case PROP_CAPABILITIES: { const guint32 *arr; - GArray * out; + GArray *out; gsize len; arr = nm_client_get_capabilities(self, &len); @@ -7536,7 +7550,7 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) static void set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMClient * self = NM_CLIENT(object); + NMClient *self = NM_CLIENT(object); NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); gboolean b; guint v_uint; @@ -7618,11 +7632,11 @@ static gboolean init_sync(GInitable *initable, GCancellable *cancellable, GError **error) { gs_unref_object NMClient *self = NULL; - NMClientPrivate * priv; - GMainContext * dbus_context; - GError * local_error = NULL; - GMainLoop * main_loop; - GObject * parent_context_busy_watcher; + NMClientPrivate *priv; + GMainContext *dbus_context; + GError *local_error = NULL; + GMainLoop *main_loop; + GObject *parent_context_busy_watcher; g_return_val_if_fail(NM_IS_CLIENT(initable), FALSE); @@ -7702,16 +7716,16 @@ init_sync(GInitable *initable, GCancellable *cancellable, GError **error) /*****************************************************************************/ static void -init_async(GAsyncInitable * initable, +init_async(GAsyncInitable *initable, int io_priority, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { - NMClientPrivate * priv; - NMClient * self; + NMClientPrivate *priv; + NMClient *self; nm_auto_pop_gmaincontext GMainContext *context = NULL; - GTask * task; + GTask *task; g_return_if_fail(NM_IS_CLIENT(initable)); @@ -7863,7 +7877,7 @@ NMClient * nm_client_new_finish(GAsyncResult *result, GError **error) { gs_unref_object GObject *source_object = NULL; - GObject * object; + GObject *object; source_object = g_async_result_get_source_object(result); g_return_val_if_fail(source_object, NULL); @@ -7877,7 +7891,7 @@ nm_client_new_finish(GAsyncResult *result, GError **error) static void constructed(GObject *object) { - NMClient * self = NM_CLIENT(object); + NMClient *self = NM_CLIENT(object); NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); priv->main_context = g_main_context_ref_thread_default(); @@ -7890,7 +7904,7 @@ constructed(GObject *object) static void dispose(GObject *object) { - NMClient * self = NM_CLIENT(object); + NMClient *self = NM_CLIENT(object); NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self); nm_assert(!priv->init_data); diff --git a/src/libnm-client-impl/nm-dbus-helpers.c b/src/libnm-client-impl/nm-dbus-helpers.c index 3b5f9ff8..c413bf02 100644 --- a/src/libnm-client-impl/nm-dbus-helpers.c +++ b/src/libnm-client-impl/nm-dbus-helpers.c @@ -54,7 +54,7 @@ _nm_dbus_bind_properties(gpointer object, gpointer skeleton) static char * signal_name_from_method_name(const char *method_name) { - GString * signal_name; + GString *signal_name; const char *p; signal_name = g_string_new("handle"); @@ -68,8 +68,8 @@ signal_name_from_method_name(const char *method_name) } static void -_nm_dbus_method_meta_marshal(GClosure * closure, - GValue * return_value, +_nm_dbus_method_meta_marshal(GClosure *closure, + GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, @@ -94,9 +94,9 @@ _nm_dbus_bind_methods(gpointer object, gpointer skeleton, ...) { va_list ap; const char *method_name; - char * signal_name; + char *signal_name; GCallback handler; - GClosure * closure; + GClosure *closure; va_start(ap, skeleton); while ((method_name = va_arg(ap, const char *)) && (handler = va_arg(ap, GCallback))) { diff --git a/src/libnm-client-impl/nm-device-6lowpan.c b/src/libnm-client-impl/nm-device-6lowpan.c index e03b4a00..39558f25 100644 --- a/src/libnm-client-impl/nm-device-6lowpan.c +++ b/src/libnm-client-impl/nm-device-6lowpan.c @@ -109,7 +109,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_lowpan = NML_DBUS_META_IFA static void nm_device_6lowpan_class_init(NMDevice6LowpanClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-adsl.c b/src/libnm-client-impl/nm-device-adsl.c index 65f87545..58366c8f 100644 --- a/src/libnm-client-impl/nm-device-adsl.c +++ b/src/libnm-client-impl/nm-device-adsl.c @@ -107,7 +107,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_adsl = NML_DBUS_META_IFACE static void nm_device_adsl_class_init(NMDeviceAdslClass *adsl_class) { - GObjectClass * object_class = G_OBJECT_CLASS(adsl_class); + GObjectClass *object_class = G_OBJECT_CLASS(adsl_class); NMDeviceClass *device_class = NM_DEVICE_CLASS(adsl_class); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-bond.c b/src/libnm-client-impl/nm-device-bond.c index add54639..e8b3e3eb 100644 --- a/src/libnm-client-impl/nm-device-bond.c +++ b/src/libnm-client-impl/nm-device-bond.c @@ -158,7 +158,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bond = NML_DBUS_META_IFACE static void nm_device_bond_class_init(NMDeviceBondClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-bridge.c b/src/libnm-client-impl/nm-device-bridge.c index fb0ad873..6d5d6f95 100644 --- a/src/libnm-client-impl/nm-device-bridge.c +++ b/src/libnm-client-impl/nm-device-bridge.c @@ -163,7 +163,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bridge = NML_DBUS_META_IFA static void nm_device_bridge_class_init(NMDeviceBridgeClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-bt.c b/src/libnm-client-impl/nm-device-bt.c index 074ada66..b006cec4 100644 --- a/src/libnm-client-impl/nm-device-bt.c +++ b/src/libnm-client-impl/nm-device-bt.c @@ -21,7 +21,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_NAME, PROP_BT_CAPABILITIES, ); typedef struct { - char * name; + char *name; guint32 bt_capabilities; } NMDeviceBtPrivate; @@ -96,7 +96,7 @@ static NMBluetoothCapabilities get_connection_bt_type(NMConnection *connection) { NMSettingBluetooth *s_bt; - const char * bt_type; + const char *bt_type; s_bt = nm_connection_get_setting_bluetooth(connection); if (!s_bt) @@ -116,8 +116,8 @@ get_connection_bt_type(NMConnection *connection) static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { - NMSettingBluetooth * s_bt; - const char * hw_addr, *setting_addr; + NMSettingBluetooth *s_bt; + const char *hw_addr, *setting_addr; NMBluetoothCapabilities dev_caps; NMBluetoothCapabilities bt_type; @@ -235,7 +235,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_bluetooth = NML_DBUS_META_ static void nm_device_bt_class_init(NMDeviceBtClass *bt_class) { - GObjectClass * object_class = G_OBJECT_CLASS(bt_class); + GObjectClass *object_class = G_OBJECT_CLASS(bt_class); NMDeviceClass *device_class = NM_DEVICE_CLASS(bt_class); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-ethernet.c b/src/libnm-client-impl/nm-device-ethernet.c index b32decde..42b7262d 100644 --- a/src/libnm-client-impl/nm-device-ethernet.c +++ b/src/libnm-client-impl/nm-device-ethernet.c @@ -27,8 +27,8 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_PERM_HW_ADDRESS, PROP_S390_SUBCHANNELS, ); typedef struct _NMDeviceEthernetPrivate { - char ** s390_subchannels; - char * perm_hw_address; + char **s390_subchannels; + char *perm_hw_address; guint32 speed; bool carrier; } NMDeviceEthernetPrivate; @@ -132,7 +132,7 @@ static gboolean match_subchans(NMDeviceEthernet *self, NMSettingWired *s_wired, gboolean *try_mac) { NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE(self); - const char *const * subchans; + const char *const *subchans; gsize num1, num2; gsize i, j; @@ -193,7 +193,7 @@ connection_compatible(NMDevice *device, NMConnection *connection, GError **error s_wired = nm_connection_get_setting_wired(connection); /* Wired setting optional for PPPoE */ if (s_wired) { - const char * perm_addr, *s_mac; + const char *perm_addr, *s_mac; gboolean try_mac = TRUE; const char *const *mac_blacklist; int i; @@ -292,7 +292,7 @@ finalize(GObject *object) static void get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { - NMDeviceEthernet * device = NM_DEVICE_ETHERNET(object); + NMDeviceEthernet *device = NM_DEVICE_ETHERNET(object); NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE(device); switch (prop_id) { @@ -338,7 +338,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wired = NML_DBUS_META_IFAC static void nm_device_ethernet_class_init(NMDeviceEthernetClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); g_type_class_add_private(klass, sizeof(NMDeviceEthernetPrivate)); diff --git a/src/libnm-client-impl/nm-device-generic.c b/src/libnm-client-impl/nm-device-generic.c index 9dcc8c91..4a420003 100644 --- a/src/libnm-client-impl/nm-device-generic.c +++ b/src/libnm-client-impl/nm-device-generic.c @@ -147,7 +147,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_generic = NML_DBUS_META_IF static void nm_device_generic_class_init(NMDeviceGenericClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-infiniband.c b/src/libnm-client-impl/nm-device-infiniband.c index 7e4cc054..8bca721e 100644 --- a/src/libnm-client-impl/nm-device-infiniband.c +++ b/src/libnm-client-impl/nm-device-infiniband.c @@ -77,7 +77,7 @@ static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { NMSettingInfiniband *s_infiniband; - const char * hwaddr, *setting_hwaddr; + const char *hwaddr, *setting_hwaddr; if (!NM_DEVICE_CLASS(nm_device_infiniband_parent_class) ->connection_compatible(device, connection, error)) @@ -156,7 +156,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_infiniband = NML_DBUS_META static void nm_device_infiniband_class_init(NMDeviceInfinibandClass *ib_class) { - GObjectClass * object_class = G_OBJECT_CLASS(ib_class); + GObjectClass *object_class = G_OBJECT_CLASS(ib_class); NMDeviceClass *device_class = NM_DEVICE_CLASS(ib_class); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-ip-tunnel.c b/src/libnm-client-impl/nm-device-ip-tunnel.c index 14c72282..c34ad84b 100644 --- a/src/libnm-client-impl/nm-device-ip-tunnel.c +++ b/src/libnm-client-impl/nm-device-ip-tunnel.c @@ -30,10 +30,10 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_MODE, typedef struct { NMLDBusPropertyO parent; - char * local; - char * remote; - char * input_key; - char * output_key; + char *local; + char *remote; + char *input_key; + char *output_key; guint32 mode; guint32 flow_label; guint32 flags; @@ -383,7 +383,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_iptunnel = NML_DBUS_META_I static void nm_device_ip_tunnel_class_init(NMDeviceIPTunnelClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-macsec.c b/src/libnm-client-impl/nm-device-macsec.c index faa5be7e..525d32d0 100644 --- a/src/libnm-client-impl/nm-device-macsec.c +++ b/src/libnm-client-impl/nm-device-macsec.c @@ -29,7 +29,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_PARENT, typedef struct { NMLDBusPropertyO parent; - char * validation; + char *validation; guint64 sci; guint64 cipher_suite; guint32 window; @@ -428,7 +428,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_macsec = NML_DBUS_META_IFA static void nm_device_macsec_class_init(NMDeviceMacsecClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-macvlan.c b/src/libnm-client-impl/nm-device-macvlan.c index ddb36bab..a8363c93 100644 --- a/src/libnm-client-impl/nm-device-macvlan.c +++ b/src/libnm-client-impl/nm-device-macvlan.c @@ -19,7 +19,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_PARENT, PROP_MODE, PROP_NO_PROMISC, PROP_ typedef struct { NMLDBusPropertyO parent; - char * mode; + char *mode; bool no_promisc; bool tap; } NMDeviceMacvlanPrivate; @@ -138,7 +138,7 @@ static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE(device); - NMSettingMacvlan * s_macvlan; + NMSettingMacvlan *s_macvlan; if (!NM_DEVICE_CLASS(nm_device_macvlan_parent_class) ->connection_compatible(device, connection, error)) @@ -227,7 +227,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_macvlan = NML_DBUS_META_IF static void nm_device_macvlan_class_init(NMDeviceMacvlanClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-modem.c b/src/libnm-client-impl/nm-device-modem.c index 57e09bc6..a1edfb04 100644 --- a/src/libnm-client-impl/nm-device-modem.c +++ b/src/libnm-client-impl/nm-device-modem.c @@ -23,9 +23,9 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_MODEM_CAPABILITIES, PROP_APN, ); typedef struct { - char * device_id; - char * operator_code; - char * apn; + char *device_id; + char *operator_code; + char *apn; guint32 modem_capabilities; guint32 current_capabilities; } NMDeviceModemPrivate; @@ -153,16 +153,18 @@ get_type_description(NMDevice *device) return NULL; } -#define MODEM_CAPS_3GPP(caps) \ - (caps & (NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS | NM_DEVICE_MODEM_CAPABILITY_LTE)) +#define MODEM_CAPS_3GPP(caps) \ + NM_FLAGS_ANY((caps), \ + (NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS | NM_DEVICE_MODEM_CAPABILITY_LTE \ + | NM_DEVICE_MODEM_CAPABILITY_5GNR)) -#define MODEM_CAPS_3GPP2(caps) (caps & (NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)) +#define MODEM_CAPS_3GPP2(caps) NM_FLAGS_ANY((caps), NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { - NMSettingGsm * s_gsm; - NMSettingCdma * s_cdma; + NMSettingGsm *s_gsm; + NMSettingCdma *s_cdma; NMDeviceModemCapabilities current_caps; if (!NM_DEVICE_CLASS(nm_device_modem_parent_class) @@ -206,9 +208,9 @@ get_setting_type(NMDevice *device) NMDeviceModemCapabilities caps; caps = nm_device_modem_get_current_capabilities(NM_DEVICE_MODEM(device)); - if (caps & (NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS | NM_DEVICE_MODEM_CAPABILITY_LTE)) + if (MODEM_CAPS_3GPP(caps)) return NM_TYPE_SETTING_GSM; - else if (caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO) + else if (MODEM_CAPS_3GPP2(caps)) return NM_TYPE_SETTING_CDMA; else return G_TYPE_INVALID; @@ -282,7 +284,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_modem = NML_DBUS_META_IFAC static void nm_device_modem_class_init(NMDeviceModemClass *modem_class) { - GObjectClass * object_class = G_OBJECT_CLASS(modem_class); + GObjectClass *object_class = G_OBJECT_CLASS(modem_class); NMDeviceClass *device_class = NM_DEVICE_CLASS(modem_class); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-olpc-mesh.c b/src/libnm-client-impl/nm-device-olpc-mesh.c index 779990aa..26fceb3b 100644 --- a/src/libnm-client-impl/nm-device-olpc-mesh.c +++ b/src/libnm-client-impl/nm-device-olpc-mesh.c @@ -158,7 +158,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_olpcmesh = NML_DBUS_META_I static void nm_device_olpc_mesh_class_init(NMDeviceOlpcMeshClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-ovs-bridge.c b/src/libnm-client-impl/nm-device-ovs-bridge.c index 465957c4..8c30fc3f 100644 --- a/src/libnm-client-impl/nm-device-ovs-bridge.c +++ b/src/libnm-client-impl/nm-device-ovs-bridge.c @@ -130,7 +130,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_ovsbridge = NML_DBUS_META_ static void nm_device_ovs_bridge_class_init(NMDeviceOvsBridgeClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-ovs-port.c b/src/libnm-client-impl/nm-device-ovs-port.c index 76ae7a58..9e20e5b8 100644 --- a/src/libnm-client-impl/nm-device-ovs-port.c +++ b/src/libnm-client-impl/nm-device-ovs-port.c @@ -130,7 +130,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_ovsport = NML_DBUS_META_IF static void nm_device_ovs_port_class_init(NMDeviceOvsPortClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-team.c b/src/libnm-client-impl/nm-device-team.c index 9f7fe768..0a42089a 100644 --- a/src/libnm-client-impl/nm-device-team.c +++ b/src/libnm-client-impl/nm-device-team.c @@ -192,7 +192,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_team = NML_DBUS_META_IFACE static void nm_device_team_class_init(NMDeviceTeamClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-tun.c b/src/libnm-client-impl/nm-device-tun.c index 8b8ca0fe..353b4bdc 100644 --- a/src/libnm-client-impl/nm-device-tun.c +++ b/src/libnm-client-impl/nm-device-tun.c @@ -24,7 +24,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_MODE, PROP_MULTI_QUEUE, ); typedef struct { - char * mode; + char *mode; gint64 owner; gint64 group; bool no_pi; @@ -191,7 +191,7 @@ connection_compatible(NMDevice *device, NMConnection *connection, GError **error { NMDeviceTunPrivate *priv = NM_DEVICE_TUN_GET_PRIVATE(device); NMSettingTunMode mode; - NMSettingTun * s_tun; + NMSettingTun *s_tun; if (!NM_DEVICE_CLASS(nm_device_tun_parent_class) ->connection_compatible(device, connection, error)) @@ -294,7 +294,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_tun = NML_DBUS_META_IFACE_ static void nm_device_tun_class_init(NMDeviceTunClass *gre_class) { - GObjectClass * object_class = G_OBJECT_CLASS(gre_class); + GObjectClass *object_class = G_OBJECT_CLASS(gre_class); NMDeviceClass *device_class = NM_DEVICE_CLASS(gre_class); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-device-veth.c b/src/libnm-client-impl/nm-device-veth.c index f35f09b1..d9fc325b 100644 --- a/src/libnm-client-impl/nm-device-veth.c +++ b/src/libnm-client-impl/nm-device-veth.c @@ -95,7 +95,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_veth = static void nm_device_veth_class_init(NMDeviceVethClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-vlan.c b/src/libnm-client-impl/nm-device-vlan.c index 4c2a435b..882fc171 100644 --- a/src/libnm-client-impl/nm-device-vlan.c +++ b/src/libnm-client-impl/nm-device-vlan.c @@ -105,10 +105,10 @@ nm_device_vlan_get_vlan_id(NMDeviceVlan *device) static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { - NMSettingVlan * s_vlan; + NMSettingVlan *s_vlan; NMSettingWired *s_wired; - const char * setting_hwaddr; - const char * hw_address; + const char *setting_hwaddr; + const char *hw_address; if (!NM_DEVICE_CLASS(nm_device_vlan_parent_class) ->connection_compatible(device, connection, error)) @@ -205,7 +205,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_vlan = NML_DBUS_META_IFACE static void nm_device_vlan_class_init(NMDeviceVlanClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-vrf.c b/src/libnm-client-impl/nm-device-vrf.c index bbf37810..592785f9 100644 --- a/src/libnm-client-impl/nm-device-vrf.c +++ b/src/libnm-client-impl/nm-device-vrf.c @@ -115,7 +115,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_vrf = NML_DBUS_META_IFACE_ static void nm_device_vrf_class_init(NMDeviceVrfClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-vxlan.c b/src/libnm-client-impl/nm-device-vxlan.c index 6fac3b71..d7bd9cbe 100644 --- a/src/libnm-client-impl/nm-device-vxlan.c +++ b/src/libnm-client-impl/nm-device-vxlan.c @@ -34,8 +34,8 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_CARRIER, typedef struct { NMLDBusPropertyO parent; - char * group; - char * local; + char *group; + char *local; guint32 id; guint32 limit; guint32 ageing; @@ -522,7 +522,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_vxlan = NML_DBUS_META_IFAC static void nm_device_vxlan_class_init(NMDeviceVxlanClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-wifi-p2p.c b/src/libnm-client-impl/nm-device-wifi-p2p.c index 2daaf774..fb72f250 100644 --- a/src/libnm-client-impl/nm-device-wifi-p2p.c +++ b/src/libnm-client-impl/nm-device-wifi-p2p.c @@ -107,7 +107,7 @@ nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path) { const GPtrArray *peers; int i; - NMWifiP2PPeer * peer = NULL; + NMWifiP2PPeer *peer = NULL; g_return_val_if_fail(NM_IS_DEVICE_WIFI_P2P(device), NULL); g_return_val_if_fail(path != NULL, NULL); @@ -145,9 +145,9 @@ nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path) * Since: 1.16 **/ void -nm_device_wifi_p2p_start_find(NMDeviceWifiP2P * device, - GVariant * options, - GCancellable * cancellable, +nm_device_wifi_p2p_start_find(NMDeviceWifiP2P *device, + GVariant *options, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -207,8 +207,8 @@ nm_device_wifi_p2p_start_find_finish(NMDeviceWifiP2P *device, GAsyncResult *resu * Since: 1.16 **/ void -nm_device_wifi_p2p_stop_find(NMDeviceWifiP2P * device, - GCancellable * cancellable, +nm_device_wifi_p2p_stop_find(NMDeviceWifiP2P *device, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -286,8 +286,8 @@ get_type_description(NMDevice *device) static void _property_ao_notify_changed_peers_cb(NMLDBusPropertyAO *pr_ao, - NMClient * client, - NMObject * nmobj, + NMClient *client, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(client, @@ -342,7 +342,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wifip2p = NML_DBUS_META_IF static void nm_device_wifi_p2p_class_init(NMDeviceWifiP2PClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device-wifi.c b/src/libnm-client-impl/nm-device-wifi.c index cfbbea23..b062ea9e 100644 --- a/src/libnm-client-impl/nm-device-wifi.c +++ b/src/libnm-client-impl/nm-device-wifi.c @@ -33,7 +33,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_PERM_HW_ADDRESS, typedef struct { NMLDBusPropertyAO access_points; NMLDBusPropertyO active_access_point; - char * perm_hw_address; + char *perm_hw_address; gint64 last_scan; guint32 mode; guint32 bitrate; @@ -212,7 +212,7 @@ nm_device_wifi_get_access_point_by_path(NMDeviceWifi *device, const char *path) { const GPtrArray *aps; int i; - NMAccessPoint * ap = NULL; + NMAccessPoint *ap = NULL; g_return_val_if_fail(NM_IS_DEVICE_WIFI(device), NULL); g_return_val_if_fail(path != NULL, NULL); @@ -299,9 +299,9 @@ nm_device_wifi_request_scan(NMDeviceWifi *device, GCancellable *cancellable, GEr **/ gboolean nm_device_wifi_request_scan_options(NMDeviceWifi *device, - GVariant * options, + GVariant *options, GCancellable *cancellable, - GError ** error) + GError **error) { g_return_val_if_fail(NM_IS_DEVICE_WIFI(device), FALSE); g_return_val_if_fail(!options || g_variant_is_of_type(options, G_VARIANT_TYPE_VARDICT), FALSE); @@ -342,8 +342,8 @@ NM_BACKPORT_SYMBOL( * that for the scan to complete. **/ void -nm_device_wifi_request_scan_async(NMDeviceWifi * device, - GCancellable * cancellable, +nm_device_wifi_request_scan_async(NMDeviceWifi *device, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -371,9 +371,9 @@ nm_device_wifi_request_scan_async(NMDeviceWifi * device, * Since: 1.2 **/ void -nm_device_wifi_request_scan_options_async(NMDeviceWifi * device, - GVariant * options, - GCancellable * cancellable, +nm_device_wifi_request_scan_options_async(NMDeviceWifi *device, + GVariant *options, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -404,8 +404,8 @@ NM_BACKPORT_SYMBOL(libnm_1_0_6, void, nm_device_wifi_request_scan_options_async, (NMDeviceWifi * device, - GVariant * options, - GCancellable * cancellable, + GVariant *options, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data), (device, options, cancellable, callback, user_data)); @@ -453,11 +453,11 @@ has_proto(NMSettingWirelessSecurity *s_wsec, const char *proto) static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { - NMSettingWireless * s_wifi; + NMSettingWireless *s_wifi; NMSettingWirelessSecurity *s_wsec; - const char * hwaddr, *setting_hwaddr; + const char *hwaddr, *setting_hwaddr; NMDeviceWifiCapabilities wifi_caps; - const char * key_mgmt; + const char *key_mgmt; if (!NM_DEVICE_CLASS(nm_device_wifi_parent_class) ->connection_compatible(device, connection, error)) @@ -537,8 +537,8 @@ get_setting_type(NMDevice *device) static void _property_ao_notify_changed_access_points_cb(NMLDBusPropertyAO *pr_ao, - NMClient * client, - NMObject * nmobj, + NMClient *client, + NMObject *nmobj, gboolean is_added /* or else removed */) { _nm_client_notify_event_queue_emit_obj_signal(client, @@ -640,7 +640,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device_wireless = NML_DBUS_META_I static void nm_device_wifi_class_init(NMDeviceWifiClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); diff --git a/src/libnm-client-impl/nm-device.c b/src/libnm-client-impl/nm-device.c index a680a05f..238e7c17 100644 --- a/src/libnm-client-impl/nm-device.c +++ b/src/libnm-client-impl/nm-device.c @@ -90,16 +90,16 @@ enum { typedef struct _NMDevicePrivate { NMLDBusPropertyO property_o[_PROPERTY_O_IDX_NUM]; NMLDBusPropertyAO property_ao[_PROPERTY_AO_IDX_NUM]; - GPtrArray * lldp_neighbors; - char * driver; - char * driver_version; - char * hw_address; - char * interface; - char * ip_interface; - char * firmware_version; - char * physical_port_id; - char * udi; - char * path; + GPtrArray *lldp_neighbors; + char *driver; + char *driver_version; + char *hw_address; + char *interface; + char *ip_interface; + char *firmware_version; + char *physical_port_id; + char *udi; + char *path; guint32 capabilities; guint32 device_type; guint32 ip4_connectivity; @@ -121,12 +121,12 @@ typedef struct _NMDevicePrivate { guint32 old_state; struct udev *udev; - char * type_description; - char * product; - char * vendor; - char * short_vendor; - char * description; - char * bus_name; + char *type_description; + char *product; + char *vendor; + char *short_vendor; + char *description; + char *bus_name; } NMDevicePrivate; @@ -168,7 +168,7 @@ static void _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify_event) { gs_unref_object NMDevice *self = notify_event->user_data; - NMDevicePrivate * priv = NM_DEVICE_GET_PRIVATE(self); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); NML_NMCLIENT_LOG_T(client, "[%s] emit Device's StateChanged signal %u -> %u, reason: %u", @@ -186,13 +186,13 @@ _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_state_reason(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_state_reason(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMDevice * self = NM_DEVICE(dbobj->nmobj); + NMDevice *self = NM_DEVICE(dbobj->nmobj); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); guint32 new_state = NM_DEVICE_STATE_UNKNOWN; guint32 reason = NM_DEVICE_STATE_REASON_NONE; @@ -230,26 +230,26 @@ _notify_update_prop_state_reason(NMClient * client, } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_lldp_neighbors(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_lldp_neighbors(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMDevice * self = NM_DEVICE(dbobj->nmobj); - NMDevicePrivate * priv = NM_DEVICE_GET_PRIVATE(self); - gs_unref_ptrarray GPtrArray *old = NULL; - gs_unref_ptrarray GPtrArray *new = NULL; - GVariantIter * attrs_iter; - GVariantIter iter; + NMDevice *self = NM_DEVICE(dbobj->nmobj); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); + gs_unref_ptrarray GPtrArray *old = NULL; + gs_unref_ptrarray GPtrArray *new = NULL; + GVariantIter *attrs_iter; + GVariantIter iter; new = g_ptr_array_new_with_free_func((GDestroyNotify) nm_lldp_neighbor_unref); if (value) { g_variant_iter_init(&iter, value); while (g_variant_iter_next(&iter, "a{sv}", &attrs_iter)) { - GVariant * attr_variant; - const char * attr_name; + GVariant *attr_variant; + const char *attr_name; NMLldpNeighbor *neigh; /* Note that there is no public API to mutate a NMLldpNeighbor instance. @@ -477,7 +477,7 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) static void set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMDevice * self = NM_DEVICE(object); + NMDevice *self = NM_DEVICE(object); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); gboolean b; @@ -621,7 +621,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_device = NML_DBUS_META_IFACE_INIT static void nm_device_class_init(NMDeviceClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(NMDevicePrivate)); @@ -1247,7 +1247,7 @@ const char * nm_device_get_type_description(NMDevice *device) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(device); - const char * desc, *typename; + const char *desc, *typename; /* BEWARE: this function should return the same value * as nm_device_get_type_description() in nm-core. */ @@ -1296,13 +1296,13 @@ nm_device_get_ports(NMDevice *device) } NMLDBusNotifyUpdatePropFlags -_nm_device_notify_update_prop_hw_address(NMClient * client, - NMLDBusObject * dbobj, +_nm_device_notify_update_prop_hw_address(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMDevice * self = NM_DEVICE(dbobj->nmobj); + NMDevice *self = NM_DEVICE(dbobj->nmobj); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); gboolean is_new = (meta_iface == &_nml_dbus_meta_iface_nm_device); gboolean changed = FALSE; @@ -1360,18 +1360,18 @@ nm_device_get_hw_address(NMDevice *device) } NMLDBusNotifyUpdatePropFlags -_nm_device_notify_update_prop_ports(NMClient * client, - NMLDBusObject * dbobj, +_nm_device_notify_update_prop_ports(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { const NMLDBusMetaProperty *meta_property = &_nml_dbus_meta_iface_nm_device.dbus_properties[_NML_DEVICE_META_PROPERTY_INDEX_PORTS]; NMLDBusNotifyUpdatePropFlags notify_update_prop_flags; - NMDevice * self = NM_DEVICE(dbobj->nmobj); - NMDevicePrivate * priv = NM_DEVICE_GET_PRIVATE(self); - NMDeviceClass * klass; + NMDevice *self = NM_DEVICE(dbobj->nmobj); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); + NMDeviceClass *klass; gboolean is_new = (meta_iface == &_nml_dbus_meta_iface_nm_device); nm_assert(nm_streq(meta_property->dbus_property_name, "Ports")); @@ -1851,10 +1851,10 @@ get_device_generic_type_name_with_iface(NMDevice *device) static const char * get_bus_name(NMDevice *device) { - NMDevicePrivate * priv = NM_DEVICE_GET_PRIVATE(device); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(device); struct udev_device *udevice; - const char * ifname; - const char * bus; + const char *ifname; + const char *bus; if (priv->bus_name) goto out; @@ -1893,17 +1893,17 @@ out: } static char * -_get_udev_property(NMDevice * device, +_get_udev_property(NMDevice *device, const char *enc_prop, /* ID_XXX_ENC */ const char *db_prop) /* ID_XXX_FROM_DATABASE */ { - NMDevicePrivate * priv = NM_DEVICE_GET_PRIVATE(device); + NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(device); struct udev_device *udev_device; struct udev_device *tmpdev; - const char * ifname; + const char *ifname; guint32 count = 0; - char * enc_value = NULL; - char * db_value = NULL; + char *enc_value = NULL; + char *db_value = NULL; if (!priv->udev) return NULL; @@ -1944,7 +1944,7 @@ _get_udev_property(NMDevice * device, } static char * -_get_udev_property_utf8safe(NMDevice * device, +_get_udev_property_utf8safe(NMDevice *device, const char *enc_prop, /* ID_XXX_ENC */ const char *db_prop) /* ID_XXX_FROM_DATABASE */ { @@ -2023,8 +2023,8 @@ static void ensure_description(NMDevice *device) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(device); - GParamSpec * name_prop; - gs_free char * short_product = NULL; + GParamSpec *name_prop; + gs_free char *short_product = NULL; priv->short_vendor = nm_str_realloc(nm_utils_fixup_vendor_string(nm_device_get_vendor(device))); @@ -2133,7 +2133,7 @@ find_duplicates(char **names, gboolean *duplicates, int num_devices) char ** nm_device_disambiguate_names(NMDevice **devices, int num_devices) { - char ** names; + char **names; gboolean *duplicates; int i; @@ -2162,7 +2162,7 @@ nm_device_disambiguate_names(NMDevice **devices, int num_devices) for (i = 0; i < num_devices; i++) { if (duplicates[i]) { const char *bus = get_bus_name(devices[i]); - char * name; + char *name; if (!bus) continue; @@ -2186,7 +2186,7 @@ nm_device_disambiguate_names(NMDevice **devices, int num_devices) for (i = 0; i < num_devices; i++) { if (duplicates[i]) { const char *vendor = get_short_vendor(devices[i]); - char * name; + char *name; if (!vendor) continue; @@ -2207,7 +2207,7 @@ nm_device_disambiguate_names(NMDevice **devices, int num_devices) for (i = 0; i < num_devices; i++) { if (duplicates[i] && NM_IS_DEVICE_BT(devices[i])) { const char *devname = nm_device_bt_get_name(NM_DEVICE_BT(devices[i])); - char * name; + char *name; if (!devname) continue; @@ -2382,12 +2382,12 @@ nm_device_is_software(NMDevice *device) * Deprecated: 1.22: Use nm_device_reapply_async() or GDBusConnection. **/ gboolean -nm_device_reapply(NMDevice * device, +nm_device_reapply(NMDevice *device, NMConnection *connection, guint64 version_id, guint32 flags, GCancellable *cancellable, - GError ** error) + GError **error) { GVariant *arg_connection = NULL; @@ -2434,11 +2434,11 @@ nm_device_reapply(NMDevice * device, * Since: 1.2 **/ void -nm_device_reapply_async(NMDevice * device, - NMConnection * connection, +nm_device_reapply_async(NMDevice *device, + NMConnection *connection, guint64 version_id, guint32 flags, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -2515,16 +2515,16 @@ nm_device_reapply_finish(NMDevice *device, GAsyncResult *result, GError **error) * Deprecated: 1.22: Use nm_device_get_applied_connection_async() or GDBusConnection. **/ NMConnection * -nm_device_get_applied_connection(NMDevice * device, +nm_device_get_applied_connection(NMDevice *device, guint32 flags, - guint64 * version_id, + guint64 *version_id, GCancellable *cancellable, - GError ** error) + GError **error) { gs_unref_variant GVariant *ret = NULL; gs_unref_variant GVariant *v_connection = NULL; guint64 v_version_id; - NMConnection * connection; + NMConnection *connection; g_return_val_if_fail(NM_IS_DEVICE(device), NULL); g_return_val_if_fail(!cancellable || G_IS_CANCELLABLE(cancellable), NULL); @@ -2569,9 +2569,9 @@ nm_device_get_applied_connection(NMDevice * device, * Since: 1.2 **/ void -nm_device_get_applied_connection_async(NMDevice * device, +nm_device_get_applied_connection_async(NMDevice *device, guint32 flags, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -2613,15 +2613,15 @@ nm_device_get_applied_connection_async(NMDevice * device, * Since: 1.2 **/ NMConnection * -nm_device_get_applied_connection_finish(NMDevice * device, +nm_device_get_applied_connection_finish(NMDevice *device, GAsyncResult *result, - guint64 * version_id, - GError ** error) + guint64 *version_id, + GError **error) { gs_unref_variant GVariant *ret = NULL; gs_unref_variant GVariant *v_connection = NULL; guint64 v_version_id; - NMConnection * connection; + NMConnection *connection; g_return_val_if_fail(NM_IS_DEVICE(device), NULL); g_return_val_if_fail(nm_g_task_is_valid(result, device, nm_device_get_applied_connection_async), @@ -2691,8 +2691,8 @@ nm_device_disconnect(NMDevice *device, GCancellable *cancellable, GError **error * manual network connection request. **/ void -nm_device_disconnect_async(NMDevice * device, - GCancellable * cancellable, +nm_device_disconnect_async(NMDevice *device, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -2778,8 +2778,8 @@ nm_device_delete(NMDevice *device, GCancellable *cancellable, GError **error) * be deleted. **/ void -nm_device_delete_async(NMDevice * device, - GCancellable * cancellable, +nm_device_delete_async(NMDevice *device, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -2848,7 +2848,7 @@ static gboolean connection_compatible(NMDevice *device, NMConnection *connection, GError **error) { const char *config_iface, *device_iface; - GError * local = NULL; + GError *local = NULL; if (!nm_connection_verify(connection, &local)) { g_set_error(error, @@ -3114,8 +3114,8 @@ nm_lldp_neighbor_get_attr_names(NMLldpNeighbor *neighbor) **/ gboolean nm_lldp_neighbor_get_attr_string_value(NMLldpNeighbor *neighbor, - const char * name, - const char ** out_value) + const char *name, + const char **out_value) { GVariant *variant; diff --git a/src/libnm-client-impl/nm-dhcp-config.c b/src/libnm-client-impl/nm-dhcp-config.c index c7f9a87a..1f908491 100644 --- a/src/libnm-client-impl/nm-dhcp-config.c +++ b/src/libnm-client-impl/nm-dhcp-config.c @@ -30,21 +30,21 @@ G_DEFINE_ABSTRACT_TYPE(NMDhcpConfig, nm_dhcp_config, NM_TYPE_OBJECT) /*****************************************************************************/ static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_options(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_options(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMDhcpConfig * self = NM_DHCP_CONFIG(dbobj->nmobj); + NMDhcpConfig *self = NM_DHCP_CONFIG(dbobj->nmobj); NMDhcpConfigPrivate *priv = NM_DHCP_CONFIG_GET_PRIVATE(self); g_hash_table_remove_all(priv->options); if (value) { GVariantIter iter; - const char * key; - GVariant * opt; + const char *key; + GVariant *opt; g_variant_iter_init(&iter, value); while (g_variant_iter_next(&iter, "{&sv}", &key, &opt)) { diff --git a/src/libnm-client-impl/nm-dns-manager.c b/src/libnm-client-impl/nm-dns-manager.c index f7c564ff..1fdcdd9b 100644 --- a/src/libnm-client-impl/nm-dns-manager.c +++ b/src/libnm-client-impl/nm-dns-manager.c @@ -23,9 +23,9 @@ G_DEFINE_BOXED_TYPE(NMDnsEntry, nm_dns_entry, nm_dns_entry_dup, nm_dns_entry_unr struct NMDnsEntry { guint refcount; - char * interface; - char ** nameservers; - char ** domains; + char *interface; + char **nameservers; + char **domains; int priority; gboolean vpn; }; @@ -38,7 +38,7 @@ struct NMDnsEntry { * Returns: (transfer full): the new #NMDnsEntry object, or %NULL on error **/ NMDnsEntry * -nm_dns_entry_new(const char * interface, +nm_dns_entry_new(const char *interface, const char *const *nameservers, const char *const *domains, int priority, diff --git a/src/libnm-client-impl/nm-dns-manager.h b/src/libnm-client-impl/nm-dns-manager.h index e6159e61..20a5286e 100644 --- a/src/libnm-client-impl/nm-dns-manager.h +++ b/src/libnm-client-impl/nm-dns-manager.h @@ -12,7 +12,7 @@ #include "nm-client.h" -NMDnsEntry *nm_dns_entry_new(const char * interface, +NMDnsEntry *nm_dns_entry_new(const char *interface, const char *const *nameservers, const char *const *domains, int priority, diff --git a/src/libnm-client-impl/nm-ip-config.c b/src/libnm-client-impl/nm-ip-config.c index 5666888c..2307ce2c 100644 --- a/src/libnm-client-impl/nm-ip-config.c +++ b/src/libnm-client-impl/nm-ip-config.c @@ -31,11 +31,11 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMIPConfig, typedef struct _NMIPConfigPrivate { GPtrArray *addresses; GPtrArray *routes; - char ** nameservers; - char ** domains; - char ** searches; - char ** wins_servers; - char * gateway; + char **nameservers; + char **domains; + char **searches; + char **wins_servers; + char *gateway; bool addresses_new_style : 1; bool routes_new_style : 1; @@ -51,14 +51,14 @@ G_DEFINE_ABSTRACT_TYPE(NMIPConfig, nm_ip_config, NM_TYPE_OBJECT) /*****************************************************************************/ static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_addresses(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_addresses(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMIPConfig * self = NM_IP_CONFIG(dbobj->nmobj); - NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); + NMIPConfig *self = NM_IP_CONFIG(dbobj->nmobj); + NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); gs_unref_ptrarray GPtrArray *addresses_old = NULL; gs_unref_ptrarray GPtrArray *addresses_new = NULL; int addr_family = meta_iface == &_nml_dbus_meta_iface_nm_ip4config ? AF_INET : AF_INET6; @@ -91,14 +91,14 @@ _notify_update_prop_addresses(NMClient * client, } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_routes(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_routes(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMIPConfig * self = NM_IP_CONFIG(dbobj->nmobj); - NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); + NMIPConfig *self = NM_IP_CONFIG(dbobj->nmobj); + NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); gs_unref_ptrarray GPtrArray *routes_old = NULL; gs_unref_ptrarray GPtrArray *routes_new = NULL; int addr_family = meta_iface == &_nml_dbus_meta_iface_nm_ip4config ? AF_INET : AF_INET6; @@ -131,13 +131,13 @@ _notify_update_prop_routes(NMClient * client, } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_nameservers(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_nameservers(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMIPConfig * self = NM_IP_CONFIG(dbobj->nmobj); + NMIPConfig *self = NM_IP_CONFIG(dbobj->nmobj); NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); gs_strfreev char **nameservers_new = NULL; gboolean new_style = TRUE; @@ -160,14 +160,14 @@ _notify_update_prop_nameservers(NMClient * client, else if (!new_style) nameservers_new = nm_utils_ip4_dns_from_variant(value); else { - GVariantIter iter; - GVariantIter * iter_v; + GVariantIter iter; + GVariantIter *iter_v; gs_unref_ptrarray GPtrArray *arr = NULL; g_variant_iter_init(&iter, value); while (g_variant_iter_next(&iter, "a{sv}", &iter_v)) { const char *key; - GVariant * val; + GVariant *val; while (g_variant_iter_next(iter_v, "{&sv}", &key, &val)) { if (nm_streq(key, "address")) { @@ -203,13 +203,13 @@ next: } static NMLDBusNotifyUpdatePropFlags -_notify_update_prop_wins_servers(NMClient * client, - NMLDBusObject * dbobj, +_notify_update_prop_wins_servers(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value) + GVariant *value) { - NMIPConfig * self = NM_IP_CONFIG(dbobj->nmobj); + NMIPConfig *self = NM_IP_CONFIG(dbobj->nmobj); NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE(self); gs_strfreev char **wins_servers_new = NULL; gboolean new_style; diff --git a/src/libnm-client-impl/nm-libnm-utils.c b/src/libnm-client-impl/nm-libnm-utils.c index 4543eaa1..d3d429eb 100644 --- a/src/libnm-client-impl/nm-libnm-utils.c +++ b/src/libnm-client-impl/nm-libnm-utils.c @@ -42,9 +42,9 @@ void _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...) { NMLDBusLogLevel configured_log_level; - gs_free char * msg = NULL; + gs_free char *msg = NULL; va_list args; - const char * prefix = ""; + const char *prefix = ""; gint64 ts; pid_t pid; @@ -116,7 +116,7 @@ char * nm_utils_wincaps_to_dash(const char *caps) { const char *p; - GString * str; + GString *str; str = g_string_new(NULL); p = caps; @@ -136,14 +136,14 @@ nm_utils_wincaps_to_dash(const char *caps) /*****************************************************************************/ static char * -_fixup_string(const char * desc, +_fixup_string(const char *desc, const char *const *ignored_phrases, const char *const *ignored_words, gboolean square_brackets_sensible) { - char * desc_full; + char *desc_full; gboolean in_paren = FALSE; - char * p, *q; + char *p, *q; int i; if (!desc || !desc[0]) @@ -727,7 +727,7 @@ static int _strcmp_common_prefix(gconstpointer a, gconstpointer b, gpointer user_data) { const NMLDBusMetaIface *iface = a; - const char * dbus_iface_name = b; + const char *dbus_iface_name = b; nm_assert(g_str_has_prefix(iface->dbus_iface_name, COMMON_PREFIX)); @@ -765,8 +765,8 @@ nml_dbus_meta_iface_get(const char *dbus_iface_name) const NMLDBusMetaProperty * nml_dbus_meta_property_get(const NMLDBusMetaIface *meta_iface, - const char * dbus_property_name, - guint * out_idx) + const char *dbus_property_name, + guint *out_idx) { gssize idx; @@ -788,7 +788,7 @@ nml_dbus_meta_property_get(const NMLDBusMetaIface *meta_iface, } void -_nml_dbus_meta_class_init_with_properties_impl(GObjectClass * object_class, +_nml_dbus_meta_class_init_with_properties_impl(GObjectClass *object_class, const NMLDBusMetaIface *const *meta_ifaces) { int i_iface; @@ -799,7 +799,7 @@ _nml_dbus_meta_class_init_with_properties_impl(GObjectClass * ob for (i_iface = 0; meta_ifaces[i_iface]; i_iface++) { const NMLDBusMetaIface *meta_iface = meta_ifaces[i_iface]; - guint8 * reverse_idx; + guint8 *reverse_idx; guint8 i; nm_assert(g_type_is_a(meta_iface->get_type_fcn(), G_OBJECT_CLASS_TYPE(object_class))); diff --git a/src/libnm-client-impl/nm-libnm-utils.h b/src/libnm-client-impl/nm-libnm-utils.h index 75e87064..db5f31ea 100644 --- a/src/libnm-client-impl/nm-libnm-utils.h +++ b/src/libnm-client-impl/nm-libnm-utils.h @@ -179,13 +179,13 @@ GQuark nm_context_busy_watcher_quark(void); void nm_context_busy_watcher_integrate_source(GMainContext *outer_context, GMainContext *inner_context, - GObject * context_busy_watcher); + GObject *context_busy_watcher); /*****************************************************************************/ typedef struct { GCancellable *cancellable; - GSource * cancel_on_idle_source; + GSource *cancel_on_idle_source; gulong cancelled_id; union { struct { @@ -193,7 +193,7 @@ typedef struct { } async; struct { GMainLoop *main_loop; - GError ** error_location; + GError **error_location; } sync; } data; bool is_sync : 1; @@ -206,7 +206,7 @@ NMLInitData *nml_init_data_new_async(GCancellable *cancellable, GTask *task_take void nml_init_data_return(NMLInitData *init_data, GError *error_take); -void nml_cleanup_context_busy_watcher_on_idle(GObject * context_busy_watcher_take, +void nml_cleanup_context_busy_watcher_on_idle(GObject *context_busy_watcher_take, GMainContext *context); /*****************************************************************************/ @@ -244,9 +244,9 @@ typedef struct { } NMLDBusPropertVTableO; struct _NMLDBusPropertyO { - NMLDBusObject * owner_dbobj; - NMLDBusObjWatcher * obj_watcher; - GObject * nmobj; + NMLDBusObject *owner_dbobj; + NMLDBusObjWatcher *obj_watcher; + GObject *nmobj; const NMLDBusMetaIface *meta_iface; guint dbus_property_idx; bool is_ready : 1; @@ -272,8 +272,8 @@ typedef struct { GType (*get_o_type_fcn)(void); void (*notify_changed_ao)(NMLDBusPropertyAO *pr_ao, - NMClient * self, - NMObject * nmobj, + NMClient *self, + NMObject *nmobj, gboolean is_added /* or else removed */); gboolean (*check_nmobj_visible_fcn)(GObject *nmobj); @@ -289,10 +289,10 @@ struct _NMLDBusPropertyAOData; struct _NMLDBusPropertyAO { CList data_lst_head; - GHashTable * hash; - NMLDBusObject * owner_dbobj; - const NMLDBusMetaIface * meta_iface; - GPtrArray * arr; + GHashTable *hash; + NMLDBusObject *owner_dbobj; + const NMLDBusMetaIface *meta_iface; + GPtrArray *arr; struct _NMLDBusPropertyAOData *changed_head; guint dbus_property_idx; guint n_not_ready; @@ -316,34 +316,34 @@ typedef enum { NML_DBUS_NOTIFY_UPDATE_PROP_FLAGS_NOTIFY = 0x1, } NMLDBusNotifyUpdatePropFlags; -NMLDBusNotifyUpdatePropFlags _nml_dbus_notify_update_prop_ignore(NMClient * client, - NMLDBusObject * dbobj, +NMLDBusNotifyUpdatePropFlags _nml_dbus_notify_update_prop_ignore(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, GVariant *value); -NMLDBusNotifyUpdatePropFlags _nml_dbus_notify_update_prop_o(NMClient * client, - NMLDBusObject * dbobj, +NMLDBusNotifyUpdatePropFlags _nml_dbus_notify_update_prop_o(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, GVariant *value); -NMLDBusNotifyUpdatePropFlags nml_dbus_property_ao_notify(NMClient * self, - NMLDBusPropertyAO * pr_ao, - NMLDBusObject * dbobj, +NMLDBusNotifyUpdatePropFlags nml_dbus_property_ao_notify(NMClient *self, + NMLDBusPropertyAO *pr_ao, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value); + GVariant *value); typedef struct { - const char * dbus_property_name; + const char *dbus_property_name; const GVariantType *dbus_type; - NMLDBusNotifyUpdatePropFlags (*notify_update_prop)(NMClient * client, - NMLDBusObject * dbobj, + NMLDBusNotifyUpdatePropFlags (*notify_update_prop)(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value); + GVariant *value); guint16 prop_struct_offset; @@ -352,7 +352,7 @@ typedef struct { bool obj_property_no_reverse_idx : 1; union { - const NMLDBusPropertVTableO * property_vtable_o; + const NMLDBusPropertVTableO *property_vtable_o; const NMLDBusPropertVTableAO *property_vtable_ao; } extra; @@ -475,9 +475,9 @@ struct _NMLDBusMetaIface { * assert (meta_iface->dbus_properties[d_idx].obj_properties_idx == o_idx) * if (and only if) two properties correspond. */ - const GParamSpec *const * obj_properties; + const GParamSpec *const *obj_properties; const NMLDBusMetaProperty *dbus_properties; - const guint8 * obj_properties_reverse_idx; + const guint8 *obj_properties_reverse_idx; guint8 n_dbus_properties; guint8 n_obj_properties; @@ -610,10 +610,10 @@ extern const NMLDBusMetaIface _nml_dbus_meta_iface_nm_wifip2ppeer; const NMLDBusMetaIface *nml_dbus_meta_iface_get(const char *dbus_iface_name); const NMLDBusMetaProperty *nml_dbus_meta_property_get(const NMLDBusMetaIface *meta_iface, - const char * dbus_property_name, - guint * out_idx); + const char *dbus_property_name, + guint *out_idx); -void _nml_dbus_meta_class_init_with_properties_impl(GObjectClass * object_class, +void _nml_dbus_meta_class_init_with_properties_impl(GObjectClass *object_class, const NMLDBusMetaIface *const *meta_iface); #define _nml_dbus_meta_class_init_with_properties(object_class, ...) \ _nml_dbus_meta_class_init_with_properties_impl( \ @@ -682,8 +682,8 @@ void nml_dbus_object_unref(NMLDBusObject *dbobj); NM_AUTO_DEFINE_FCN0(NMLDBusObject *, _nm_auto_unref_nml_dbusobj, nml_dbus_object_unref); #define nm_auto_unref_nml_dbusobj nm_auto(_nm_auto_unref_nml_dbusobj) -gpointer nml_dbus_object_get_property_location(NMLDBusObject * dbobj, - const NMLDBusMetaIface * meta_iface, +gpointer nml_dbus_object_get_property_location(NMLDBusObject *dbobj, + const NMLDBusMetaIface *meta_iface, const NMLDBusMetaProperty *meta_property); /*****************************************************************************/ @@ -713,7 +713,7 @@ struct _NMObject { typedef struct _NMObjectClassFieldInfo { const struct _NMObjectClassFieldInfo *parent; - NMObjectClass * klass; + NMObjectClass *klass; guint16 offset; guint16 num; } _NMObjectClassFieldInfo; @@ -926,14 +926,14 @@ struct _NMClientNotifyEvent { int priority; }; -gpointer _nm_client_notify_event_queue(NMClient * self, +gpointer _nm_client_notify_event_queue(NMClient *self, int priority, NMClientNotifyEventCb callback, gsize event_size); typedef struct _NMClientNotifyEventWithPtr NMClientNotifyEventWithPtr; -typedef void (*NMClientNotifyEventWithPtrCb)(NMClient * self, +typedef void (*NMClientNotifyEventWithPtrCb)(NMClient *self, NMClientNotifyEventWithPtr *notify_event); struct _NMClientNotifyEventWithPtr { @@ -942,13 +942,13 @@ struct _NMClientNotifyEventWithPtr { }; NMClientNotifyEventWithPtr * -_nm_client_notify_event_queue_with_ptr(NMClient * self, +_nm_client_notify_event_queue_with_ptr(NMClient *self, int priority, NMClientNotifyEventWithPtrCb callback, gpointer user_data); void _nm_client_notify_event_queue_emit_obj_signal(NMClient *self, - GObject * source, + GObject *source, NMObject *nmobj, gboolean is_added /* or else removed */, int prio_offset, @@ -959,57 +959,57 @@ void _nm_client_notify_event_queue_emit_obj_signal(NMClient *self, GError *_nm_client_new_error_nm_not_running(void); GError *_nm_client_new_error_nm_not_cached(void); -void _nm_client_dbus_call_simple(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +void _nm_client_dbus_call_simple(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, GAsyncReadyCallback callback, gpointer user_data); -void _nm_client_dbus_call(NMClient * self, +void _nm_client_dbus_call(NMClient *self, gpointer source_obj, gpointer source_tag, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback user_callback, gpointer user_callback_data, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, GAsyncReadyCallback internal_callback); -GVariant *_nm_client_dbus_call_sync(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +GVariant *_nm_client_dbus_call_sync(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, gboolean strip_dbus_error, - GError ** error); - -gboolean _nm_client_dbus_call_sync_void(NMClient * self, - GCancellable * cancellable, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, + GError **error); + +gboolean _nm_client_dbus_call_sync_void(NMClient *self, + GCancellable *cancellable, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusCallFlags flags, int timeout_msec, gboolean strip_dbus_error, - GError ** error); + GError **error); -void _nm_client_set_property_sync_legacy(NMClient * self, +void _nm_client_set_property_sync_legacy(NMClient *self, const char *object_path, const char *interface, const char *prop_name, @@ -1034,14 +1034,14 @@ void _nm_vpn_connection_state_changed_commit(NMVpnConnection *self, guint32 stat /*****************************************************************************/ NMLDBusNotifyUpdatePropFlags -_nm_device_notify_update_prop_hw_address(NMClient * client, - NMLDBusObject * dbobj, +_nm_device_notify_update_prop_hw_address(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, - GVariant * value); + GVariant *value); -NMLDBusNotifyUpdatePropFlags _nm_device_notify_update_prop_ports(NMClient * client, - NMLDBusObject * dbobj, +NMLDBusNotifyUpdatePropFlags _nm_device_notify_update_prop_ports(NMClient *client, + NMLDBusObject *dbobj, const NMLDBusMetaIface *meta_iface, guint dbus_property_idx, GVariant *value); diff --git a/src/libnm-client-impl/nm-object.c b/src/libnm-client-impl/nm-object.c index ae48853b..60b01ca8 100644 --- a/src/libnm-client-impl/nm-object.c +++ b/src/libnm-client-impl/nm-object.c @@ -24,7 +24,7 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_PATH, PROP_CLIENT, ); typedef struct _NMObjectPrivate { - NMClient * client; + NMClient *client; NMLDBusObject *dbobj; } NMObjectPrivate; @@ -117,7 +117,7 @@ nm_object_get_client(NMObject *object) static void clear_properties(NMObject *self, NMClient *client) { - NMObjectClass * klass = NM_OBJECT_GET_CLASS(self); + NMObjectClass *klass = NM_OBJECT_GET_CLASS(self); const _NMObjectClassFieldInfo *p; nm_assert(NM_IS_OBJECT(self)); @@ -141,8 +141,8 @@ clear_properties(NMObject *self, NMClient *client) static gboolean is_ready(NMObject *self) { - NMObjectClass * klass = NM_OBJECT_GET_CLASS(self); - NMClient * client = _nm_object_get_client(self); + NMObjectClass *klass = NM_OBJECT_GET_CLASS(self); + NMClient *client = _nm_object_get_client(self); const _NMObjectClassFieldInfo *p; guint16 i; @@ -172,8 +172,8 @@ is_ready(NMObject *self) static void obj_changed_notify(NMObject *self) { - NMObjectClass * klass = NM_OBJECT_GET_CLASS(self); - NMClient * client = _nm_object_get_client(self); + NMObjectClass *klass = NM_OBJECT_GET_CLASS(self); + NMClient *client = _nm_object_get_client(self); const _NMObjectClassFieldInfo *p; nm_assert(NM_IS_CLIENT(client)); @@ -245,7 +245,7 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) static void nm_object_init(NMObject *object) { - NMObject * self = NM_OBJECT(object); + NMObject *self = NM_OBJECT(object); NMObjectPrivate *priv; priv = G_TYPE_INSTANCE_GET_PRIVATE(self, NM_TYPE_OBJECT, NMObjectPrivate); @@ -262,7 +262,7 @@ nm_object_init(NMObject *object) static void dispose(GObject *object) { - NMObject * self = NM_OBJECT(object); + NMObject *self = NM_OBJECT(object); NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE(self); if (!self->obj_base.is_disposing) { diff --git a/src/libnm-client-impl/nm-property-infos-dbus.xml b/src/libnm-client-impl/nm-property-infos-dbus.xml index 009e1274..25c9c728 100644 --- a/src/libnm-client-impl/nm-property-infos-dbus.xml +++ b/src/libnm-client-impl/nm-property-infos-dbus.xml @@ -1,127 +1,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/libnm-client-impl/nm-property-infos-ifcfg-rh.xml b/src/libnm-client-impl/nm-property-infos-ifcfg-rh.xml index 15950eb8..91d04e13 100644 --- a/src/libnm-client-impl/nm-property-infos-ifcfg-rh.xml +++ b/src/libnm-client-impl/nm-property-infos-ifcfg-rh.xml @@ -1,339 +1,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/libnm-client-impl/nm-property-infos-keyfile.xml b/src/libnm-client-impl/nm-property-infos-keyfile.xml index 78a7fc0b..c6021c1c 100644 --- a/src/libnm-client-impl/nm-property-infos-keyfile.xml +++ b/src/libnm-client-impl/nm-property-infos-keyfile.xml @@ -1,128 +1,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/libnm-client-impl/nm-property-infos-nmcli.xml b/src/libnm-client-impl/nm-property-infos-nmcli.xml index a234f3ce..3d067745 100644 --- a/src/libnm-client-impl/nm-property-infos-nmcli.xml +++ b/src/libnm-client-impl/nm-property-infos-nmcli.xml @@ -1,80 +1,180 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +A list of IPv4 destination addresses, prefix length, optional IPv4 +next hop addresses, optional route metric, optional attribute. The valid syntax is: +"ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". +For example "192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24". + + +Various attributes are supported: + + +"cwnd" - an unsigned 32 bit integer. + + +"initcwnd" - an unsigned 32 bit integer. + + +"initrwnd" - an unsigned 32 bit integer. + + +"lock-cwnd" - a boolean value. + + +"lock-initcwnd" - a boolean value. + + +"lock-initrwnd" - a boolean value. + + +"lock-mtu" - a boolean value. + + +"lock-window" - a boolean value. + + +"mtu" - an unsigned 32 bit integer. + + +"onlink" - a boolean value. + + +"scope" - an unsigned 8 bit integer. IPv4 only. + + +"src" - an IPv4 address. + + +"table" - an unsigned 32 bit integer. The default depends on ipv4.route-table. + + +"tos" - an unsigned 8 bit integer. IPv4 only. + + +"type" - one of unicast, local, blackhole, +unavailable, prohibit. The default is unicast. + + +"window" - an unsigned 32 bit integer. + + + + +For details see also `man ip-route`. + + +A comma separated list of routing rules for policy routing. The format +is based on ip rule add syntax and mostly compatible. +One difference is that routing rules in NetworkManager always need a +fixed priority. + + +Example: priority 5 from 192.167.4.0/24 table 45 + + + +A list of IPv6 destination addresses, prefix length, optional IPv6 +next hop addresses, optional route metric, optional attribute. The valid syntax is: +"ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]". + + +Various attributes are supported: + + +"cwnd" - an unsigned 32 bit integer. + + +"from" - an IPv6 address with optional prefix. IPv6 only. + + +"initcwnd" - an unsigned 32 bit integer. + + +"initrwnd" - an unsigned 32 bit integer. + + +"lock-cwnd" - a boolean value. + + +"lock-initcwnd" - a boolean value. + + +"lock-initrwnd" - a boolean value. + + +"lock-mtu" - a boolean value. + + +"lock-window" - a boolean value. + + +"mtu" - an unsigned 32 bit integer. + + +"onlink" - a boolean value. + + +"src" - an IPv6 address. + + +"table" - an unsigned 32 bit integer. The default depends on ipv6.route-table. + + +"type" - one of unicast, local, blackhole, +unavailable, prohibit. The default is unicast. + + +"window" - an unsigned 32 bit integer. + + + + +For details see also `man ip-route`. + + +A comma separated list of routing rules for policy routing. The format +is based on ip rule add syntax and mostly compatible. +One difference is that routing rules in NetworkManager always need a +fixed priority. + + +Example: priority 5 from 1:2:3::5/128 table 45 + + + + + + + + + + + + + + + + + Array of TC queueing disciplines. qdisc is a basic block in the Linux traffic control subsystem @@ -84,9 +184,7 @@ Each qdisc can be specified by the following attributes: - -handle HANDLE - +handle HANDLE specifies the qdisc handle. A qdisc, which potentially can have children, gets @@ -97,9 +195,7 @@ explicitly assign a handle to qdiscs expected to have children. - -parent HANDLE - +parent HANDLE specifies the handle of the parent qdisc the current qdisc must be @@ -108,9 +204,7 @@ attached to. - -root - +root specifies that the qdisc is attached to the root of device. @@ -118,9 +212,7 @@ specifies that the qdisc is attached to the root of device. - -KIND - +KIND this is the qdisc kind. NetworkManager currently supports the @@ -137,9 +229,7 @@ Parameters for 'fq_codel': - -limit U32 - +limit U32 the hard limit on the real queue size. When this limit is @@ -148,9 +238,7 @@ reached, incoming packets are dropped. Default is 10240 packets. - -memory_limit U32 - +memory_limit U32 sets a limit on the total number of bytes that can be queued in @@ -161,9 +249,7 @@ limit parameter and the memory limit will be enforced. Default is - -flows U32 - +flows U32 the number of flows into which the incoming packets are @@ -176,9 +262,7 @@ Default value is 1024. - -target U32 - +target U32 the acceptable minimum standing/persistent queue delay. This minimum @@ -188,9 +272,7 @@ experience. The unit of measurement is microsecond(us). Default value is 5ms. - -interval U32 - +interval U32 used to ensure that the measured minimum delay does not become too stale. @@ -202,9 +284,7 @@ react. Default value is 100ms. - -quantum U32 - +quantum U32 the number of bytes used as 'deficit' in the fair queuing @@ -214,9 +294,7 @@ Ethernet MTU plus the hardware header length of 14 bytes. - -ecn BOOL - +ecn BOOL can be used to mark packets instead of dropping them. ecn is turned @@ -225,9 +303,7 @@ on by default. - -ce_threshold U32 - +ce_threshold U32 sets a threshold above which all packets are marked with ECN @@ -243,9 +319,7 @@ Parameters for 'sfq': - -divisor U32 - +divisor U32 can be used to set a different hash table size, available @@ -256,9 +330,7 @@ value: 1024. - -limit U32 - +limit U32 Upper limit of the SFQ. Can be used to reduce the default @@ -267,9 +339,7 @@ length of 127 packets. - -depth U32 - +depth U32 Limit of packets per flow. Default to @@ -278,9 +348,7 @@ Limit of packets per flow. Default to - -perturb_period U32 - +perturb_period U32 Interval in seconds for queue algorithm perturbation. @@ -294,9 +362,7 @@ collisions. - -quantum U32 - +quantum U32 Amount of bytes a flow is allowed to dequeue during a @@ -307,9 +373,7 @@ minimum value. - -flows U32 - +flows U32 Default value is 127. @@ -322,9 +386,7 @@ Parameters for 'tbf': - -rate U64 - +rate U64 Bandwidth or rate. These parameters accept a floating @@ -336,9 +398,7 @@ device's speed. - -burst U32 - +burst U32 Also known as buffer or maxburst. Size of the bucket, in @@ -365,9 +425,7 @@ have to set this. Must be an integral power of 2. - -limit U32 - +limit U32 Limit is the number of bytes that can be queued waiting @@ -376,9 +434,7 @@ for tokens to become available. - -latency U32 - +latency U32 specifies the maximum amount of time a packet can @@ -388,11 +444,7 @@ the size of the bucket, the rate and possibly the peakrate - - - - - + Array of TC traffic filters. Traffic control can manage the packet content during classification by using filters. @@ -402,9 +454,7 @@ Each tfilters can be specified by the following attributes: - -handle HANDLE - +handle HANDLE specifies the tfilters handle. A filter is used by a classful qdisc to determine in which class @@ -414,9 +464,7 @@ see qdiscs handle for detailed information. - -parent HANDLE - +parent HANDLE specifies the handle of the parent qdisc the current qdisc must be @@ -425,9 +473,7 @@ attached to. - -root - +root specifies that the qdisc is attached to the root of device. @@ -435,9 +481,7 @@ specifies that the qdisc is attached to the root of device. - -KIND - +KIND this is the tfilters kind. NetworkManager currently supports @@ -453,9 +497,7 @@ Actions for 'mirred': - -egress bool - +egress bool Define whether the packet should exit from the interface. @@ -463,9 +505,7 @@ Define whether the packet should exit from the interface. - -ingress bool - +ingress bool Define whether the packet should come into the interface. @@ -473,9 +513,7 @@ Define whether the packet should come into the interface. - -mirror bool - +mirror bool Define whether the packet should be copied to the destination space. @@ -483,9 +521,7 @@ Define whether the packet should be copied to the destination space. - -redirect bool - +redirect bool Define whether the packet should be moved to the destination space. @@ -498,49 +534,27 @@ Action for 'simple': - -sdata char[32] - +sdata char[32] The actual string to print. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/libnm-client-impl/nm-remote-connection.c b/src/libnm-client-impl/nm-remote-connection.c index 8e36cf6d..efc4dbfb 100644 --- a/src/libnm-client-impl/nm-remote-connection.c +++ b/src/libnm-client-impl/nm-remote-connection.c @@ -36,7 +36,7 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMRemoteConnection, typedef struct { GCancellable *get_settings_cancellable; - char * filename; + char *filename; guint32 flags; bool unsaved; @@ -81,11 +81,11 @@ G_DEFINE_TYPE_WITH_CODE(NMRemoteConnection, * Since: 1.12 **/ void -nm_remote_connection_update2(NMRemoteConnection * connection, - GVariant * settings, +nm_remote_connection_update2(NMRemoteConnection *connection, + GVariant *settings, NMSettingsUpdate2Flags flags, - GVariant * args, - GCancellable * cancellable, + GVariant *args, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -128,11 +128,11 @@ nm_remote_connection_update2(NMRemoteConnection * connection, **/ GVariant * nm_remote_connection_update2_finish(NMRemoteConnection *connection, - GAsyncResult * result, - GError ** error) + GAsyncResult *result, + GError **error) { gs_unref_variant GVariant *ret = NULL; - GVariant * v_result; + GVariant *v_result; g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), NULL); g_return_val_if_fail(nm_g_task_is_valid(result, connection, nm_remote_connection_update2), @@ -167,8 +167,8 @@ nm_remote_connection_update2_finish(NMRemoteConnection *connection, gboolean nm_remote_connection_commit_changes(NMRemoteConnection *connection, gboolean save_to_disk, - GCancellable * cancellable, - GError ** error) + GCancellable *cancellable, + GError **error) { gs_unref_variant GVariant *ret = NULL; @@ -213,7 +213,7 @@ nm_remote_connection_commit_changes(NMRemoteConnection *connection, void nm_remote_connection_commit_changes_async(NMRemoteConnection *connection, gboolean save_to_disk, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -242,8 +242,8 @@ nm_remote_connection_commit_changes_async(NMRemoteConnection *connection, **/ gboolean nm_remote_connection_commit_changes_finish(NMRemoteConnection *connection, - GAsyncResult * result, - GError ** error) + GAsyncResult *result, + GError **error) { gs_unref_variant GVariant *v_result = NULL; @@ -296,7 +296,7 @@ nm_remote_connection_save(NMRemoteConnection *connection, GCancellable *cancella **/ void nm_remote_connection_save_async(NMRemoteConnection *connection, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -331,8 +331,8 @@ nm_remote_connection_save_async(NMRemoteConnection *connection, **/ gboolean nm_remote_connection_save_finish(NMRemoteConnection *connection, - GAsyncResult * result, - GError ** error) + GAsyncResult *result, + GError **error) { g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), FALSE); g_return_val_if_fail(nm_g_task_is_valid(result, connection, nm_remote_connection_save_async), @@ -357,8 +357,8 @@ nm_remote_connection_save_finish(NMRemoteConnection *connection, **/ gboolean nm_remote_connection_delete(NMRemoteConnection *connection, - GCancellable * cancellable, - GError ** error) + GCancellable *cancellable, + GError **error) { g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), FALSE); @@ -385,7 +385,7 @@ nm_remote_connection_delete(NMRemoteConnection *connection, **/ void nm_remote_connection_delete_async(NMRemoteConnection *connection, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -420,8 +420,8 @@ nm_remote_connection_delete_async(NMRemoteConnection *connection, **/ gboolean nm_remote_connection_delete_finish(NMRemoteConnection *connection, - GAsyncResult * result, - GError ** error) + GAsyncResult *result, + GError **error) { g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), FALSE); g_return_val_if_fail(nm_g_task_is_valid(result, connection, nm_remote_connection_delete_async), @@ -447,12 +447,12 @@ nm_remote_connection_delete_finish(NMRemoteConnection *connection, **/ GVariant * nm_remote_connection_get_secrets(NMRemoteConnection *connection, - const char * setting_name, - GCancellable * cancellable, - GError ** error) + const char *setting_name, + GCancellable *cancellable, + GError **error) { gs_unref_variant GVariant *ret = NULL; - GVariant * secrets; + GVariant *secrets; g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), NULL); g_return_val_if_fail(setting_name, NULL); @@ -489,8 +489,8 @@ nm_remote_connection_get_secrets(NMRemoteConnection *connection, **/ void nm_remote_connection_get_secrets_async(NMRemoteConnection *connection, - const char * setting_name, - GCancellable * cancellable, + const char *setting_name, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -527,11 +527,11 @@ nm_remote_connection_get_secrets_async(NMRemoteConnection *connection, **/ GVariant * nm_remote_connection_get_secrets_finish(NMRemoteConnection *connection, - GAsyncResult * result, - GError ** error) + GAsyncResult *result, + GError **error) { gs_unref_variant GVariant *ret = NULL; - GVariant * secrets; + GVariant *secrets; g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), NULL); g_return_val_if_fail( @@ -635,7 +635,7 @@ void _nm_remote_settings_get_settings_commit(NMRemoteConnection *self, GVariant *settings) { NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE(self); - GError * error = NULL; + GError *error = NULL; gboolean visible = FALSE; gboolean changed = FALSE; @@ -761,7 +761,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_settings_connection = NML_DBUS_ME static void nm_remote_connection_class_init(NMRemoteConnectionClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMObjectClass *nm_object_class = NM_OBJECT_CLASS(klass); object_class->get_property = get_property; diff --git a/src/libnm-client-impl/nm-secret-agent-old.c b/src/libnm-client-impl/nm-secret-agent-old.c index 881dfd54..93475ed3 100644 --- a/src/libnm-client-impl/nm-secret-agent-old.c +++ b/src/libnm-client-impl/nm-secret-agent-old.c @@ -23,8 +23,8 @@ /*****************************************************************************/ typedef struct { - char * connection_path; - char * setting_name; + char *connection_path; + char *setting_name; GDBusMethodInvocation *context; CList gsi_lst; bool is_cancelling : 1; @@ -39,12 +39,12 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMSecretAgentOld, typedef struct { GDBusConnection *dbus_connection; - GMainContext * main_context; - GMainContext * dbus_context; - GObject * context_busy_watcher; - GCancellable * name_owner_cancellable; - GCancellable * registering_cancellable; - GSource * registering_retry_source; + GMainContext *main_context; + GMainContext *dbus_context; + GObject *context_busy_watcher; + GCancellable *name_owner_cancellable; + GCancellable *registering_cancellable; + GSource *registering_retry_source; NMLInitData *init_data; @@ -289,7 +289,7 @@ static void get_secret_info_complete_and_free_error(GetSecretsInfo *info, GQuark error_domain, int error_code, - const char * error_message) + const char *error_message) { g_dbus_method_invocation_return_error_literal(g_steal_pointer(&info->context), error_domain, @@ -312,16 +312,16 @@ _dbus_connection_call_cb(GObject *source, GAsyncResult *result, gpointer user_da } static void -_dbus_connection_call(NMSecretAgentOld * self, - const char * bus_name, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_dbus_connection_call(NMSecretAgentOld *self, + const char *bus_name, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, const GVariantType *reply_type, GDBusCallFlags flags, int timeout_msec, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -350,8 +350,8 @@ _dbus_connection_call(NMSecretAgentOld * self, static GetSecretsInfo * find_get_secrets_info(NMSecretAgentOldPrivate *priv, - const char * connection_path, - const char * setting_name) + const char *connection_path, + const char *setting_name) { GetSecretsInfo *info; @@ -385,15 +385,15 @@ _cancel_get_secret_request(NMSecretAgentOld *self, GetSecretsInfo *info, const c } static gboolean -verify_request(NMSecretAgentOld * self, +verify_request(NMSecretAgentOld *self, GDBusMethodInvocation *context, - GVariant * connection_dict, - const char * connection_path, - NMConnection ** out_connection, - GError ** error) + GVariant *connection_dict, + const char *connection_path, + NMConnection **out_connection, + GError **error) { gs_unref_object NMConnection *connection = NULL; - gs_free_error GError *local = NULL; + gs_free_error GError *local = NULL; if (!nm_dbus_path_not_empty(connection_path)) { g_set_error_literal(error, @@ -422,9 +422,9 @@ verify_request(NMSecretAgentOld * self, static void get_secrets_cb(NMSecretAgentOld *self, - NMConnection * connection, - GVariant * secrets, - GError * error, + NMConnection *connection, + GVariant *secrets, + GError *error, gpointer user_data) { GetSecretsInfo *info = user_data; @@ -446,15 +446,15 @@ get_secrets_cb(NMSecretAgentOld *self, static void impl_get_secrets(NMSecretAgentOld *self, GVariant *parameters, GDBusMethodInvocation *context) { - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - GError * error = NULL; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + GError *error = NULL; gs_unref_object NMConnection *connection = NULL; - GetSecretsInfo * info; - gs_unref_variant GVariant *arg_connection = NULL; - const char * arg_connection_path; - const char * arg_setting_name; - gs_free const char ** arg_hints = NULL; - guint32 arg_flags; + GetSecretsInfo *info; + gs_unref_variant GVariant *arg_connection = NULL; + const char *arg_connection_path; + const char *arg_setting_name; + gs_free const char **arg_hints = NULL; + guint32 arg_flags; g_variant_get(parameters, "(@a{sa{sv}}&o&s^a&su)", @@ -494,14 +494,14 @@ impl_get_secrets(NMSecretAgentOld *self, GVariant *parameters, GDBusMethodInvoca } static void -impl_cancel_get_secrets(NMSecretAgentOld * self, - GVariant * parameters, +impl_cancel_get_secrets(NMSecretAgentOld *self, + GVariant *parameters, GDBusMethodInvocation *context) { NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - GetSecretsInfo * info; - const char * arg_connection_path; - const char * arg_setting_name; + GetSecretsInfo *info; + const char *arg_connection_path; + const char *arg_setting_name; g_variant_get(parameters, "(&o&s)", &arg_connection_path, &arg_setting_name); @@ -534,10 +534,10 @@ save_secrets_cb(NMSecretAgentOld *self, NMConnection *connection, GError *error, static void impl_save_secrets(NMSecretAgentOld *self, GVariant *parameters, GDBusMethodInvocation *context) { - gs_unref_object NMConnection *connection = NULL; - gs_unref_variant GVariant *arg_connection = NULL; - const char * arg_connection_path; - GError * error = NULL; + gs_unref_object NMConnection *connection = NULL; + gs_unref_variant GVariant *arg_connection = NULL; + const char *arg_connection_path; + GError *error = NULL; g_variant_get(parameters, "(@a{sa{sv}}&o)", &arg_connection, &arg_connection_path); @@ -557,8 +557,8 @@ impl_save_secrets(NMSecretAgentOld *self, GVariant *parameters, GDBusMethodInvoc static void delete_secrets_cb(NMSecretAgentOld *self, - NMConnection * connection, - GError * error, + NMConnection *connection, + GError *error, gpointer user_data) { GDBusMethodInvocation *context = user_data; @@ -572,10 +572,10 @@ delete_secrets_cb(NMSecretAgentOld *self, static void impl_delete_secrets(NMSecretAgentOld *self, GVariant *parameters, GDBusMethodInvocation *context) { - gs_unref_object NMConnection *connection = NULL; - gs_unref_variant GVariant *arg_connection = NULL; - const char * arg_connection_path; - GError * error = NULL; + gs_unref_object NMConnection *connection = NULL; + gs_unref_variant GVariant *arg_connection = NULL; + const char *arg_connection_path; + GError *error = NULL; g_variant_get(parameters, "(@a{sa{sv}}&o)", &arg_connection, &arg_connection_path); @@ -739,13 +739,13 @@ nm_secret_agent_old_register(NMSecretAgentOld *self, GCancellable *cancellable, static void _register_cancelled_cb(GObject *object, gpointer user_data) { - GTask * task0 = user_data; - gs_unref_object GTask * task = NULL; - NMSecretAgentOld * self = g_task_get_source_object(task0); - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - gulong * p_cancelled_id; - NMCListElem * elem; - gs_free_error GError *error = NULL; + GTask *task0 = user_data; + gs_unref_object GTask *task = NULL; + NMSecretAgentOld *self = g_task_get_source_object(task0); + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + gulong *p_cancelled_id; + NMCListElem *elem; + gs_free_error GError *error = NULL; elem = nm_c_list_elem_find_first(&priv->pending_tasks_register_lst_head, x, x == task0); @@ -786,8 +786,8 @@ _register_cancelled_cb(GObject *object, gpointer user_data) * you want to check and ensure that the agent is registered. **/ void -nm_secret_agent_old_register_async(NMSecretAgentOld * self, - GCancellable * cancellable, +nm_secret_agent_old_register_async(NMSecretAgentOld *self, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -906,8 +906,8 @@ nm_secret_agent_old_unregister(NMSecretAgentOld *self, GCancellable *cancellable * Deprecated: 1.24: Use nm_secret_agent_old_enable(). **/ void -nm_secret_agent_old_unregister_async(NMSecretAgentOld * self, - GCancellable * cancellable, +nm_secret_agent_old_unregister_async(NMSecretAgentOld *self, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { @@ -980,10 +980,10 @@ nm_secret_agent_old_unregister_finish(NMSecretAgentOld *self, GAsyncResult *resu * secrets from the user. */ void -nm_secret_agent_old_get_secrets(NMSecretAgentOld * self, - NMConnection * connection, - const char * setting_name, - const char ** hints, +nm_secret_agent_old_get_secrets(NMSecretAgentOld *self, + NMConnection *connection, + const char *setting_name, + const char **hints, NMSecretAgentGetSecretsFlags flags, NMSecretAgentOldGetSecretsFunc callback, gpointer user_data) @@ -1017,8 +1017,8 @@ nm_secret_agent_old_get_secrets(NMSecretAgentOld * self, * disk. */ void -nm_secret_agent_old_save_secrets(NMSecretAgentOld * self, - NMConnection * connection, +nm_secret_agent_old_save_secrets(NMSecretAgentOld *self, + NMConnection *connection, NMSecretAgentOldSaveSecretsFunc callback, gpointer user_data) { @@ -1044,8 +1044,8 @@ nm_secret_agent_old_save_secrets(NMSecretAgentOld * self, * @connection. */ void -nm_secret_agent_old_delete_secrets(NMSecretAgentOld * self, - NMConnection * connection, +nm_secret_agent_old_delete_secrets(NMSecretAgentOld *self, + NMConnection *connection, NMSecretAgentOldDeleteSecretsFunc callback, gpointer user_data) { @@ -1093,8 +1093,8 @@ validate_identifier(const char *identifier) static gboolean _register_retry_cb(gpointer user_data) { - NMSecretAgentOld * self = user_data; - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + NMSecretAgentOld *self = user_data; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; dbus_context = nm_g_main_context_push_thread_default_if_necessary(priv->dbus_context); @@ -1107,10 +1107,10 @@ _register_retry_cb(gpointer user_data) static void _register_call_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMSecretAgentOld * self = user_data; - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; + NMSecretAgentOld *self = user_data; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); @@ -1187,11 +1187,11 @@ _register_dbus_call(NMSecretAgentOld *self) static void _get_connection_unix_user_cb(GObject *source, GAsyncResult *result, gpointer user_data) { - NMSecretAgentOld * self; - NMSecretAgentOldPrivate *priv; - gs_unref_variant GVariant *ret = NULL; - gs_free_error GError *error = NULL; - guint32 sender_uid = 0; + NMSecretAgentOld *self; + NMSecretAgentOldPrivate *priv; + gs_unref_variant GVariant *ret = NULL; + gs_free_error GError *error = NULL; + guint32 sender_uid = 0; ret = g_dbus_connection_call_finish(G_DBUS_CONNECTION(source), result, &error); if (nm_utils_error_is_cancelled(error)) @@ -1275,15 +1275,15 @@ _name_owner_changed(NMSecretAgentOld *self, const char *name_owner, gboolean is_ static void _name_owner_changed_cb(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { NMSecretAgentOld *self = user_data; - const char * new_owner; + const char *new_owner; if (!g_variant_is_of_type(parameters, G_VARIANT_TYPE("(sss)"))) return; @@ -1303,16 +1303,16 @@ _name_owner_get_cb(const char *name_owner, GError *error, gpointer user_data) /*****************************************************************************/ static void -_method_call(GDBusConnection * connection, - const char * sender, - const char * object_path, - const char * interface_name, - const char * method_name, - GVariant * parameters, +_method_call(GDBusConnection *connection, + const char *sender, + const char *object_path, + const char *interface_name, + const char *method_name, + GVariant *parameters, GDBusMethodInvocation *context, gpointer user_data) { - NMSecretAgentOld * self = user_data; + NMSecretAgentOld *self = user_data; NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); nm_assert(nm_streq0(object_path, NM_DBUS_PATH_SECRET_AGENT)); @@ -1349,7 +1349,7 @@ static void _register_state_complete(NMSecretAgentOld *self) { NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - NMCListElem * elem; + NMCListElem *elem; gboolean any_tasks_to_complete = FALSE; if (!c_list_is_empty(&priv->pending_tasks_register_lst_head)) { @@ -1367,7 +1367,7 @@ _register_state_complete(NMSecretAgentOld *self) if (any_tasks_to_complete) { while ( (elem = c_list_first_entry(&priv->pending_tasks_register_lst_head, NMCListElem, lst))) { - gpointer data = nm_c_list_elem_free_steal(elem); + gpointer data = nm_c_list_elem_free_steal(elem); gs_unref_object GTask *task = NULL; if (data == &any_tasks_to_complete) { @@ -1525,8 +1525,8 @@ static void _register_state_change(NMSecretAgentOld *self) { _nm_unused gs_unref_object NMSecretAgentOld *self_keep_alive = g_object_ref(self); - NMSecretAgentOldPrivate * priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; if (priv->register_state_change_reenter == 0) { /* We are not yet initialized. Do nothing. */ @@ -1558,9 +1558,9 @@ again: static void _init_complete(NMSecretAgentOld *self, GError *error_take) { - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - gs_free_error GError *error = g_steal_pointer(&error_take); - GError * error_cancelled = NULL; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + gs_free_error GError *error = g_steal_pointer(&error_take); + GError *error_cancelled = NULL; if (!priv->init_data) return; @@ -1582,10 +1582,10 @@ _init_complete(NMSecretAgentOld *self, GError *error_take) static void _init_register_object(NMSecretAgentOld *self) { - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - gs_free_error GError *error = NULL; - GDBusInterfaceVTable interface_vtable = { - .method_call = _method_call, + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + gs_free_error GError *error = NULL; + GDBusInterfaceVTable interface_vtable = { + .method_call = _method_call, }; if (g_cancellable_set_error_if_cancelled(priv->init_data->cancellable, &error)) { @@ -1613,9 +1613,9 @@ _init_register_object(NMSecretAgentOld *self) static void _init_got_bus(GObject *initable, GAsyncResult *result, gpointer user_data) { - NMSecretAgentOld * self = user_data; - NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); - gs_free_error GError *error = NULL; + NMSecretAgentOld *self = user_data; + NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); + gs_free_error GError *error = NULL; priv->dbus_connection = g_bus_get_finish(result, &error); if (!priv->dbus_connection) { @@ -1650,17 +1650,17 @@ _init_start(NMSecretAgentOld *self) } static void -init_async(GAsyncInitable * initable, +init_async(GAsyncInitable *initable, int io_priority, - GCancellable * cancellable, + GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { - NMSecretAgentOld * self; - NMSecretAgentOldClass * klass; - NMSecretAgentOldPrivate *priv; + NMSecretAgentOld *self; + NMSecretAgentOldClass *klass; + NMSecretAgentOldPrivate *priv; nm_auto_pop_gmaincontext GMainContext *dbus_context = NULL; - gs_unref_object GTask *task = NULL; + gs_unref_object GTask *task = NULL; g_return_if_fail(NM_IS_SECRET_AGENT_OLD(initable)); @@ -1705,10 +1705,10 @@ static gboolean init_sync(GInitable *initable, GCancellable *cancellable, GError **error) { gs_unref_object NMSecretAgentOld *self = NULL; - NMSecretAgentOldPrivate * priv; - NMSecretAgentOldClass * klass; - GMainLoop * main_loop; - GError * local_error = NULL; + NMSecretAgentOldPrivate *priv; + NMSecretAgentOldClass *klass; + GMainLoop *main_loop; + GError *local_error = NULL; g_return_val_if_fail(NM_IS_SECRET_AGENT_OLD(initable), FALSE); @@ -1789,7 +1789,7 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) static void set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { - NMSecretAgentOld * self = NM_SECRET_AGENT_OLD(object); + NMSecretAgentOld *self = NM_SECRET_AGENT_OLD(object); NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); guint u; @@ -1855,7 +1855,7 @@ dispose(GObject *object) static void finalize(GObject *object) { - NMSecretAgentOld * self = NM_SECRET_AGENT_OLD(object); + NMSecretAgentOld *self = NM_SECRET_AGENT_OLD(object); NMSecretAgentOldPrivate *priv = NM_SECRET_AGENT_OLD_GET_PRIVATE(self); _LOGT("finalizing"); diff --git a/src/libnm-client-impl/nm-settings-docs-gir.xml b/src/libnm-client-impl/nm-settings-docs-gir.xml index b916ee04..d8022132 100644 --- a/src/libnm-client-impl/nm-settings-docs-gir.xml +++ b/src/libnm-client-impl/nm-settings-docs-gir.xml @@ -304,6 +304,7 @@ + diff --git a/src/libnm-client-impl/nm-vpn-connection.c b/src/libnm-client-impl/nm-vpn-connection.c index fb061532..45699680 100644 --- a/src/libnm-client-impl/nm-vpn-connection.c +++ b/src/libnm-client-impl/nm-vpn-connection.c @@ -27,7 +27,7 @@ enum { static guint signals[LAST_SIGNAL] = {0}; typedef struct { - char * banner; + char *banner; guint32 vpn_state; guint32 reason; } NMVpnConnectionPrivate; @@ -89,7 +89,7 @@ static void _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify_event) { gs_unref_object NMVpnConnection *self = notify_event->user_data; - NMVpnConnectionPrivate * priv = NM_VPN_CONNECTION_GET_PRIVATE(self); + NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE(self); /* we expose here the value cache in @priv. In practice, this is the same * value as we received from the signal. In the unexpected case where they @@ -104,7 +104,7 @@ _notify_event_state_changed(NMClient *client, NMClientNotifyEventWithPtr *notify void _nm_vpn_connection_state_changed_commit(NMVpnConnection *self, guint32 state, guint32 reason) { - NMClient * client; + NMClient *client; NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE(self); client = _nm_object_get_client(self); diff --git a/src/libnm-client-impl/nm-vpn-plugin-old.c b/src/libnm-client-impl/nm-vpn-plugin-old.c index f60bf19c..19ba2bb0 100644 --- a/src/libnm-client-impl/nm-vpn-plugin-old.c +++ b/src/libnm-client-impl/nm-vpn-plugin-old.c @@ -37,7 +37,7 @@ typedef struct { /* DBUS-y stuff */ GDBusConnection *connection; NMDBusVpnPlugin *dbus_vpn_plugin_old; - char * dbus_service_name; + char *dbus_service_name; /* Temporary stuff */ guint connect_timer; @@ -226,7 +226,7 @@ static gboolean connect_timer_expired(gpointer data) { NMVpnPluginOld *plugin = NM_VPN_PLUGIN_OLD(data); - GError * err = NULL; + GError *err = NULL; NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin)->connect_timer = 0; g_message("Connect timer expired, disconnecting."); @@ -330,11 +330,11 @@ void nm_vpn_plugin_old_set_ip4_config(NMVpnPluginOld *plugin, GVariant *ip4_config) { NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - GVariant * combined_config; + GVariant *combined_config; GVariantBuilder builder; GVariantIter iter; - const char * key; - GVariant * value; + const char *key; + GVariant *value; g_return_if_fail(NM_IS_VPN_PLUGIN_OLD(plugin)); g_return_if_fail(ip4_config != NULL); @@ -415,17 +415,17 @@ connect_timer_start(NMVpnPluginOld *plugin) } static void -_connect_generic(NMVpnPluginOld * plugin, +_connect_generic(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * properties, - GVariant * details) + GVariant *properties, + GVariant *details) { - NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - NMVpnPluginOldClass * vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); - gs_unref_object NMConnection *connection = NULL; - gboolean success = FALSE; - gs_free_error GError *error = NULL; - guint fail_stop_timeout = 0; + NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); + NMVpnPluginOldClass *vpn_class = NM_VPN_PLUGIN_OLD_GET_CLASS(plugin); + gs_unref_object NMConnection *connection = NULL; + gboolean success = FALSE; + gs_free_error GError *error = NULL; + guint fail_stop_timeout = 0; if (priv->state != NM_VPN_SERVICE_STATE_STOPPED && priv->state != NM_VPN_SERVICE_STATE_INIT) { g_dbus_method_invocation_return_error(context, @@ -488,19 +488,19 @@ _connect_generic(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_connect(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_connect(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * connection, + GVariant *connection, gpointer user_data) { _connect_generic(plugin, context, connection, NULL); } static void -impl_vpn_plugin_old_connect_interactive(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_connect_interactive(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * connection, - GVariant * details, + GVariant *connection, + GVariant *details, gpointer user_data) { _connect_generic(plugin, context, connection, details); @@ -509,15 +509,15 @@ impl_vpn_plugin_old_connect_interactive(NMVpnPluginOld * plugin, /*****************************************************************************/ static void -impl_vpn_plugin_old_need_secrets(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_need_secrets(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * properties, + GVariant *properties, gpointer user_data) { NMConnection *connection; - const char * setting_name; + const char *setting_name; gboolean needed; - GError * error = NULL; + GError *error = NULL; connection = _nm_simple_connection_new_from_dbus(properties, NM_SETTING_PARSE_FLAGS_BEST_EFFORT, &error); @@ -560,14 +560,14 @@ impl_vpn_plugin_old_need_secrets(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_new_secrets(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_new_secrets(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * properties, + GVariant *properties, gpointer user_data) { NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - NMConnection * connection; - GError * error = NULL; + NMConnection *connection; + GError *error = NULL; gboolean success; if (priv->state != NM_VPN_SERVICE_STATE_STARTING) { @@ -693,8 +693,8 @@ nm_vpn_plugin_old_read_vpn_details(int fd, GHashTable **out_data, GHashTable **o * Deprecated: 1.2: Replaced by NMVpnServicePlugin. **/ gboolean -nm_vpn_plugin_old_get_secret_flags(GHashTable * data, - const char * secret_name, +nm_vpn_plugin_old_get_secret_flags(GHashTable *data, + const char *secret_name, NMSettingSecretFlags *out_flags) { return nm_vpn_service_plugin_get_secret_flags(data, secret_name, out_flags); @@ -703,7 +703,7 @@ nm_vpn_plugin_old_get_secret_flags(GHashTable * data, /*****************************************************************************/ static void -impl_vpn_plugin_old_disconnect(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_disconnect(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, gpointer user_data) { @@ -716,9 +716,9 @@ impl_vpn_plugin_old_disconnect(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_set_config(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_set_config(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_plugin_old_set_config(plugin, config); @@ -726,9 +726,9 @@ impl_vpn_plugin_old_set_config(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_set_ip4_config(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_set_ip4_config(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_plugin_old_set_ip4_config(plugin, config); @@ -736,9 +736,9 @@ impl_vpn_plugin_old_set_ip4_config(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_set_ip6_config(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_set_ip6_config(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_plugin_old_set_ip6_config(plugin, config); @@ -746,9 +746,9 @@ impl_vpn_plugin_old_set_ip6_config(NMVpnPluginOld * plugin, } static void -impl_vpn_plugin_old_set_failure(NMVpnPluginOld * plugin, +impl_vpn_plugin_old_set_failure(NMVpnPluginOld *plugin, GDBusMethodInvocation *context, - char * reason, + char *reason, gpointer user_data) { nm_vpn_plugin_old_failure(plugin, NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG); @@ -803,11 +803,11 @@ nm_vpn_plugin_old_init(NMVpnPluginOld *plugin) static gboolean init_sync(GInitable *initable, GCancellable *cancellable, GError **error) { - NMVpnPluginOld * plugin = NM_VPN_PLUGIN_OLD(initable); + NMVpnPluginOld *plugin = NM_VPN_PLUGIN_OLD(initable); NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); - GDBusConnection * connection = NULL; - GDBusProxy * proxy; - GVariant * ret; + GDBusConnection *connection = NULL; + GDBusProxy *proxy; + GVariant *ret; gboolean success = FALSE; if (!priv->dbus_service_name) { @@ -931,10 +931,10 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) static void dispose(GObject *object) { - NMVpnPluginOld * plugin = NM_VPN_PLUGIN_OLD(object); + NMVpnPluginOld *plugin = NM_VPN_PLUGIN_OLD(object); NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); NMVpnServiceState state; - GError * err = NULL; + GError *err = NULL; nm_clear_g_source(&priv->fail_stop_id); nm_clear_g_source(&priv->quit_timer); @@ -956,7 +956,7 @@ dispose(GObject *object) static void finalize(GObject *object) { - NMVpnPluginOld * plugin = NM_VPN_PLUGIN_OLD(object); + NMVpnPluginOld *plugin = NM_VPN_PLUGIN_OLD(object); NMVpnPluginOldPrivate *priv = NM_VPN_PLUGIN_OLD_GET_PRIVATE(plugin); nm_vpn_plugin_old_set_connection(plugin, NULL); diff --git a/src/libnm-client-impl/nm-vpn-service-plugin.c b/src/libnm-client-impl/nm-vpn-service-plugin.c index 18a85e91..2a217502 100644 --- a/src/libnm-client-impl/nm-vpn-service-plugin.c +++ b/src/libnm-client-impl/nm-vpn-service-plugin.c @@ -39,7 +39,7 @@ typedef struct { /* DBUS-y stuff */ GDBusConnection *connection; NMDBusVpnPlugin *dbus_vpn_service_plugin; - char * dbus_service_name; + char *dbus_service_name; gboolean dbus_watch_peer; /* Temporary stuff */ @@ -240,7 +240,7 @@ nm_vpn_service_plugin_shutdown(NMVpnServicePlugin *plugin) { NMVpnServicePluginPrivate *priv; NMVpnServiceState state; - GError * error = NULL; + GError *error = NULL; g_return_if_fail(NM_IS_VPN_SERVICE_PLUGIN(plugin)); @@ -271,7 +271,7 @@ static gboolean connect_timer_expired(gpointer data) { NMVpnServicePlugin *plugin = NM_VPN_SERVICE_PLUGIN(data); - GError * err = NULL; + GError *err = NULL; NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin)->connect_timer = 0; g_message("Connect timer expired, disconnecting."); @@ -368,11 +368,11 @@ void nm_vpn_service_plugin_set_ip4_config(NMVpnServicePlugin *plugin, GVariant *ip4_config) { NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); - GVariant * combined_config; + GVariant *combined_config; GVariantBuilder builder; GVariantIter iter; - const char * key; - GVariant * value; + const char *key; + GVariant *value; g_return_if_fail(NM_IS_VPN_SERVICE_PLUGIN(plugin)); g_return_if_fail(ip4_config != NULL); @@ -454,11 +454,11 @@ connect_timer_start(NMVpnServicePlugin *plugin) static void peer_vanished(GDBusConnection *connection, - const char * sender_name, - const char * object_path, - const char * interface_name, - const char * signal_name, - GVariant * parameters, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, + GVariant *parameters, gpointer user_data) { nm_vpn_service_plugin_disconnect(NM_VPN_SERVICE_PLUGIN(user_data), NULL); @@ -478,16 +478,16 @@ watch_peer(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context) } static void -_connect_generic(NMVpnServicePlugin * plugin, +_connect_generic(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * properties, - GVariant * details) + GVariant *properties, + GVariant *details) { NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); - NMVpnServicePluginClass * vpn_class = NM_VPN_SERVICE_PLUGIN_GET_CLASS(plugin); - NMConnection * connection; + NMVpnServicePluginClass *vpn_class = NM_VPN_SERVICE_PLUGIN_GET_CLASS(plugin); + NMConnection *connection; gboolean success = FALSE; - GError * error = NULL; + GError *error = NULL; guint fail_stop_timeout = 0; if (priv->state != NM_VPN_SERVICE_STATE_STOPPED && priv->state != NM_VPN_SERVICE_STATE_INIT) { @@ -557,19 +557,19 @@ _connect_generic(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_connect(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_connect(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * connection, + GVariant *connection, gpointer user_data) { _connect_generic(plugin, context, connection, NULL); } static void -impl_vpn_service_plugin_connect_interactive(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_connect_interactive(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * connection, - GVariant * details, + GVariant *connection, + GVariant *details, gpointer user_data) { _connect_generic(plugin, context, connection, details); @@ -578,15 +578,15 @@ impl_vpn_service_plugin_connect_interactive(NMVpnServicePlugin * plugin, /*****************************************************************************/ static void -impl_vpn_service_plugin_need_secrets(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_need_secrets(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * properties, + GVariant *properties, gpointer user_data) { NMConnection *connection; - const char * setting_name; + const char *setting_name; gboolean needed; - GError * error = NULL; + GError *error = NULL; connection = _nm_simple_connection_new_from_dbus(properties, NM_SETTING_PARSE_FLAGS_BEST_EFFORT, &error); @@ -629,14 +629,14 @@ impl_vpn_service_plugin_need_secrets(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_new_secrets(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_new_secrets(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * properties, + GVariant *properties, gpointer user_data) { NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); - NMConnection * connection; - GError * error = NULL; + NMConnection *connection; + GError *error = NULL; gboolean success; if (priv->state != NM_VPN_SERVICE_STATE_STARTING) { @@ -704,8 +704,8 @@ impl_vpn_service_plugin_new_secrets(NMVpnServicePlugin * plugin, */ void nm_vpn_service_plugin_secrets_required(NMVpnServicePlugin *plugin, - const char * message, - const char ** hints) + const char *message, + const char **hints) { NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); @@ -803,12 +803,12 @@ nm_vpn_service_plugin_read_vpn_details(int fd, GHashTable **out_data, GHashTable gs_unref_hashtable GHashTable *data = NULL; gs_unref_hashtable GHashTable *secrets = NULL; gboolean success = FALSE; - GHashTable * hash = NULL; - nm_auto_free_gstring GString *key = NULL; - nm_auto_free_gstring GString *val = NULL; - nm_auto_free_gstring GString *line = NULL; - GString * str = NULL; - ReadFdBuf read_buf; + GHashTable *hash = NULL; + nm_auto_free_gstring GString *key = NULL; + nm_auto_free_gstring GString *val = NULL; + nm_auto_free_gstring GString *line = NULL; + GString *str = NULL; + ReadFdBuf read_buf; if (out_data) g_return_val_if_fail(*out_data == NULL, FALSE); @@ -920,12 +920,12 @@ next: * Since: 1.2 **/ gboolean -nm_vpn_service_plugin_get_secret_flags(GHashTable * data, - const char * secret_name, +nm_vpn_service_plugin_get_secret_flags(GHashTable *data, + const char *secret_name, NMSettingSecretFlags *out_flags) { - gs_free char * flag_name_free = NULL; - const char * s; + gs_free char *flag_name_free = NULL; + const char *s; gint64 t1; NMSettingSecretFlags t0; @@ -950,7 +950,7 @@ nm_vpn_service_plugin_get_secret_flags(GHashTable * data, /*****************************************************************************/ static void -impl_vpn_service_plugin_disconnect(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_disconnect(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, gpointer user_data) { @@ -963,9 +963,9 @@ impl_vpn_service_plugin_disconnect(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_set_config(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_set_config(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_service_plugin_set_config(plugin, config); @@ -973,9 +973,9 @@ impl_vpn_service_plugin_set_config(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_set_ip4_config(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_set_ip4_config(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_service_plugin_set_ip4_config(plugin, config); @@ -983,9 +983,9 @@ impl_vpn_service_plugin_set_ip4_config(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_set_ip6_config(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_set_ip6_config(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - GVariant * config, + GVariant *config, gpointer user_data) { nm_vpn_service_plugin_set_ip6_config(plugin, config); @@ -993,9 +993,9 @@ impl_vpn_service_plugin_set_ip6_config(NMVpnServicePlugin * plugin, } static void -impl_vpn_service_plugin_set_failure(NMVpnServicePlugin * plugin, +impl_vpn_service_plugin_set_failure(NMVpnServicePlugin *plugin, GDBusMethodInvocation *context, - char * reason, + char *reason, gpointer user_data) { nm_vpn_service_plugin_failure(plugin, NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG); @@ -1050,11 +1050,11 @@ nm_vpn_service_plugin_init(NMVpnServicePlugin *plugin) static gboolean init_sync(GInitable *initable, GCancellable *cancellable, GError **error) { - NMVpnServicePlugin * plugin = NM_VPN_SERVICE_PLUGIN(initable); - NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); + NMVpnServicePlugin *plugin = NM_VPN_SERVICE_PLUGIN(initable); + NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); gs_unref_object GDBusConnection *connection = NULL; - gs_unref_object GDBusProxy *proxy = NULL; - GVariant * ret; + gs_unref_object GDBusProxy *proxy = NULL; + GVariant *ret; if (!priv->dbus_service_name) { g_set_error_literal(error, @@ -1186,7 +1186,7 @@ dispose(GObject *object) static void finalize(GObject *object) { - NMVpnServicePlugin * plugin = NM_VPN_SERVICE_PLUGIN(object); + NMVpnServicePlugin *plugin = NM_VPN_SERVICE_PLUGIN(object); NMVpnServicePluginPrivate *priv = NM_VPN_SERVICE_PLUGIN_GET_PRIVATE(plugin); nm_vpn_service_plugin_set_connection(plugin, NULL); diff --git a/src/libnm-client-impl/nm-wifi-p2p-peer.c b/src/libnm-client-impl/nm-wifi-p2p-peer.c index 1d6b7c95..54d1c5ed 100644 --- a/src/libnm-client-impl/nm-wifi-p2p-peer.c +++ b/src/libnm-client-impl/nm-wifi-p2p-peer.c @@ -29,12 +29,12 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_FLAGS, typedef struct { GBytes *wfd_ies; - char * name; - char * manufacturer; - char * model; - char * model_number; - char * serial; - char * hw_address; + char *name; + char *manufacturer; + char *model; + char *model_number; + char *serial; + char *hw_address; gint32 last_seen; guint32 flags; guint8 strength; @@ -261,10 +261,10 @@ gboolean nm_wifi_p2p_peer_connection_valid(NMWifiP2PPeer *peer, NMConnection *connection) { NMSettingConnection *s_con; - NMSettingWifiP2P * s_wifi_p2p; - const char * ctype; - const char * hw_address; - const char * setting_peer; + NMSettingWifiP2P *s_wifi_p2p; + const char *ctype; + const char *hw_address; + const char *setting_peer; s_wifi_p2p = (NMSettingWifiP2P *) nm_connection_get_setting(connection, NM_TYPE_SETTING_WIFI_P2P); diff --git a/src/libnm-client-impl/tests/test-libnm.c b/src/libnm-client-impl/tests/test-libnm.c index 29ffde97..0f600a4a 100644 --- a/src/libnm-client-impl/tests/test-libnm.c +++ b/src/libnm-client-impl/tests/test-libnm.c @@ -2280,18 +2280,18 @@ typedef struct { #define READ_VPN_DETAIL_DATA(...) ((ReadVpnDetailData[]){__VA_ARGS__}) static gboolean -_do_read_vpn_details_impl1(const char * file, +_do_read_vpn_details_impl1(const char *file, int line, int memfd, - char * mem, + char *mem, gsize len, const ReadVpnDetailData *expected_data, guint expected_data_len, const ReadVpnDetailData *expected_secrets, guint expected_secrets_len) { - gssize written; - off_t lseeked; + gssize written; + off_t lseeked; gs_unref_hashtable GHashTable *data = NULL; gs_unref_hashtable GHashTable *secrets = NULL; @@ -2312,11 +2312,11 @@ _do_read_vpn_details_impl1(const char * file, #define _assert_hash(hash, expected, expected_len) \ G_STMT_START \ { \ - GHashTable * _hash = (hash); \ + GHashTable *_hash = (hash); \ guint _expected_len = (expected_len); \ const ReadVpnDetailData *_expected = (expected); \ GHashTableIter _iter; \ - const char * _k, *_v; \ + const char *_k, *_v; \ guint _i; \ \ g_assert(_hash); \ @@ -2759,7 +2759,7 @@ test_types(void) for (i_type = 0; i_type < G_N_ELEMENTS(get_type_fcns); i_type++) { nm_auto_unref_gtypeclass GObjectClass *klass_unref = NULL; GType gtype = (get_type_fcns[i_type])(); - GObjectClass * klass; + GObjectClass *klass; g_assert(g_str_has_prefix(g_type_name(gtype), "NM")); @@ -2803,16 +2803,16 @@ test_types(void) static void test_nml_dbus_meta(void) { - const NMLDBusMetaIface * meta_iface; + const NMLDBusMetaIface *meta_iface; const NMLDBusMetaProperty *meta_property; guint prop_idx; gsize i, j; guint l, m; for (i = 0; i < G_N_ELEMENTS(_nml_dbus_meta_ifaces); i++) { - const NMLDBusMetaIface * mif = _nml_dbus_meta_ifaces[i]; + const NMLDBusMetaIface *mif = _nml_dbus_meta_ifaces[i]; nm_auto_unref_gtypeclass GObjectClass *klass_unref = NULL; - GObjectClass * klass; + GObjectClass *klass; GType gtype; #define COMMON_PREFIX "org.freedesktop.NetworkManager" @@ -3004,7 +3004,7 @@ test_nml_dbus_meta(void) check_dbus_properties: for (l = 0; l < mif->n_dbus_properties; l++) { const NMLDBusMetaProperty *mpr = &mif->dbus_properties[l]; - gs_free char * obj_property_name = NULL; + gs_free char *obj_property_name = NULL; const struct { const char *dbus_type; GType default_gtype; @@ -3218,7 +3218,7 @@ static void test_dbus_meta_types(void) { struct list_data { - const char * dbus_iface_name; + const char *dbus_iface_name; GType gtype; NMLDBusMetaInteracePrio interface_prio; } list[] = { @@ -3464,8 +3464,8 @@ test_nm_auth_permissions(void) for (i = 1; i < NM_CLIENT_PERMISSION_LAST; i++) { NMClientPermission a = nm_auth_permission_sorted[i - 1]; NMClientPermission b = nm_auth_permission_sorted[i]; - const char * s_a = nm_auth_permission_names_by_idx[a - 1]; - const char * s_b = nm_auth_permission_names_by_idx[b - 1]; + const char *s_a = nm_auth_permission_names_by_idx[a - 1]; + const char *s_b = nm_auth_permission_names_by_idx[b - 1]; g_assert_cmpstr(s_a, <, s_b); g_assert(a != b); diff --git a/src/libnm-client-impl/tests/test-nm-client.c b/src/libnm-client-impl/tests/test-nm-client.c index a3fc5847..a43e98cd 100644 --- a/src/libnm-client-impl/tests/test-nm-client.c +++ b/src/libnm-client-impl/tests/test-nm-client.c @@ -28,9 +28,9 @@ loop_quit(gpointer user_data) static void devices_notify_cb(NMClient *c, GParamSpec *pspec, gpointer user_data) { - gboolean * notified = user_data; + gboolean *notified = user_data; const GPtrArray *devices; - NMDevice * device; + NMDevice *device; devices = nm_client_get_devices(c); g_assert(devices); @@ -46,12 +46,12 @@ devices_notify_cb(NMClient *c, GParamSpec *pspec, gpointer user_data) static void test_device_added(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - const GPtrArray * devices; - NMDevice * device; - gboolean notified = FALSE; - GError * error = NULL; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + const GPtrArray *devices; + NMDevice *device; + gboolean notified = FALSE; + GError *error = NULL; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -113,9 +113,9 @@ device_sai_added_cb(NMClient *c, NMDevice *device, gpointer user_data) static void devices_sai_notify_cb(NMClient *c, GParamSpec *pspec, gpointer user_data) { - guint * result = user_data; + guint *result = user_data; const GPtrArray *devices; - NMDevice * device; + NMDevice *device; g_assert_cmpstr(pspec->name, ==, "devices"); @@ -134,11 +134,11 @@ devices_sai_notify_cb(NMClient *c, GParamSpec *pspec, gpointer user_data) static void test_device_added_signal_after_init(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - const GPtrArray * devices; - NMDevice * device; - guint result = 0; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + const GPtrArray *devices; + NMDevice *device; + guint result = 0; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -187,7 +187,7 @@ static const char *expected_bssid = "66:55:44:33:22:11"; typedef struct { GMainLoop *loop; gboolean found; - char * ap_path; + char *ap_path; gboolean signaled; gboolean notified; guint quit_id; @@ -229,7 +229,7 @@ static void wifi_ap_add_notify_cb(NMDeviceWifi *w, GParamSpec *pspec, WifiApInfo *info) { const GPtrArray *aps; - NMAccessPoint * ap; + NMAccessPoint *ap; aps = nm_device_wifi_get_access_points(w); g_assert(aps); @@ -269,13 +269,13 @@ wifi_ap_remove_notify_cb(NMDeviceWifi *w, GParamSpec *pspec, WifiApInfo *info) static void test_wifi_ap_added_removed(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - NMDeviceWifi * wifi; - WifiApInfo info = {gl.loop, FALSE, FALSE, 0, 0}; - GVariant * ret; - GError * error = NULL; - gs_free char * expected_path = NULL; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + NMDeviceWifi *wifi; + WifiApInfo info = {gl.loop, FALSE, FALSE, 0, 0}; + GVariant *ret; + GError *error = NULL; + gs_free char *expected_path = NULL; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -391,9 +391,9 @@ static void da_devices_notify_cb(NMClient *c, GParamSpec *pspec, DaInfo *info) { const GPtrArray *devices; - NMDevice * device; + NMDevice *device; guint i; - const char * iface; + const char *iface; devices = nm_client_get_devices(c); g_assert(devices); @@ -413,13 +413,13 @@ da_devices_notify_cb(NMClient *c, GParamSpec *pspec, DaInfo *info) static void test_devices_array(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - DaInfo info = {gl.loop}; - NMDevice * wlan0, *eth0, *eth1, *device; - const GPtrArray * devices; - GError * error = NULL; - GVariant * ret; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + DaInfo info = {gl.loop}; + NMDevice *wlan0, *eth0, *eth1, *device; + const GPtrArray *devices; + GError *error = NULL; + GVariant *ret; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -502,12 +502,12 @@ nm_running_changed(GObject *client, GParamSpec *pspec, gpointer user_data) static void test_client_nm_running(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client1 = NULL; - gs_unref_object NMClient *client2 = NULL; - guint quit_id; - int running_changed = 0; - GError * error = NULL; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client1 = NULL; + gs_unref_object NMClient *client2 = NULL; + guint quit_id; + int running_changed = 0; + GError *error = NULL; client1 = nmtstc_client_new(TRUE); @@ -560,7 +560,7 @@ test_client_nm_running(void) } typedef struct { - GMainLoop * loop; + GMainLoop *loop; NMActiveConnection *ac; int remaining; @@ -572,8 +572,8 @@ typedef struct { static void assert_ac_and_device(NMClient *client) { - const GPtrArray * devices, *acs, *ac_devices; - NMDevice * device, *ac_device; + const GPtrArray *devices, *acs, *ac_devices; + NMDevice *device, *ac_device; NMActiveConnection *ac, *device_ac; acs = nm_client_get_active_connections(client); @@ -614,9 +614,9 @@ assert_ac_and_device(NMClient *client) static void add_and_activate_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMClient * client = NM_CLIENT(object); + NMClient *client = NM_CLIENT(object); TestACInfo *info = user_data; - GError * error = NULL; + GError *error = NULL; info->ac = nm_client_add_and_activate_connection_finish(client, result, &error); g_assert_no_error(error); @@ -632,7 +632,7 @@ add_and_activate_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void client_acs_changed_cb(GObject *client, GParamSpec *pspec, gpointer user_data) { - TestACInfo * info = user_data; + TestACInfo *info = user_data; const GPtrArray *acs; acs = nm_client_get_active_connections(NM_CLIENT(client)); @@ -659,11 +659,11 @@ device_ac_changed_cb(GObject *device, GParamSpec *pspec, gpointer user_data) static void test_active_connections(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - NMDevice * device; - NMConnection * conn; - TestACInfo info = {gl.loop, NULL, 0}; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + NMDevice *device; + NMConnection *conn; + TestACInfo info = {gl.loop, NULL, 0}; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -719,9 +719,9 @@ test_active_connections(void) static void client_devices_changed_cb(GObject *client, GParamSpec *pspec, gpointer user_data) { - TestACInfo * info = user_data; + TestACInfo *info = user_data; const GPtrArray *devices; - NMDevice * device; + NMDevice *device; devices = nm_client_get_devices(NM_CLIENT(client)); g_assert(devices != NULL); @@ -755,7 +755,7 @@ client_devices_changed_cb(GObject *client, GParamSpec *pspec, gpointer user_data } typedef struct { - GMainLoop * loop; + GMainLoop *loop; NMRemoteConnection *remote; } TestConnectionInfo; @@ -763,7 +763,7 @@ static void add_connection_cb(GObject *object, GAsyncResult *result, gpointer user_data) { TestConnectionInfo *info = user_data; - GError * error = NULL; + GError *error = NULL; info->remote = nm_client_add_connection_finish(NM_CLIENT(object), result, &error); g_assert_no_error(error); @@ -773,9 +773,9 @@ add_connection_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void activate_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - NMClient * client = NM_CLIENT(object); + NMClient *client = NM_CLIENT(object); TestACInfo *info = user_data; - GError * error = NULL; + GError *error = NULL; info->ac = nm_client_activate_connection_finish(client, result, &error); g_assert_no_error(error); @@ -788,16 +788,46 @@ activate_cb(GObject *object, GAsyncResult *result, gpointer user_data) g_main_loop_quit(info->loop); } +static void +_dev_eth0_1_state_changed_cb(NMDevice *device, + NMDeviceState new_state, + NMDeviceState old_state, + NMDeviceStateReason reason, + int *p_count_call) +{ + const GPtrArray *arr; + + g_assert(p_count_call); + g_assert_cmpint(*p_count_call, ==, 0); + + (*p_count_call)++; + + g_assert(NM_IS_DEVICE_VLAN(device)); + + g_assert_cmpint(old_state, >=, NM_DEVICE_STATE_PREPARE); + g_assert_cmpint(old_state, <=, NM_DEVICE_STATE_ACTIVATED); + g_assert_cmpint(new_state, ==, NM_DEVICE_STATE_UNKNOWN); + + arr = nm_device_get_available_connections(device); + g_assert(arr); + g_assert_cmpint(arr->len, ==, 0); + + g_assert(!nm_device_get_active_connection(device)); +} + static void test_activate_virtual(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - NMConnection * conn; - NMSettingConnection * s_con; - NMSettingVlan * s_vlan; - TestACInfo info = {gl.loop, NULL, 0}; - TestConnectionInfo conn_info = {gl.loop, NULL}; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + NMConnection *conn; + NMSettingConnection *s_con; + NMSettingVlan *s_vlan; + TestACInfo info = {gl.loop, NULL, 0}; + TestConnectionInfo conn_info = {gl.loop, NULL}; + + if (nmtst_test_skip_slow()) + return; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -847,23 +877,74 @@ test_activate_virtual(void) g_object_remove_weak_pointer(G_OBJECT(info.device), (gpointer *) &info.device); nm_clear_g_signal_handler(info.device, &info.ac_signal_id); } + + if (nmtst_get_rand_bool()) { + /* OK, enough for this run. Let's see whether we can tear down + * successfully at this point. */ + return; + } + + { + NMDevice *dev_eth0_1; + NMActiveConnection *ac; + const GPtrArray *arr; + gulong sig_id; + int call_count = 0; + gboolean take_ref = nmtst_get_rand_bool(); + + /* ensure we got all the necessary events in place. */ + nmtst_main_loop_run(gl.loop, 50); + + dev_eth0_1 = nm_client_get_device_by_iface(client, "eth0.1"); + g_assert(NM_IS_DEVICE_VLAN(dev_eth0_1)); + if (take_ref) + g_object_ref(dev_eth0_1); + + arr = nm_device_get_available_connections(dev_eth0_1); + g_assert(arr); + g_assert_cmpint(arr->len, ==, 1); + + ac = nm_device_get_active_connection(dev_eth0_1); + g_assert(NM_IS_ACTIVE_CONNECTION(ac)); + + sig_id = g_signal_connect(dev_eth0_1, + "state-changed", + G_CALLBACK(_dev_eth0_1_state_changed_cb), + &call_count); + + g_clear_object(&client); + + g_assert_cmpint(call_count, ==, 1); + + if (take_ref) { + arr = nm_device_get_available_connections(dev_eth0_1); + g_assert(arr); + g_assert_cmpint(arr->len, ==, 0); + + g_assert(!nm_device_get_active_connection(dev_eth0_1)); + + nm_clear_g_signal_handler(dev_eth0_1, &sig_id); + + g_object_unref(dev_eth0_1); + } + } } static void test_device_connection_compatibility(void) { - nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; - gs_unref_object NMClient *client = NULL; - gs_unref_object NMConnection *conn = NULL; - NMDevice * device1; - NMDevice * device2; - NMSettingWired * s_wired; - GError * error = NULL; - const char * subchannels[] = {"0.0.8000", "0.0.8001", "0.0.8002", NULL}; - const char * subchannels_2[] = {"0.0.8000", "0.0.8001", NULL}; - const char * subchannels_x[] = {"0.0.8000", "0.0.8001", "0.0.800X", NULL}; - const char * hw_addr1 = "52:54:00:ab:db:23"; - const char * hw_addr2 = "52:54:00:ab:db:24"; + nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = NULL; + gs_unref_object NMClient *client = NULL; + gs_unref_object NMConnection *conn = NULL; + NMDevice *device1; + NMDevice *device2; + NMSettingWired *s_wired; + GError *error = NULL; + const char *subchannels[] = {"0.0.8000", "0.0.8001", "0.0.8002", NULL}; + const char *subchannels_2[] = {"0.0.8000", "0.0.8001", NULL}; + const char *subchannels_x[] = {"0.0.8000", "0.0.8001", "0.0.800X", NULL}; + const char *hw_addr1 = "52:54:00:ab:db:23"; + const char *hw_addr2 = "52:54:00:ab:db:24"; sinfo = nmtstc_service_init(); if (!nmtstc_service_available(sinfo)) @@ -927,7 +1008,7 @@ static gboolean _test_connection_invalid_find_connections(gpointer element, gpointer needle, gpointer user_data) { NMRemoteConnection *con = NM_REMOTE_CONNECTION(element); - const char * path = needle; + const char *path = needle; g_assert(NM_IS_REMOTE_CONNECTION(con)); g_assert(path && *path); @@ -950,17 +1031,17 @@ test_connection_invalid(void) { NMTSTC_SERVICE_INFO_SETUP(my_sinfo); gs_unref_object NMConnection *connection = NULL; - NMSettingConnection * s_con; - gs_unref_object NMClient *client = NULL; - const GPtrArray * connections; - gs_free char * path0 = NULL; - gs_free char * path1 = NULL; - gs_free char * path2 = NULL; - gs_free char * path3 = NULL; - gs_free char * uuid2 = NULL; - gsize n_found; - gssize idx[4]; - gs_unref_variant GVariant *variant = NULL; + NMSettingConnection *s_con; + gs_unref_object NMClient *client = NULL; + const GPtrArray *connections; + gs_free char *path0 = NULL; + gs_free char *path1 = NULL; + gs_free char *path2 = NULL; + gs_free char *path3 = NULL; + gs_free char *uuid2 = NULL; + gsize n_found; + gssize idx[4]; + gs_unref_variant GVariant *variant = NULL; g_assert(g_main_loop_get_context(gl.loop) == (g_main_context_get_thread_default() ?: g_main_context_default())); diff --git a/src/libnm-client-impl/tests/test-remote-settings-client.c b/src/libnm-client-impl/tests/test-remote-settings-client.c index e5415f54..7e4872e9 100644 --- a/src/libnm-client-impl/tests/test-remote-settings-client.c +++ b/src/libnm-client-impl/tests/test-remote-settings-client.c @@ -13,9 +13,9 @@ #include "libnm-client-test/nm-test-libnm-utils.h" static struct { - NMTstcServiceInfo * sinfo; - NMClient * client; - GDBusConnection * bus; + NMTstcServiceInfo *sinfo; + NMClient *client; + GDBusConnection *bus; NMRemoteConnection *remote; } gl = {}; @@ -25,7 +25,7 @@ static void add_cb(GObject *s, GAsyncResult *result, gpointer user_data) { gboolean *done = user_data; - GError * error = NULL; + GError *error = NULL; gl.remote = nm_client_add_connection_finish(gl.client, result, &error); g_assert_no_error(error); @@ -72,7 +72,7 @@ test_add_connection(void) static void set_visible_cb(GObject *proxy, GAsyncResult *result, gpointer user_data) { - GError * error = NULL; + GError *error = NULL; GVariant *ret; ret = g_dbus_proxy_call_finish(G_DBUS_PROXY(proxy), result, &error); @@ -95,8 +95,8 @@ connection_removed_cb(NMClient *s, NMRemoteConnection *connection, gboolean *don } static void -invis_has_settings_cb(NMSetting * setting, - const char * key, +invis_has_settings_cb(NMSetting *setting, + const char *key, const GValue *value, GParamFlags flags, gpointer user_data) @@ -109,10 +109,10 @@ test_make_invisible(void) { const GPtrArray *conns; int i; - GDBusProxy * proxy; + GDBusProxy *proxy; gboolean visible_changed = FALSE, connection_removed = FALSE; gboolean has_settings = FALSE; - char * path; + char *path; if (!nmtstc_service_available(gl.sinfo)) return; @@ -193,9 +193,9 @@ test_make_visible(void) { const GPtrArray *conns; int i; - GDBusProxy * proxy; + GDBusProxy *proxy; gboolean found = FALSE; - char * path; + char *path; NMRemoteConnection *new = NULL; if (!nmtstc_service_available(gl.sinfo)) @@ -261,7 +261,7 @@ test_make_visible(void) static void deleted_cb(GObject *proxy, GAsyncResult *result, gpointer user_data) { - GError * error = NULL; + GError *error = NULL; GVariant *ret; ret = g_dbus_proxy_call_finish(G_DBUS_PROXY(proxy), result, &error); @@ -280,11 +280,11 @@ static void test_remove_connection(void) { NMRemoteConnection *connection; - const GPtrArray * conns; + const GPtrArray *conns; int i; - GDBusProxy * proxy; + GDBusProxy *proxy; gboolean done = FALSE; - char * path; + char *path; if (!nmtstc_service_available(gl.sinfo)) return; @@ -334,8 +334,8 @@ test_remove_connection(void) static void add_remove_cb(GObject *s, GAsyncResult *result, gpointer user_data) { - NMRemoteConnection *connection; - gboolean * done = user_data; + NMRemoteConnection *connection; + gboolean *done = user_data; gs_free_error GError *error = NULL; connection = nm_client_add_connection_finish(gl.client, result, &error); @@ -348,8 +348,8 @@ add_remove_cb(GObject *s, GAsyncResult *result, gpointer user_data) static void test_add_remove_connection(void) { - gs_unref_variant GVariant *ret = NULL; - GError * error = NULL; + gs_unref_variant GVariant *ret = NULL; + GError *error = NULL; gs_unref_object NMConnection *connection = NULL; gboolean done = FALSE; @@ -382,7 +382,7 @@ test_add_remove_connection(void) static void add_bad_cb(GObject *s, GAsyncResult *result, gpointer user_data) { - gboolean * done = user_data; + gboolean *done = user_data; gs_free_error GError *error = NULL; gl.remote = nm_client_add_connection_finish(gl.client, result, &error); @@ -418,7 +418,7 @@ test_add_bad_connection(void) static void save_hostname_cb(GObject *s, GAsyncResult *result, gpointer user_data) { - gboolean * done = user_data; + gboolean *done = user_data; gs_free_error GError *error = NULL; nm_client_save_hostname_finish(gl.client, result, &error); @@ -432,7 +432,7 @@ test_save_hostname(void) { gint64 until_ts; gboolean done = FALSE; - GError * error = NULL; + GError *error = NULL; if (!nmtstc_service_available(gl.sinfo)) return; diff --git a/src/libnm-client-impl/tests/test-secret-agent.c b/src/libnm-client-impl/tests/test-secret-agent.c index 8f758f3d..1fffb556 100644 --- a/src/libnm-client-impl/tests/test-secret-agent.c +++ b/src/libnm-client-impl/tests/test-secret-agent.c @@ -29,20 +29,20 @@ GType test_secret_agent_get_type(void); G_DEFINE_TYPE(TestSecretAgent, test_secret_agent, NM_TYPE_SECRET_AGENT_OLD) static void -test_secret_agent_get_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, - const char * setting_name, - const char ** hints, +test_secret_agent_get_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, + const char *setting_name, + const char **hints, NMSecretAgentGetSecretsFlags flags, NMSecretAgentOldGetSecretsFunc callback, gpointer callback_data) { NMSettingWirelessSecurity *s_wsec; - GVariant * secrets = NULL; + GVariant *secrets = NULL; GVariantBuilder secrets_builder, setting_builder; - char * secret = NULL; - GError * error = NULL; + char *secret = NULL; + GError *error = NULL; g_assert_cmpstr(setting_name, ==, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); @@ -91,16 +91,16 @@ done: static void test_secret_agent_cancel_get_secrets(NMSecretAgentOld *agent, - const char * connection_path, - const char * setting_name) + const char *connection_path, + const char *setting_name) { g_assert_not_reached(); } static void -test_secret_agent_save_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, +test_secret_agent_save_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, NMSecretAgentOldSaveSecretsFunc callback, gpointer callback_data) { @@ -108,9 +108,9 @@ test_secret_agent_save_secrets(NMSecretAgentOld * agent, } static void -test_secret_agent_delete_secrets(NMSecretAgentOld * agent, - NMConnection * connection, - const char * connection_path, +test_secret_agent_delete_secrets(NMSecretAgentOld *agent, + NMConnection *connection, + const char *connection_path, NMSecretAgentOldDeleteSecretsFunc callback, gpointer callback_data) { @@ -136,7 +136,7 @@ test_secret_agent_new(gboolean auto_register) static void test_secret_agent_class_init(TestSecretAgentClass *klass) { - GObjectClass * object_class = G_OBJECT_CLASS(klass); + GObjectClass *object_class = G_OBJECT_CLASS(klass); NMSecretAgentOldClass *agent_class = NM_SECRET_AGENT_OLD_CLASS(klass); agent_class->get_secrets = test_secret_agent_get_secrets; @@ -163,14 +163,14 @@ test_secret_agent_class_init(TestSecretAgentClass *klass) typedef struct { NMTstcServiceInfo *sinfo; - NMClient * client; + NMClient *client; NMSecretAgentOld *agent; - NMDevice * device; - NMConnection * connection; + NMDevice *device; + NMConnection *connection; GMainLoop *loop; - GSource * timeout_source; + GSource *timeout_source; char *ifname; char *con_id; @@ -182,8 +182,8 @@ static void connection_added_cb(GObject *s, GAsyncResult *result, gpointer user_data) { TestSecretAgentData *sadata = user_data; - NMRemoteConnection * connection; - GError * error = NULL; + NMRemoteConnection *connection; + GError *error = NULL; connection = nm_client_add_connection_finish(sadata->client, result, &error); @@ -198,7 +198,7 @@ static void register_cb(GObject *object, GAsyncResult *result, gpointer user_data) { TestSecretAgentData *sadata = user_data; - GError * error = NULL; + GError *error = NULL; nm_secret_agent_old_register_finish(sadata->agent, result, &error); g_assert_no_error(error); @@ -212,14 +212,14 @@ register_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void test_setup(TestSecretAgentData *sadata, gconstpointer test_data) { - static int static_counter = 0; - const int counter = static_counter++; - const char * create_agent = test_data; - NMConnection * connection; - NMSettingConnection *s_con; - NMSettingWireless * s_wireless; - GBytes * ssid; - NMSetting * s_wsec; + static int static_counter = 0; + const int counter = static_counter++; + const char *create_agent = test_data; + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWireless *s_wireless; + GBytes *ssid; + NMSetting *s_wsec; gs_free_error GError *error = NULL; sadata->sinfo = nmtstc_service_init(); @@ -296,8 +296,8 @@ test_setup(TestSecretAgentData *sadata, gconstpointer test_data) static void test_cleanup(TestSecretAgentData *sadata, gconstpointer test_data) { - GVariant * ret; - GError * error = NULL; + GVariant *ret; + GError *error = NULL; NMTstContextBusyWatcherData watcher_data = {}; g_assert(nm_g_main_context_is_thread_default(NULL)); @@ -358,8 +358,8 @@ test_cleanup(TestSecretAgentData *sadata, gconstpointer test_data) static void connection_activated_none_cb(GObject *c, GAsyncResult *result, gpointer user_data) { - TestSecretAgentData *sadata = user_data; - gs_free_error GError *error = NULL; + TestSecretAgentData *sadata = user_data; + gs_free_error GError *error = NULL; nm_client_activate_connection_finish(sadata->client, result, &error); g_assert_error(error, NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_NO_SECRETS); @@ -387,10 +387,10 @@ test_secret_agent_none(TestSecretAgentData *sadata, gconstpointer test_data) static char * secrets_requested_no_secrets_cb(TestSecretAgent *agent, - NMConnection * connection, - const char * connection_path, - const char * setting_name, - const char * secret_name, + NMConnection *connection, + const char *connection_path, + const char *setting_name, + const char *secret_name, gpointer user_data) { TestSecretAgentData *sadata = user_data; @@ -404,9 +404,9 @@ secrets_requested_no_secrets_cb(TestSecretAgent *agent, static void connection_activated_no_secrets_cb(GObject *c, GAsyncResult *result, gpointer user_data) { - TestSecretAgentData *sadata = user_data; - gs_unref_object NMActiveConnection *ac = NULL; - gs_free_error GError *error = NULL; + TestSecretAgentData *sadata = user_data; + gs_unref_object NMActiveConnection *ac = NULL; + gs_free_error GError *error = NULL; ac = nm_client_activate_connection_finish(sadata->client, result, &error); g_assert_error(error, NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_NO_SECRETS); @@ -441,9 +441,9 @@ test_secret_agent_no_secrets(TestSecretAgentData *sadata, gconstpointer test_dat static void connection_activated_cancel_cb(GObject *c, GAsyncResult *result, gpointer user_data) { - TestSecretAgentData *sadata = user_data; - gs_unref_object NMActiveConnection *ac = NULL; - gs_free_error GError *error = NULL; + TestSecretAgentData *sadata = user_data; + gs_unref_object NMActiveConnection *ac = NULL; + gs_free_error GError *error = NULL; ac = nm_client_activate_connection_finish(sadata->client, result, &error); g_assert_error(error, NM_AGENT_MANAGER_ERROR, NM_AGENT_MANAGER_ERROR_USER_CANCELED); @@ -452,10 +452,10 @@ connection_activated_cancel_cb(GObject *c, GAsyncResult *result, gpointer user_d static char * secrets_requested_cancel_cb(TestSecretAgent *agent, - NMConnection * connection, - const char * connection_path, - const char * setting_name, - const char * secret_name, + NMConnection *connection, + const char *connection_path, + const char *setting_name, + const char *secret_name, gpointer user_data) { TestSecretAgentData *sadata = user_data; @@ -495,8 +495,8 @@ static void connection_activated_good_cb(GObject *c, GAsyncResult *result, gpointer user_data) { TestSecretAgentData *sadata = user_data; - NMActiveConnection * ac; - GError * error = NULL; + NMActiveConnection *ac; + GError *error = NULL; ac = nm_client_activate_connection_finish(sadata->client, result, &error); g_assert_no_error(error); @@ -508,10 +508,10 @@ connection_activated_good_cb(GObject *c, GAsyncResult *result, gpointer user_dat static char * secrets_requested_good_cb(TestSecretAgent *agent, - NMConnection * connection, - const char * connection_path, - const char * setting_name, - const char * secret_name, + NMConnection *connection, + const char *connection_path, + const char *setting_name, + const char *secret_name, gpointer user_data) { TestSecretAgentData *sadata = user_data; @@ -550,8 +550,8 @@ test_secret_agent_good(TestSecretAgentData *sadata, gconstpointer test_data) static void async_init_cb(GObject *object, GAsyncResult *result, gpointer user_data) { - GMainLoop * loop = user_data; - gs_free_error GError *error = NULL; + GMainLoop *loop = user_data; + gs_free_error GError *error = NULL; gs_unref_object GObject *agent = NULL; agent = g_async_initable_new_finish(G_ASYNC_INITABLE(object), result, &error); @@ -564,9 +564,9 @@ async_init_cb(GObject *object, GAsyncResult *result, gpointer user_data) static void test_secret_agent_nm_not_running(void) { - gs_unref_object NMSecretAgentOld *agent = NULL; + gs_unref_object NMSecretAgentOld *agent = NULL; nm_auto_unref_gmainloop GMainLoop *loop = NULL; - GError * error = NULL; + GError *error = NULL; agent = g_initable_new(test_secret_agent_get_type(), NULL, @@ -626,12 +626,12 @@ registered_changed(GObject *object, GParamSpec *pspec, gpointer user_data) static void test_secret_agent_auto_register(void) { - NMTstcServiceInfo *sinfo; + NMTstcServiceInfo *sinfo; gs_unref_object NMSecretAgentOld *agent = NULL; - GError * error = NULL; + GError *error = NULL; AutoRegisterData auto_register_data = { - .step = 0, - .invoke_count = 0, + .step = 0, + .invoke_count = 0, }; gulong signal_id; NMTstContextBusyWatcherData watcher_data = {}; -- cgit 1.3.0-6-gf8a5