Package: pidgin
Version: 2.10.0-1
Severity: normal
Tags: upstream patch

With network-manager 0.9 (from experimental), pidgin gives me Waiting for 
connection on startup since libpurple does not understand the new NM_STATEs 
[1]. The problem has been reported upstream [2]. The attached patch fixes the 
problem for me. Furthermore, instead of assuming no connectivity by default, 
libpurple now assumes connectivity if the NM_STATE is unknown.

[1] 
http://projects.gnome.org/NetworkManager/developers/migrating-to-09/spec.html#type-NM_STATE
[2] http://developer.pidgin.im/ticket/13859

Regards,
Adrian Lang

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pidgin depends on:
ii  gconf2                      2.32.4-1     GNOME configuration database syste
ii  libatk1.0-0                 2.0.1-2      ATK accessibility toolkit
ii  libc6                       2.13-16      Embedded GNU C Library: Shared lib
ii  libcairo2                   1.10.2-6.1   The Cairo 2D vector graphics libra
ii  libdbus-1-3                 1.5.6-1      simple interprocess messaging syst
ii  libdbus-glib-1-2            0.94-4       simple interprocess messaging syst
ii  libfontconfig1              2.8.0-3      generic font configuration library
ii  libfreetype6                2.4.6-2      FreeType 2 font engine, shared lib
ii  libgdk-pixbuf2.0-0          2.23.5-3     GDK Pixbuf library
ii  libglib2.0-0                2.28.6-2     GLib library of C routines
ii  libgstreamer0.10-0          0.10.35-1    Core GStreamer libraries and eleme
ii  libgtk2.0-0                 2.24.5-4     GTK+ graphical user interface libr
ii  libgtkspell0                2.0.16-1     a spell-checking addon for GTK's T
ii  libice6                     2:1.0.7-2    X11 Inter-Client Exchange library
ii  libpango1.0-0               1.28.4-3     Layout and rendering of internatio
ii  libpurple0                  2.10.0-1     multi-protocol instant messaging l
ii  libsm6                      2:1.2.0-2    X11 Session Management library
ii  libx11-6                    2:1.4.4-1    X11 client-side library
ii  libxml2                     2.7.8.dfsg-4 GNOME XML library
ii  libxss1                     1:1.2.1-2    X11 Screen Saver extension library
ii  perl-base [perlapi-5.12.4]  5.12.4-4     minimal Perl system
ii  pidgin-data                 2.10.0-1     multi-protocol instant messaging c

Versions of packages pidgin recommends:
ii  gstreamer0.10-plugins-base    0.10.35-1  GStreamer plugins from the "base" 
ii  gstreamer0.10-plugins-good    0.10.30-1  GStreamer plugins from the "good" 

Versions of packages pidgin suggests:
pn  evolution-data-server         <none>     (no description available)
ii  gnome-panel                   3.0.0.1-2  launcher and docking facility for 
ii  libsqlite3-0                  3.7.7-2    SQLite 3 shared library

-- no debconf information
--- network.c.old       2011-08-22 22:32:54.000000000 +0200
+++ network.c.new       2011-08-22 22:33:00.000000000 +0200
@@ -829,12 +829,26 @@
        {
                have_nm_state = TRUE;
                nm_state = nm_get_network_state();
-               if (nm_state == NM_STATE_UNKNOWN)
-                       purple_debug_warning("network", "NetworkManager not 
active. Assuming connection exists.\n");
        }
 
-       if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
+       switch (nm_state) {
+       case NM_STATE_UNKNOWN:
+               purple_debug_warning("network", "NetworkManager not active. 
Assuming connection exists.\n");
+}
+       case NM_STATE_CONNECTED:
+       case NM_STATE_CONNECTED_LOCAL:
+       case NM_STATE_CONNECTED_SITE:
+       case NM_STATE_CONNECTED_GLOBAL:
                return TRUE;
+       case NM_STATE_CONNECTING:
+       case NM_STATE_DISCONNECTING:
+       case NM_STATE_DISCONNECTED:
+       case NM_STATE_ASLEEP:
+               return FALSE;
+       default:
+               purple_debug_warning("network", "Unknown NetworkManager 
connection state. Assuming connection exists.\n");
+               return TRUE;
+       }
 
        return FALSE;
 

Reply via email to