summary refs log tree commit diff
path: root/src/modem-manager
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-06-29 20:12:44 +0200
committerMichael Biebl <biebl@debian.org>2012-06-29 20:12:44 +0200
commit867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (patch)
tree7c698b403882736ab70c3efd524c3460f08c391c /src/modem-manager
parentde06e5715e780baade318f3490ac7a4c9ce84e32 (diff)
Imported Upstream version 0.9.5.95 upstream/0.9.5.95
Diffstat (limited to 'src/modem-manager')
-rw-r--r--src/modem-manager/Makefile.in11
-rw-r--r--src/modem-manager/nm-modem.c12
2 files changed, 18 insertions, 5 deletions
diff --git a/src/modem-manager/Makefile.in b/src/modem-manager/Makefile.in
index 87afed0c..31209330 100644
--- a/src/modem-manager/Makefile.in
+++ b/src/modem-manager/Makefile.in
@@ -47,7 +47,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
 	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
 	$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -171,6 +171,10 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 INTLTOOL_MERGE = @INTLTOOL_MERGE@
 INTLTOOL_PERL = @INTLTOOL_PERL@
 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
 INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
@@ -266,6 +270,9 @@ UDEV_BASE_DIR = @UDEV_BASE_DIR@
 USE_NLS = @USE_NLS@
 UUID_CFLAGS = @UUID_CFLAGS@
 UUID_LIBS = @UUID_LIBS@
+VAPIGEN = @VAPIGEN@
+VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@
+VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@
 VERSION = @VERSION@
 XGETTEXT = @XGETTEXT@
 XGETTEXT_015 = @XGETTEXT_015@
@@ -304,6 +311,8 @@ htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
 libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c
index 91c0b06d..c9c9e9a4 100644
--- a/src/modem-manager/nm-modem.c
+++ b/src/modem-manager/nm-modem.c
@@ -591,7 +591,7 @@ real_deactivate (NMModem *self, NMDevice *device)
 	case MM_MODEM_IP_METHOD_STATIC:
 	case MM_MODEM_IP_METHOD_DHCP:
 		ifindex = nm_device_get_ip_ifindex (device);
-		if (ifindex >= 0) {
+		if (ifindex > 0) {
 			/* FIXME: use AF_UNSPEC here when we have IPv6 support */
 			nm_system_iface_flush_routes (ifindex, AF_INET);
 			nm_system_iface_flush_addresses (ifindex, AF_UNSPEC);
@@ -614,8 +614,9 @@ static void
 disconnect_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data)
 {
 	GError *error = NULL;
+	gboolean warn = GPOINTER_TO_UINT (user_data);
 
-	if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
+	if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID) && warn) {
 		nm_log_info (LOGD_MB, "disconnect failed: (%d) %s",
 		             error ? error->code : -1,
 		             error && error->message ? error->message : "(unknown)");
@@ -628,7 +629,7 @@ nm_modem_device_state_changed (NMModem *self,
                                NMDeviceState old_state,
                                NMDeviceStateReason reason)
 {
-	gboolean was_connected = FALSE;
+	gboolean was_connected = FALSE, warn = TRUE;
 	NMModemPrivate *priv;
 
 	g_return_if_fail (self != NULL);
@@ -658,10 +659,13 @@ nm_modem_device_state_changed (NMModem *self,
 		}
 
 		if (was_connected) {
+			/* Don't bother warning on FAILED since the modem is already gone */
+			if (new_state == NM_DEVICE_STATE_FAILED)
+				warn = FALSE;
 			dbus_g_proxy_begin_call (nm_modem_get_proxy (self, MM_DBUS_INTERFACE_MODEM),
 			                         "Disconnect",
 			                         disconnect_done,
-			                         self,
+			                         GUINT_TO_POINTER (warn),
 			                         NULL,
 			                         G_TYPE_INVALID);
 		}