From 6c8eac1a4cbe0c6f5c43eddffa035a7b0f75731a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 12:20:13 +0100 Subject: [PATCH 1/6] modem: use defines for signal names --- src/devices/bluetooth/nm-device-bt.c | 2 +- src/devices/bluetooth/nm-device-bt.h | 2 ++ src/devices/wwan/nm-modem.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index 10b236c57..e3c623a73 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -1194,7 +1194,7 @@ nm_device_bt_class_init (NMDeviceBtClass *klass) g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); signals[PPP_STATS] = - g_signal_new ("ppp-stats", + g_signal_new (NM_DEVICE_BT_PPP_STATS, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, diff --git a/src/devices/bluetooth/nm-device-bt.h b/src/devices/bluetooth/nm-device-bt.h index 43bd42576..9bcf6ca86 100644 --- a/src/devices/bluetooth/nm-device-bt.h +++ b/src/devices/bluetooth/nm-device-bt.h @@ -37,6 +37,8 @@ #define NM_DEVICE_BT_CAPABILITIES "bt-capabilities" #define NM_DEVICE_BT_DEVICE "bt-device" +#define NM_DEVICE_BT_PPP_STATS "ppp-stats" + typedef struct _NMDeviceBt NMDeviceBt; typedef struct _NMDeviceBtClass NMDeviceBtClass; diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 2b33100ea..8ee273941 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -1663,7 +1663,7 @@ nm_modem_class_init (NMModemClass *klass) g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); signals[PPP_STATS] = - g_signal_new ("ppp-stats", + g_signal_new (NM_MODEM_PPP_STATS, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, @@ -1671,7 +1671,7 @@ nm_modem_class_init (NMModemClass *klass) G_TYPE_UINT, G_TYPE_UINT); signals[PPP_FAILED] = - g_signal_new ("ppp-failed", + g_signal_new (NM_MODEM_PPP_FAILED, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, From 42f60e30adb8cf6d467726c37d9d46ec3eb53903 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 12:01:07 +0100 Subject: [PATCH 2/6] modem: emit signal NM_MODEM_AUTH_REQUESTED by id not name --- src/devices/wwan/nm-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 8ee273941..4bffbc24b 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -201,7 +201,7 @@ nm_modem_set_mm_enabled (NMModem *self, /* Try to unlock the modem if it's being enabled */ if (enabled) - g_signal_emit_by_name (self, NM_MODEM_AUTH_REQUESTED, 0); + g_signal_emit (self, signals[AUTH_REQUESTED], 0); return; } From 9a8f8e8a897a2d19d5dbbb9632cff4720ae1c7cf Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 12:28:05 +0100 Subject: [PATCH 3/6] modem: remove unused variadic argument when emitting NM_MODEM_STATE_CHANGED signal The signal only has two arguments, no reason. --- src/devices/wwan/nm-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 4bffbc24b..fd9ae5002 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -158,7 +158,7 @@ nm_modem_set_state (NMModem *self, priv->state = new_state; _notify (self, PROP_STATE); - g_signal_emit (self, signals[STATE_CHANGED], 0, (int) new_state, (int) old_state, reason); + g_signal_emit (self, signals[STATE_CHANGED], 0, (int) new_state, (int) old_state); } } From 0a1fd88d5a0c4f266f1983fe7582ff32e16a0ca3 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 11:53:53 +0100 Subject: [PATCH 4/6] modem: add nm_modem_emit_prepare_result() function ... instead of emitting the signal by name. For one, we get the casting of the NMDeviceStateReason enum right. Also, emitting by the guint signal-id is faster then emitting by name. --- src/devices/bluetooth/nm-device-bt.c | 3 ++- src/devices/wwan/nm-device-modem.c | 3 ++- src/devices/wwan/nm-modem-broadband.c | 21 ++++++++++----------- src/devices/wwan/nm-modem-ofono.c | 14 +++++++------- src/devices/wwan/nm-modem.c | 8 ++++++++ src/devices/wwan/nm-modem.h | 2 ++ 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index e3c623a73..ae1a521a6 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -448,11 +448,12 @@ modem_auth_result (NMModem *modem, GError *error, gpointer user_data) static void modem_prepare_result (NMModem *modem, gboolean success, - NMDeviceStateReason reason, + guint i_reason, gpointer user_data) { NMDeviceBt *self = NM_DEVICE_BT (user_data); NMDevice *device = NM_DEVICE (self); + NMDeviceStateReason reason = i_reason; NMDeviceState state; state = nm_device_get_state (device); diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index b05692c36..a84768eef 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -110,12 +110,13 @@ ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data) static void modem_prepare_result (NMModem *modem, gboolean success, - NMDeviceStateReason reason, + guint i_reason, gpointer user_data) { NMDeviceModem *self = NM_DEVICE_MODEM (user_data); NMDevice *device = NM_DEVICE (self); NMDeviceState state; + NMDeviceStateReason reason = i_reason; state = nm_device_get_state (device); g_return_if_fail (state == NM_DEVICE_STATE_PREPARE); diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 322964514..8eef83b26 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -407,7 +407,7 @@ connect_ready (MMModemSimple *simple_iface, if (ip4_method == NM_MODEM_IP_METHOD_UNKNOWN && ip6_method == NM_MODEM_IP_METHOD_UNKNOWN) { _LOGW ("failed to connect modem: invalid bearer IP configuration"); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_CONFIG_FAILED); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, NM_DEVICE_STATE_REASON_CONFIG_FAILED); connect_context_clear (self); return; } @@ -439,11 +439,10 @@ send_pin_ready (MMSim *sim, GAsyncResult *result, NMModemBroadband *self) if (error) { if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN) || (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNAUTHORIZED) && - mm_modem_get_unlock_required (self->_priv.modem_iface) == MM_MODEM_LOCK_SIM_PIN)) { + mm_modem_get_unlock_required (self->_priv.modem_iface) == MM_MODEM_LOCK_SIM_PIN)) ask_for_pin (self); - } else { - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (self, error)); - } + else + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, translate_mm_error (self, error)); return; } @@ -506,7 +505,7 @@ connect_context_step (NMModemBroadband *self) _LOGW ("failed to connect '%s': not a mobile broadband modem", nm_connection_get_id (ctx->connection)); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); connect_context_clear (self); break; } @@ -520,7 +519,7 @@ connect_context_step (NMModemBroadband *self) error->message); g_clear_error (&error); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); connect_context_clear (self); break; } @@ -559,9 +558,9 @@ connect_context_step (NMModemBroadband *self) /* fall through */ case CONNECT_STEP_LAST: - if (self->_priv.ipv4_config || self->_priv.ipv6_config) { - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, TRUE, NM_DEVICE_STATE_REASON_NONE); - } else { + if (self->_priv.ipv4_config || self->_priv.ipv6_config) + nm_modem_emit_prepare_result (NM_MODEM (self), TRUE, NM_DEVICE_STATE_REASON_NONE); + else { /* If we have a saved error from a previous attempt, use it */ if (!ctx->first_error) ctx->first_error = g_error_new_literal (NM_DEVICE_ERROR, @@ -570,7 +569,7 @@ connect_context_step (NMModemBroadband *self) _LOGW ("failed to connect modem: %s", ctx->first_error->message); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (self, ctx->first_error)); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, translate_mm_error (self, ctx->first_error)); } connect_context_clear (self); diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c index 0fa9e6292..4fa05b199 100644 --- a/src/devices/wwan/nm-modem-ofono.c +++ b/src/devices/wwan/nm-modem-ofono.c @@ -724,8 +724,8 @@ stage1_prepare_done (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data if (error) { _LOGW ("connection failed: %s", error->message); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, - NM_DEVICE_STATE_REASON_MODEM_BUSY); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, + NM_DEVICE_STATE_REASON_MODEM_BUSY); /* * FIXME: add code to check for InProgress so that the * connection doesn't continue to try and activate, @@ -912,7 +912,7 @@ out: _LOGI ("emitting PREPARE_RESULT: %s", ret ? "TRUE" : "FALSE"); if (!ret) reason = NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE; - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, ret, reason); + nm_modem_emit_prepare_result (NM_MODEM (self), ret, reason); } else { _LOGW ("MODEM_PPP_FAILED"); g_signal_emit_by_name (self, NM_MODEM_PPP_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); @@ -955,14 +955,14 @@ context_proxy_new_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_dat priv->context_proxy = g_dbus_proxy_new_for_bus_finish (result, &error); if (error) { _LOGE ("failed to create ofono ConnectionContext DBus proxy: %s", error->message); - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, - NM_DEVICE_STATE_REASON_MODEM_BUSY); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, + NM_DEVICE_STATE_REASON_MODEM_BUSY); return; } if (!priv->gprs_attached) { - g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, - NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER); + nm_modem_emit_prepare_result (NM_MODEM (self), FALSE, + NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER); return; } diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index fd9ae5002..f6405cc53 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -222,6 +222,14 @@ nm_modem_emit_removed (NMModem *self) g_signal_emit (self, signals[REMOVED], 0); } +void +nm_modem_emit_prepare_result (NMModem *self, gboolean success, NMDeviceStateReason reason) +{ + nm_assert (NM_IS_MODEM (self)); + + g_signal_emit (self, signals[PREPARE_RESULT], 0, success, (guint) reason); +} + NMModemIPType nm_modem_get_supported_ip_types (NMModem *self) { diff --git a/src/devices/wwan/nm-modem.h b/src/devices/wwan/nm-modem.h index 13320080e..5b6aedbd8 100644 --- a/src/devices/wwan/nm-modem.h +++ b/src/devices/wwan/nm-modem.h @@ -239,6 +239,8 @@ NMModemIPType nm_modem_get_supported_ip_types (NMModem *self); /* For the modem-manager only */ void nm_modem_emit_removed (NMModem *self); +void nm_modem_emit_prepare_result (NMModem *self, gboolean success, NMDeviceStateReason reason); + GArray *nm_modem_get_connection_ip_type (NMModem *self, NMConnection *connection, GError **error); From 20b17910d04e2ba09891b09e59bb221c426a43fd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 11:53:53 +0100 Subject: [PATCH 5/6] modem: add nm_modem_emit_ppp_failed() function ... instead of emitting the signal by name. --- src/devices/bluetooth/nm-device-bt.c | 5 ++++- src/devices/wwan/nm-device-modem.c | 5 ++++- src/devices/wwan/nm-modem-ofono.c | 2 +- src/devices/wwan/nm-modem.c | 12 ++++++++++-- src/devices/wwan/nm-modem.h | 2 ++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index ae1a521a6..7528237a6 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -370,10 +370,13 @@ ppp_stats (NMModem *modem, } static void -ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data) +ppp_failed (NMModem *modem, + guint i_reason, + gpointer user_data) { NMDevice *device = NM_DEVICE (user_data); NMDeviceBt *self = NM_DEVICE_BT (user_data); + NMDeviceStateReason reason = i_reason; switch (nm_device_get_state (device)) { case NM_DEVICE_STATE_PREPARE: diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index a84768eef..3c4ed4d9d 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -68,10 +68,13 @@ G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE) /*****************************************************************************/ static void -ppp_failed (NMModem *modem, NMDeviceStateReason reason, gpointer user_data) +ppp_failed (NMModem *modem, + guint i_reason, + gpointer user_data) { NMDevice *device = NM_DEVICE (user_data); NMDeviceModem *self = NM_DEVICE_MODEM (user_data); + NMDeviceStateReason reason = i_reason; switch (nm_device_get_state (device)) { case NM_DEVICE_STATE_PREPARE: diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c index 4fa05b199..5f11f739c 100644 --- a/src/devices/wwan/nm-modem-ofono.c +++ b/src/devices/wwan/nm-modem-ofono.c @@ -915,7 +915,7 @@ out: nm_modem_emit_prepare_result (NM_MODEM (self), ret, reason); } else { _LOGW ("MODEM_PPP_FAILED"); - g_signal_emit_by_name (self, NM_MODEM_PPP_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); + nm_modem_emit_ppp_failed (NM_MODEM (self), NM_DEVICE_STATE_REASON_PPP_FAILED); } } diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index f6405cc53..805435676 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -230,6 +230,14 @@ nm_modem_emit_prepare_result (NMModem *self, gboolean success, NMDeviceStateReas g_signal_emit (self, signals[PREPARE_RESULT], 0, success, (guint) reason); } +void +nm_modem_emit_ppp_failed (NMModem *self, NMDeviceStateReason reason) +{ + nm_assert (NM_IS_MODEM (self)); + + g_signal_emit (self, signals[PPP_FAILED], 0, (guint) reason); +} + NMModemIPType nm_modem_get_supported_ip_types (NMModem *self) { @@ -390,10 +398,10 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ { switch (status) { case NM_PPP_STATUS_DISCONNECT: - g_signal_emit (NM_MODEM (user_data), signals[PPP_FAILED], 0, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); + nm_modem_emit_ppp_failed (user_data, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); break; case NM_PPP_STATUS_DEAD: - g_signal_emit (NM_MODEM (user_data), signals[PPP_FAILED], 0, NM_DEVICE_STATE_REASON_PPP_FAILED); + nm_modem_emit_ppp_failed (user_data, NM_DEVICE_STATE_REASON_PPP_FAILED); break; default: break; diff --git a/src/devices/wwan/nm-modem.h b/src/devices/wwan/nm-modem.h index 5b6aedbd8..df437b317 100644 --- a/src/devices/wwan/nm-modem.h +++ b/src/devices/wwan/nm-modem.h @@ -241,6 +241,8 @@ void nm_modem_emit_removed (NMModem *self); void nm_modem_emit_prepare_result (NMModem *self, gboolean success, NMDeviceStateReason reason); +void nm_modem_emit_ppp_failed (NMModem *self, NMDeviceStateReason reason); + GArray *nm_modem_get_connection_ip_type (NMModem *self, NMConnection *connection, GError **error); From 434e7b2aa36d8bd5d9988276ae126ae8d646bbcd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 23 Feb 2017 12:17:42 +0100 Subject: [PATCH 6/6] modem: cleanup integer types for ppp-stats signal In practice, guint32 is identical to guint. However, that is not guaranteed, and we should keep the types separate. --- src/devices/bluetooth/nm-device-bt.c | 12 ++++++++---- src/devices/wwan/nm-modem.c | 12 +++++++----- src/ppp/nm-ppp-manager.c | 7 ++++--- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index 7528237a6..aed3c3c33 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -362,11 +362,14 @@ complete_connection (NMDevice *device, static void ppp_stats (NMModem *modem, - guint32 in_bytes, - guint32 out_bytes, + guint i_in_bytes, + guint i_out_bytes, gpointer user_data) { - g_signal_emit (NM_DEVICE_BT (user_data), signals[PPP_STATS], 0, in_bytes, out_bytes); + guint32 in_bytes = i_in_bytes; + guint32 out_bytes = i_out_bytes; + + g_signal_emit (NM_DEVICE_BT (user_data), signals[PPP_STATS], 0, (guint) in_bytes, (guint) out_bytes); } static void @@ -1203,7 +1206,8 @@ nm_device_bt_class_init (NMDeviceBtClass *klass) G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, - G_TYPE_UINT, G_TYPE_UINT); + G_TYPE_UINT /*guint32 in_bytes*/, + G_TYPE_UINT /*guint32 out_bytes*/); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), NMDBUS_TYPE_DEVICE_BLUETOOTH_SKELETON, diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index 805435676..e959cffa3 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -495,18 +495,19 @@ ppp_ip6_config (NMPPPManager *ppp_manager, static void ppp_stats (NMPPPManager *ppp_manager, - guint32 in_bytes, - guint32 out_bytes, + guint i_in_bytes, + guint i_out_bytes, gpointer user_data) { NMModem *self = NM_MODEM (user_data); NMModemPrivate *priv = NM_MODEM_GET_PRIVATE (self); + guint32 in_bytes = i_in_bytes; + guint32 out_bytes = i_out_bytes; if (priv->in_bytes != in_bytes || priv->out_bytes != out_bytes) { priv->in_bytes = in_bytes; priv->out_bytes = out_bytes; - - g_signal_emit (self, signals[PPP_STATS], 0, in_bytes, out_bytes); + g_signal_emit (self, signals[PPP_STATS], 0, (guint) in_bytes, (guint) out_bytes); } } @@ -1684,7 +1685,8 @@ nm_modem_class_init (NMModemClass *klass) G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, - G_TYPE_UINT, G_TYPE_UINT); + G_TYPE_UINT /*guint32 in_bytes*/, + G_TYPE_UINT /*guint32 out_bytes*/); signals[PPP_FAILED] = g_signal_new (NM_MODEM_PPP_FAILED, diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c index bb7821e97..010866ff6 100644 --- a/src/ppp/nm-ppp-manager.c +++ b/src/ppp/nm-ppp-manager.c @@ -150,8 +150,8 @@ monitor_cb (gpointer user_data) _LOGW ("could not read ppp stats: %s", strerror (errno)); } else { g_signal_emit (manager, signals[STATS], 0, - stats.p.ppp_ibytes, - stats.p.ppp_obytes); + (guint) stats.p.ppp_ibytes, + (guint) stats.p.ppp_obytes); } return TRUE; @@ -1277,7 +1277,8 @@ nm_ppp_manager_class_init (NMPPPManagerClass *manager_class) 0, NULL, NULL, NULL, G_TYPE_NONE, 2, - G_TYPE_UINT, G_TYPE_UINT); + G_TYPE_UINT /*guint32 in_bytes*/, + G_TYPE_UINT /*guint32 out_bytes*/); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (manager_class), NMDBUS_TYPE_PPP_MANAGER_SKELETON,