Handle modem IP interface changes after device is recognized

This commit is contained in:
Dan Williams 2011-02-01 21:21:21 -06:00
parent 31be45ca2f
commit 1c77896629
2 changed files with 33 additions and 1 deletions

View File

@ -20,7 +20,7 @@ Name: NetworkManager
Summary: Network connection manager and user applications
Epoch: 1
Version: 0.8.2
Release: 4%{snapshot}%{?dist}
Release: 5%{snapshot}%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/
@ -31,6 +31,7 @@ Source2: NetworkManager.conf
Patch1: nm-applet-internal-buildfixes.patch
Patch2: explain-dns1-dns2.patch
Patch3: nm-applet-no-notifications.patch
Patch4: modem-ip-interface-property-change.patch
Patch10: Port-to-libnotify-070.patch
Patch11: gtk3-1.patch
Patch12: gtk3-2.patch
@ -168,6 +169,7 @@ tar -xjf %{SOURCE1}
%patch1 -p1 -b .buildfix
%patch2 -p1 -b .explain-dns1-dns2
%patch3 -p1 -b .no-notifications
%patch4 -p1 -b .modem-ip-iface
pushd network-manager-applet-%{realversion}
%patch10 -p1 -b .libnotify-070
%patch11 -p1 -b .gtk3-1
@ -436,6 +438,9 @@ fi
%{_datadir}/gtk-doc/html/libnm-util/*
%changelog
* Tue Feb 1 2011 Dan Williams <dcbw@redhat.com> - 0.8.2-5.git20101117
- Handle modem IP interface changes after device is recognized
* Mon Jan 10 2011 Matthias Clasen <mclasen@redhat.com> - 0.8.2-4.git20101117
- Rebuild against new gtk3

View File

@ -0,0 +1,27 @@
From 2bee736df163b5ee28b13c85f7b63ba55be80415 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
Date: Sun, 02 Jan 2011 00:00:50 +0000
Subject: modem: handle IP Method changes after modem has been created
Some modems don't know their IP method when they are created, but
will update it later. Handle the changed signal for that.
---
diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c
index e07b818..b3f7eaa 100644
--- a/src/modem-manager/nm-modem.c
+++ b/src/modem-manager/nm-modem.c
@@ -876,6 +876,12 @@ modem_properties_changed (DBusGProxy *proxy,
priv->mm_enabled = g_value_get_boolean (value);
g_object_notify (G_OBJECT (self), NM_MODEM_ENABLED);
}
+
+ value = g_hash_table_lookup (props, "IpMethod");
+ if (value && G_VALUE_HOLDS_UINT (value)) {
+ priv->ip_method = g_value_get_uint (value);
+ g_object_notify (G_OBJECT (self), NM_MODEM_IP_METHOD);
+ }
}
/*****************************************************************************/
--
cgit v0.8.3-6-g21f6