Hello community,
here is the log from the commit of package NetworkManager
checked in at Wed Sep 24 17:14:53 CEST 2008.
--------
--- NetworkManager/NetworkManager.changes 2008-09-15 14:23:57.000000000 +0200
+++ /mounts/work_src_done/STABLE/NetworkManager/NetworkManager.changes 2008-09-19 15:52:54.000000000 +0200
@@ -1,0 +2,11 @@
+Fri Sep 19 14:15:56 EEST 2008 - tambet@suse.de
+
+- Update NIS information from a dispatcher script.
+- Make it build on 11.0 as well.
+- Update to the latest upstream:
+ + Default to "all ciphers" for wireless security setting.
+ + Fix a problem where unamanaged devices could cause recursive connection reloads.
+ + Fix a typo causing crashes in keyfile plugin.
+ + Updated translations: cs, fi, fr, nl.
+
+-------------------------------------------------------------------
Old:
----
NetworkManager-0.7.0.r4060.tar.bz2
NetworkManager-r4060-use-modem-manager.patch
New:
----
NetworkManager-0.7.0.r4076.tar.bz2
NetworkManager-r4076-use-modem-manager.patch
nis
nm-dbus-glib-opensuse110.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.Ia8447/_old 2008-09-24 17:14:06.000000000 +0200
+++ /var/tmp/diff_new_pack.Ia8447/_new 2008-09-24 17:14:06.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package NetworkManager (Version 0.7.0.r4060)
+# spec file for package NetworkManager (Version 0.7.0.r4076)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@
Name: NetworkManager
Url: http://www.gnome.org/projects/NetworkManager/
-Version: 0.7.0.r4060
-Release: 3
+Version: 0.7.0.r4076
+Release: 1
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: PolicyKit-devel dhcp-client gtk-doc hal-devel intltool iproute2 libgcrypt-devel libnl-devel libtool mozilla-nss-devel ppp-devel wireless-tools
@@ -29,7 +29,11 @@
Source0: NetworkManager-%{version}.tar.bz2
Source1: nfs
Source2: nm-system-settings.conf
-Patch0: NetworkManager-r4060-use-modem-manager.patch
+Source3: nis
+Patch0: NetworkManager-r4076-use-modem-manager.patch
+%if 0%{?suse_version} == 1100
+Patch1: nm-dbus-glib-opensuse110.patch
+%endif
Requires: wpa_supplicant >= 0.5.8-54
Requires: dhcp-client
Requires: mozilla-nss
@@ -118,6 +122,9 @@
%prep
%setup -n %{name}-0.7.0 -q
%patch0 -p1
+%if 0%{?suse_version} == 1100
+%patch1 -p1
+%endif
pppddir=`ls -1d /usr/%_lib/pppd/2*`
test -n "$pppddir" || exit 1
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@@ -146,6 +153,7 @@
touch $RPM_BUILD_ROOT/var/log/NetworkManager
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/system-connections
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/
+install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d/
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/
%clean
@@ -191,6 +199,7 @@
%dir %{_sysconfdir}/NetworkManager/system-connections
%{_sysconfdir}/NetworkManager/nm-system-settings.conf
%attr(0755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/nfs
+%attr(0755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/nis
%ghost %config(noreplace) /var/log/NetworkManager
%files devel
@@ -220,9 +229,17 @@
%{_datadir}/gtk-doc/html/libnm-glib/*
%changelog
+* Fri Sep 19 2008 tambet@suse.de
+- Update NIS information from a dispatcher script.
+- Make it build on 11.0 as well.
+- Update to the latest upstream:
+ + Default to "all ciphers" for wireless security setting.
+ + Fix a problem where unamanaged devices could cause recursive connection reloads.
+ + Fix a typo causing crashes in keyfile plugin.
+ + Updated translations: cs, fi, fr, nl.
* Mon Sep 15 2008 ro@suse.de
- added directory to filelist
-* Sun Sep 14 2008 aj@suse.de
+* Mon Sep 15 2008 aj@suse.de
- Fix directory ownership.
- Remove unneeded build require on ppp.
* Fri Sep 12 2008 tambet@suse.de
@@ -429,7 +446,7 @@
* Mon Jun 19 2006 rml@suse.de
- Fix automatic connection to WPA Enterprise networks (Novell bug
[#175172])
-* Fri Jun 16 2006 rml@suse.de
+* Sat Jun 17 2006 rml@suse.de
- Update translations (Novell bug #169096)
* Mon Jun 12 2006 rml@suse.de
- nm-applet: Add nm-dialup-bugfix-183974.patch to fix bug where the
@@ -463,7 +480,7 @@
- Merged upstream translations from GNOME CVS (#169096#c37).
* Mon May 29 2006 sbrabec@suse.cz
- Use translation compendium gnome-patch-translation (#169096).
-* Fri May 26 2006 rml@suse.de
+* Sat May 27 2006 rml@suse.de
- Make sure we require and correctly build with gcrypt support
(Novell bug #179315)
* Thu May 25 2006 rml@suse.de
@@ -517,7 +534,7 @@
GNOME keyring and not in gconf (Novell bug #173823)
- Merge nm-online-header.patch into nm-0.6-branch.patch (fix is now
upstream)
-* Sun May 07 2006 jpr@suse.de
+* Mon May 08 2006 jpr@suse.de
- Fix header include to fix build
* Tue May 02 2006 rml@suse.de
- Install nm-online utility (start of fix for Novell bug #169632)
@@ -557,10 +574,10 @@
- Reflect active modem/ISDN connections in state. Fixes bug where
NM would report system as offline even if dial up connection were
active (Novell bug #161611)
-* Tue Apr 04 2006 rml@suse.de
+* Wed Apr 05 2006 rml@suse.de
- nm-applet: Remove 'Remove' option from right-click menu (undo
Novell bug #155690)
-* Wed Mar 29 2006 rml@suse.de
+* Thu Mar 30 2006 rml@suse.de
- Allow VPN modules to specify a per-route MSS value (bug #157988)
- Fix possible crash in strcmp (Novell bug #162104)
- Have NetworkManager require NetworkManager-client and have
@@ -594,7 +611,7 @@
- Do not override the gtk default invisible character
- Bump dbus-1 requirement to 0.60-22 or later
- Bump dhcdbd requirement to 1.12-9 or later
-* Wed Mar 22 2006 rml@suse.de
+* Thu Mar 23 2006 rml@suse.de
- Properly handle "Dynamic WEP" (Novell bug #158589)
* Tue Mar 21 2006 rml@suse.de
- Respect and set per-device MTU value in sysconfig, if any (Novell
@@ -633,17 +650,17 @@
- Update to 0.6.0cvs20060310
- Fix WPA Enterprise SEGV on successfull connect (Bug #156973)
- Do not log WPA Enterprise password in clear text (Bug #156977)
-* Thu Mar 09 2006 rml@suse.de
+* Fri Mar 10 2006 rml@suse.de
- Update to 0.6.0cvs20060309
- Parse sysconfig encryption settings, too
* Wed Mar 08 2006 rml@suse.de
- Update to 0.6.0cvs20060308
- nm-applet: Hide password keystrokes (Novell beta customer)
- Trust wireless networks in sysconfig
-* Tue Mar 07 2006 rml@suse.de
+* Wed Mar 08 2006 rml@suse.de
- Update to 0.6.0cvs20060307
- nm-applet: Add 'Remove' option to the applet (Novell bug #155690)
-* Mon Mar 06 2006 rml@suse.de
+* Tue Mar 07 2006 rml@suse.de
- Have NetworkManager.pc provide the NetworkManager include
directory in CFLAGS.
- Undo prism54 workarounds
@@ -655,7 +672,7 @@
and #144938)
- Workaround for airo wireless driver
- Improved handling of activation cancellation (Novell bug #150787)
-* Fri Mar 03 2006 rml@suse.de
+* Sat Mar 04 2006 rml@suse.de
- Update to 0.6.0 (just a version bump)
* Fri Mar 03 2006 rml@suse.de
- Update to 0.5.1cvs20060303
@@ -718,7 +735,7 @@
- Fix VPN GUI dialog when successively editing entries of two
or more different VPN types (Novell bug #150854)
- Improve debugging output
-* Tue Feb 14 2006 rml@suse.de
+* Wed Feb 15 2006 rml@suse.de
- Update to 0.5.1cvs20060214
- Fix connecting non-broadcast encrypted networks (blocker #150784)
* Mon Feb 13 2006 rml@suse.de
@@ -738,7 +755,7 @@
- Better handling of non-broadcast networks
- Merge half of nm-madwifi-wpa-driver-rml.patch upstream
- Remove nm-supplicant-timeout-rml.patch, merged upstream
-* Fri Feb 03 2006 rml@suse.de
+* Sat Feb 04 2006 rml@suse.de
- Update to 0.5.1cvs20060203
- Do not log encryption information (per bug #147748)
- Fix memory leak in SUSE backend
@@ -768,14 +785,14 @@
* Thu Jan 26 2006 rml@suse.de
- Update to 0.5.1cvs20060126
- Move all non-GNOME bits out of /opt/gnome
-* Wed Jan 25 2006 rml@suse.de
+* Thu Jan 26 2006 rml@suse.de
- Update to 0.5.1cvs20060125
- Remove temporary patch nm-dhcp-hostname-byte-array-thoenig-01,
merged upstream
- Add nm-fix-madwifi-strength-rml.patch, fixing strength output of
Atheros devices
- Update BuildRequires
-* Wed Jan 25 2006 mls@suse.de
+* Thu Jan 26 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 25 2006 thoenig@suse.de
- temporary patch nm-dhcp-hostname-byte-array-thoenig-01.patch to
@@ -805,7 +822,7 @@
- Update to 0.5.1cvs20060116
- Fixes #135595
- C++-sanitizes headers for thoenig
-* Fri Jan 13 2006 rml@suse.de
+* Sat Jan 14 2006 rml@suse.de
- Update to 0.5.1cvs20060113
* Fri Jan 13 2006 rml@suse.de
- Fix Novell #142773.
@@ -891,7 +908,7 @@
- New version 0.4cvs20050725
* Thu Jul 21 2005 jpr@suse.de
- Build against dbus 0.35
-* Thu Jun 30 2005 gekker@suse.de
+* Fri Jul 01 2005 gekker@suse.de
- Upate to version 0.4cvs20050630
- Update patch for connection dialog
- Remove patched NetworkManager.conf source
++++++ NetworkManager-0.7.0.r4060.tar.bz2 -> NetworkManager-0.7.0.r4076.tar.bz2 ++++++
++++ 3211 lines of diff (skipped)
++++++ NetworkManager-r4060-use-modem-manager.patch -> NetworkManager-r4076-use-modem-manager.patch ++++++
--- NetworkManager/NetworkManager-r4060-use-modem-manager.patch 2008-09-12 13:54:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/NetworkManager/NetworkManager-r4076-use-modem-manager.patch 2008-09-19 13:24:49.000000000 +0200
@@ -1,3 +1,19 @@
+diff --git a/ChangeLog b/ChangeLog
+index 7907d72..1ba5cc4 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,11 +1,3 @@
+-2008-09-18 Dan Williams
+-
+- * libnm-util/nm-setting-wireless.c
+- - (nm_setting_wireless_ap_security_compatible): only verify pairwise and
+- group ciphers if the wireless-security setting explicitly specified
+- them, effectively making the default be "all ciphers" (idea from
+- Alexander Sack)
+-
+ 2008-09-15 Dan Williams
+
+ Patch from Alexander Sack
diff --git a/configure.in b/configure.in
index bd86fc2..fdc4369 100644
--- a/configure.in
@@ -48,6 +64,128 @@
-
</interface>
</node>
+diff --git a/libnm-util/nm-setting-wireless.c b/libnm-util/nm-setting-wireless.c
+index 7eeafd3..6d06a0e 100644
+--- a/libnm-util/nm-setting-wireless.c
++++ b/libnm-util/nm-setting-wireless.c
+@@ -174,33 +174,25 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
+ || !(ap_wpa & (NM_802_11_AP_SEC_GROUP_WEP40 | NM_802_11_AP_SEC_GROUP_WEP104)))
+ return FALSE;
+
+- /* Match at least one pairwise cipher with AP's capability if the
+- * wireless-security setting explicitly lists pairwise ciphers
+- */
+- if (s_wireless_sec->pairwise) {
+- for (iter = s_wireless_sec->pairwise; iter; iter = g_slist_next (iter)) {
+- if ((found = match_cipher (iter->data, "wep40", ap_wpa, ap_wpa, NM_802_11_AP_SEC_PAIR_WEP40)))
+- break;
+- if ((found = match_cipher (iter->data, "wep104", ap_wpa, ap_wpa, NM_802_11_AP_SEC_PAIR_WEP104)))
+- break;
+- }
+- if (!found)
+- return FALSE;
++ /* Match at least one pairwise cipher with AP's capability */
++ for (iter = s_wireless_sec->pairwise; iter; iter = g_slist_next (iter)) {
++ if ((found = match_cipher (iter->data, "wep40", ap_wpa, ap_wpa, NM_802_11_AP_SEC_PAIR_WEP40)))
++ break;
++ if ((found = match_cipher (iter->data, "wep104", ap_wpa, ap_wpa, NM_802_11_AP_SEC_PAIR_WEP104)))
++ break;
+ }
++ if (!found)
++ return FALSE;
+
+- /* Match at least one group cipher with AP's capability if the
+- * wireless-security setting explicitly lists group ciphers
+- */
+- if (s_wireless_sec->group) {
+- for (iter = s_wireless_sec->group; iter; iter = g_slist_next (iter)) {
+- if ((found = match_cipher (iter->data, "wep40", ap_wpa, ap_wpa, NM_802_11_AP_SEC_GROUP_WEP40)))
+- break;
+- if ((found = match_cipher (iter->data, "wep104", ap_wpa, ap_wpa, NM_802_11_AP_SEC_GROUP_WEP104)))
+- break;
+- }
+- if (!found)
+- return FALSE;
++ /* Match at least one group cipher with AP's capability */
++ for (iter = s_wireless_sec->group; iter; iter = g_slist_next (iter)) {
++ if ((found = match_cipher (iter->data, "wep40", ap_wpa, ap_wpa, NM_802_11_AP_SEC_GROUP_WEP40)))
++ break;
++ if ((found = match_cipher (iter->data, "wep104", ap_wpa, ap_wpa, NM_802_11_AP_SEC_GROUP_WEP104)))
++ break;
+ }
++ if (!found)
++ return FALSE;
+ }
+ return TRUE;
+ }
+@@ -214,6 +206,9 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
+ if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))
+ return FALSE;
+
++ if (!s_wireless_sec->pairwise || !s_wireless_sec->group)
++ return FALSE;
++
+ if (!strcmp (s_wireless_sec->key_mgmt, "wpa-psk")) {
+ if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK)
+ && !(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_PSK))
+@@ -228,37 +223,29 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
+ // if the Connection only uses WPA we don't match a cipher against
+ // the AP's RSN IE instead
+
+- /* Match at least one pairwise cipher with AP's capability if the
+- * wireless-security setting explicitly lists pairwise ciphers
+- */
+- if (s_wireless_sec->pairwise) {
+- for (elt = s_wireless_sec->pairwise; elt; elt = g_slist_next (elt)) {
+- if ((found = match_cipher (elt->data, "tkip", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_TKIP)))
+- break;
+- if ((found = match_cipher (elt->data, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_CCMP)))
+- break;
+- }
+- if (!found)
+- return FALSE;
++ /* Match at least one pairwise cipher with AP's capability */
++ for (elt = s_wireless_sec->pairwise; elt; elt = g_slist_next (elt)) {
++ if ((found = match_cipher (elt->data, "tkip", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_TKIP)))
++ break;
++ if ((found = match_cipher (elt->data, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_PAIR_CCMP)))
++ break;
+ }
++ if (!found)
++ return FALSE;
+
+- /* Match at least one group cipher with AP's capability if the
+- * wireless-security setting explicitly lists group ciphers
+- */
+- if (s_wireless_sec->group) {
+- for (elt = s_wireless_sec->group; elt; elt = g_slist_next (elt)) {
+- if ((found = match_cipher (elt->data, "wep40", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_WEP40)))
+- break;
+- if ((found = match_cipher (elt->data, "wep104", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_WEP104)))
+- break;
+- if ((found = match_cipher (elt->data, "tkip", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_TKIP)))
+- break;
+- if ((found = match_cipher (elt->data, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_CCMP)))
+- break;
+- }
+- if (!found)
+- return FALSE;
++ /* Match at least one group cipher with AP's capability */
++ for (elt = s_wireless_sec->group; elt; elt = g_slist_next (elt)) {
++ if ((found = match_cipher (elt->data, "wep40", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_WEP40)))
++ break;
++ if ((found = match_cipher (elt->data, "wep104", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_WEP104)))
++ break;
++ if ((found = match_cipher (elt->data, "tkip", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_TKIP)))
++ break;
++ if ((found = match_cipher (elt->data, "ccmp", ap_wpa, ap_rsn, NM_802_11_AP_SEC_GROUP_CCMP)))
++ break;
+ }
++ if (!found)
++ return FALSE;
+
+ return TRUE;
+ }
diff --git a/src/Makefile.am b/src/Makefile.am
index 3c4ce75..3f24eb5 100644
--- a/src/Makefile.am
@@ -890,7 +1028,7 @@
+#endif /* NM_GSM_MODEM_HSO_H */
diff --git a/src/modem-manager/nm-gsm-modem.c b/src/modem-manager/nm-gsm-modem.c
new file mode 100644
-index 0000000..271e23f
+index 0000000..02fe692
--- /dev/null
+++ b/src/modem-manager/nm-gsm-modem.c
@@ -0,0 +1,329 @@
@@ -1088,11 +1226,11 @@
+
+ case MODEM_STATE_SET_NETWORK_MODE:
+ priv->modem_state = MODEM_STATE_REGISTER;
-+ dbus_g_proxy_begin_call (get_proxy (modem, MM_DBUS_INTERFACE_MODEM_GSM_NETWORK),
-+ "Register", state_machine,
-+ modem, NULL,
-+ G_TYPE_STRING, setting->network_id ? setting->network_id : "",
-+ G_TYPE_INVALID);
++ dbus_g_proxy_begin_call_with_timeout (get_proxy (modem, MM_DBUS_INTERFACE_MODEM_GSM_NETWORK),
++ "Register", state_machine,
++ modem, NULL, 120000,
++ G_TYPE_STRING, setting->network_id ? setting->network_id : "",
++ G_TYPE_INVALID);
+ break;
+
+ case MODEM_STATE_REGISTER:
@@ -1267,7 +1405,7 @@
+#endif /* NM_GSM_MODEM_H */
diff --git a/src/modem-manager/nm-modem-device.c b/src/modem-manager/nm-modem-device.c
new file mode 100644
-index 0000000..c5ea8c6
+index 0000000..07c429b
--- /dev/null
+++ b/src/modem-manager/nm-modem-device.c
@@ -0,0 +1,467 @@
@@ -1537,11 +1675,11 @@
+static void
+real_connect (NMModemDevice *modem, const char *number)
+{
-+ dbus_g_proxy_begin_call (nm_modem_device_get_proxy (modem, MM_DBUS_INTERFACE_MODEM),
-+ "Connect", connect_done,
-+ modem, NULL,
-+ G_TYPE_STRING, number ? number : "",
-+ G_TYPE_INVALID);
++ dbus_g_proxy_begin_call_with_timeout (nm_modem_device_get_proxy (modem, MM_DBUS_INTERFACE_MODEM),
++ "Connect", connect_done,
++ modem, NULL, 60000,
++ G_TYPE_STRING, number ? number : "",
++ G_TYPE_INVALID);
+}
+
+static gboolean
@@ -1795,10 +1933,10 @@
+#endif /* NM_MODEM_DEVICE_H */
diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c
new file mode 100644
-index 0000000..6e37ebd
+index 0000000..66db012
--- /dev/null
+++ b/src/modem-manager/nm-modem-manager.c
-@@ -0,0 +1,404 @@
+@@ -0,0 +1,388 @@
+/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+
+#include
@@ -1968,7 +2106,6 @@
+static void
+modem_added (DBusGProxy *proxy, const char *path, gpointer user_data)
+{
-+ g_print ("Modem added %s\n", path);
+ create_modem (NM_MODEM_MANAGER (user_data), path);
+}
+
@@ -1978,8 +2115,6 @@
+ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (user_data);
+ NMModemDevice *modem;
+
-+ g_print ("Modem removed %s\n", path);
-+
+ modem = (NMModemDevice *) g_hash_table_lookup (priv->modems, path);
+ if (modem) {
+ g_signal_emit (user_data, signals[DEVICE_REMOVED], 0, modem);
@@ -1987,8 +2122,29 @@
+ }
+}
+
++static gboolean
++poke_modem_cb (gpointer user_data)
++{
++ NMModemManager *self = NM_MODEM_MANAGER (user_data);
++ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
++ DBusGConnection *g_connection;
++ DBusGProxy *proxy;
++
++ g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr);
++ proxy = dbus_g_proxy_new_for_name (g_connection,
++ MM_DBUS_SERVICE,
++ MM_DBUS_PATH,
++ MM_DBUS_INTERFACE);
++
++ nm_info ("Trying to start the modem-manager...");
++ dbus_g_proxy_call_no_reply (proxy, "EnumerateDevices", G_TYPE_INVALID);
++ g_object_unref (proxy);
++
++ return TRUE;
++}
++
+static void
-+get_modems_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer data)
++enumerate_devices_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer data)
+{
+ NMModemManager *manager = NM_MODEM_MANAGER (data);
+ GPtrArray *modems;
@@ -2005,7 +2161,6 @@
+ for (i = 0; i < modems->len; i++) {
+ char *path = (char *) g_ptr_array_index (modems, i);
+
-+ g_print ("Got modem: %s\n", path);
+ create_modem (manager, path);
+ g_free (path);
+ }
@@ -2014,71 +2169,55 @@
+ }
+}
+
-+static gboolean
-+get_modems (gpointer data)
++static void
++modem_manager_appeared (NMModemManager *self)
+{
-+ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (data);
++ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
++
++ if (priv->poke_id) {
++ g_source_remove (priv->poke_id);
++ priv->poke_id = 0;
++ }
+
+ priv->proxy = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr),
+ MM_DBUS_SERVICE, MM_DBUS_PATH, MM_DBUS_INTERFACE);
+
+ dbus_g_proxy_add_signal (priv->proxy, "DeviceAdded", G_TYPE_STRING, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (priv->proxy, "DeviceAdded",
-+ G_CALLBACK (modem_added),
-+ data,
++ G_CALLBACK (modem_added), self,
+ NULL);
+
+ dbus_g_proxy_add_signal (priv->proxy, "DeviceRemoved", G_TYPE_STRING, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal (priv->proxy, "DeviceRemoved",
-+ G_CALLBACK (modem_removed),
-+ data,
++ G_CALLBACK (modem_removed), self,
+ NULL);
+
-+ dbus_g_proxy_begin_call (priv->proxy, "EnumerateDevices", get_modems_cb, data, NULL, G_TYPE_INVALID);
-+
-+ return FALSE;
++ dbus_g_proxy_begin_call (priv->proxy, "EnumerateDevices", enumerate_devices_done, self, NULL, G_TYPE_INVALID);
+}
+
+static gboolean
-+nm_modem_manager_startup (NMModemManager *self)
++remove_one_modem (gpointer key, gpointer value, gpointer user_data)
+{
-+ gboolean running;
++ g_signal_emit (user_data, signals[DEVICE_REMOVED], 0, value);
+
-+ running = nm_dbus_manager_name_has_owner (NM_MODEM_MANAGER_GET_PRIVATE (self)->dbus_mgr, MM_DBUS_SERVICE);
-+ if (running) {
-+ g_idle_add (get_modems, self);
-+ }
-+
-+ return running;
++ return TRUE;
+}
+
-+static gboolean
-+poke_modem_cb (gpointer user_data)
++static void
++modem_manager_disappeared (NMModemManager *self)
+{
-+ NMModemManager *self = NM_MODEM_MANAGER (user_data);
+ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
-+ DBusGConnection *g_connection;
-+ DBusGProxy *proxy;
+
-+ g_connection = nm_dbus_manager_get_connection (priv->dbus_mgr);
-+ proxy = dbus_g_proxy_new_for_name (g_connection,
-+ MM_DBUS_SERVICE,
-+ MM_DBUS_PATH,
-+ MM_DBUS_INTERFACE);
-+ if (!proxy) {
-+ nm_warning ("Error: could not init wpa_modem proxy");
-+ goto out;
-+ }
++ g_hash_table_foreach_remove (priv->modems, remove_one_modem, self);
+
-+ nm_info ("Trying to start the modem-manager...");
-+ dbus_g_proxy_call_no_reply (proxy, "EnumerateDevices", G_TYPE_INVALID);
-+ g_object_unref (proxy);
++ if (priv->proxy) {
++ g_object_unref (priv->proxy);
++ priv->proxy = NULL;
++ }
+
-+out:
-+ /* Reschedule the poke */
++ /* Try to activate the modem-manager */
++ poke_modem_cb (self);
+ priv->poke_id = g_timeout_add (MODEM_POKE_INTERVAL, poke_modem_cb, self);
-+
-+ return FALSE;
+}
+
+static void
@@ -2088,58 +2227,40 @@
+ const char *new_owner,
+ gpointer user_data)
+{
-+ NMModemManager * self = (NMModemManager *) user_data;
-+ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
-+ gboolean old_owner_good = (old_owner && strlen (old_owner));
-+ gboolean new_owner_good = (new_owner && strlen (new_owner));
++ gboolean old_owner_good;
++ gboolean new_owner_good;
+
+ /* Can't handle the signal if its not from the modem service */
+ if (strcmp (MM_DBUS_SERVICE, name) != 0)
+ return;
+
-+ if (!old_owner_good && new_owner_good) {
-+ gboolean running;
-+
-+ running = nm_modem_manager_startup (self);
-+
-+ if (running && priv->poke_id) {
-+ g_source_remove (priv->poke_id);
-+ priv->poke_id = 0;
-+ }
-+ } else if (old_owner_good && !new_owner_good) {
-+ if (priv->proxy) {
-+ g_object_unref (priv->proxy);
-+ priv->proxy = NULL;
-+ }
++ old_owner_good = (old_owner && strlen (old_owner));
++ new_owner_good = (new_owner && strlen (new_owner));
+
-+ /* Poke the modem so that it gets activated by dbus system bus
-+ * activation.
-+ */
-+ if (!priv->poke_id)
-+ priv->poke_id = g_idle_add (poke_modem_cb, (gpointer) self);
-+ }
++ if (!old_owner_good && new_owner_good)
++ modem_manager_disappeared (NM_MODEM_MANAGER (user_data));
++ else if (old_owner_good && !new_owner_good)
++ modem_manager_appeared (NM_MODEM_MANAGER (user_data));
+}
+
++/*******************************************************/
++
+static void
+nm_modem_manager_init (NMModemManager *self)
+{
+ NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
-+ gboolean running;
+
+ priv->modems = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ priv->dbus_mgr = nm_dbus_manager_get ();
+
-+ running = nm_modem_manager_startup (self);
-+
-+ g_signal_connect (priv->dbus_mgr,
-+ "name-owner-changed",
++ g_signal_connect (priv->dbus_mgr, "name-owner-changed",
+ G_CALLBACK (nm_modem_manager_name_owner_changed),
+ self);
+
-+ if (!running) {
-+ /* Try to activate the modem-manager */
-+ priv->poke_id = g_idle_add (poke_modem_cb, (gpointer) self);
-+ }
++ if (nm_dbus_manager_name_has_owner (priv->dbus_mgr, MM_DBUS_SERVICE))
++ modem_manager_appeared (self);
++ else
++ modem_manager_disappeared (self);
+}
+
+static void
@@ -2157,6 +2278,7 @@
+ priv->poke_id = 0;
+ }
+
++ g_hash_table_foreach_remove (priv->modems, remove_one_modem, object);
+ g_hash_table_destroy (priv->modems);
+
+ if (priv->proxy) {
@@ -5151,3 +5273,20 @@
-G_END_DECLS
-
-#endif /* NM_SERIAL_DEVICE_H */
+diff --git a/system-settings/src/dbus-settings.c b/system-settings/src/dbus-settings.c
+index f996af0..0cb8abc 100644
+--- a/system-settings/src/dbus-settings.c
++++ b/system-settings/src/dbus-settings.c
+@@ -99,10 +99,10 @@ load_connections (NMSysconfigSettings *self)
+ g_slist_free (plugin_connections);
+ }
+
+- priv->connections_loaded = TRUE;
+-
+ /* FIXME: Bad hack */
+ unmanaged_devices_changed (NULL, self);
++
++ priv->connections_loaded = TRUE;
+ }
+
+ static void
++++++ nm-dbus-glib-opensuse110.patch ++++++
Index: NetworkManager-0.7.0/configure.in
===================================================================
--- NetworkManager-0.7.0.orig/configure.in
+++ NetworkManager-0.7.0/configure.in
@@ -172,7 +172,7 @@ if test "$ac_have_iwevgenie" = no; then
AC_MSG_ERROR(wireless-tools >= 28pre9 not installed or not functional)
fi
-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.75)
+PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
##### Find out the version of DBUS we're using
dbus_version=`pkg-config --modversion dbus-1`
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org