[libsocialweb/f15/master] Update for NetworkManager 0.9
Daniel Williams
dcbw at fedoraproject.org
Fri Mar 25 15:09:07 UTC 2011
commit 4d8e1e857463359eed43f00646053b47c382f7bd
Author: Dan Williams <dcbw at redhat.com>
Date: Fri Mar 25 10:10:03 2011 -0500
Update for NetworkManager 0.9
libsocialweb.spec | 8 +++++-
network-manager-09.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/libsocialweb.spec b/libsocialweb.spec
index 1e0993a..06c7ae8 100644
--- a/libsocialweb.spec
+++ b/libsocialweb.spec
@@ -1,6 +1,6 @@
Name: libsocialweb
Version: 0.25.11
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A social network data aggregator
Group: Applications/Internet
@@ -14,6 +14,8 @@ Source4: twitpic
Source5: facebook
Source6: facebook.key
+Patch0: network-manager-09.patch
+
BuildRequires: dbus-glib-devel
BuildRequires: glib2-devel
BuildRequires: GConf2-devel
@@ -55,6 +57,7 @@ Keys allowing access to various web services through libsocialweb.
%prep
%setup -q
+%patch0 -p1 -b .nm09
chmod 644 examples/*.py
@@ -108,6 +111,9 @@ cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{buildroot
%{_datadir}/libsocialweb/keys
%changelog
+* Fri Mar 25 2011 Dan Williams <dcbw at redhat.com> 0.25.11-3
+- Update for NetworkManager 0.9
+
* Tue Feb 22 2011 Peter Robinson <pbrobinson at gmail.com> 0.25.11-2
- add generic facebook api key
diff --git a/network-manager-09.patch b/network-manager-09.patch
new file mode 100644
index 0000000..863f30f
--- /dev/null
+++ b/network-manager-09.patch
@@ -0,0 +1,57 @@
+From b0baca4b0e201c342d75cea9369735439b0f2c77 Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw at redhat.com>
+Date: Mon, 7 Mar 2011 22:48:52 -0600
+Subject: [PATCH] online: update connection states for NM 0.9
+
+---
+ libsocialweb/sw-online.c | 19 ++++++++++++++-----
+ 1 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/libsocialweb/sw-online.c b/libsocialweb/sw-online.c
+index 2fb6196..6b82b02 100644
+--- a/libsocialweb/sw-online.c
++++ b/libsocialweb/sw-online.c
+@@ -105,6 +105,10 @@ sw_is_online (void)
+ #if WITH_ONLINE_NM
+ #include <libnm-glib/nm-client.h>
+
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ /*
+ * Use NMClient since it correctly handles the NetworkManager service
+ * appearing and disappearing, as can happen at boot time, or during
+@@ -148,19 +152,24 @@ online_init (void)
+ gboolean
+ sw_is_online (void)
+ {
+- NMState state = NM_STATE_UNKNOWN;
+-
+ if (!online_init ())
+ return TRUE;
+
+- g_object_get (G_OBJECT (client), NM_CLIENT_STATE, &state, NULL);
+-
+- switch (state) {
++ switch (nm_client_get_state (client)) {
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
+ case NM_STATE_CONNECTED:
++#endif
+ return TRUE;
+ case NM_STATE_CONNECTING:
+ case NM_STATE_ASLEEP:
+ case NM_STATE_DISCONNECTED:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_DISCONNECTING:
++#endif
+ case NM_STATE_UNKNOWN:
+ default:
+ return FALSE;
+--
+1.7.4.1
+
More information about the scm-commits
mailing list