CVS: winex/server dbus.c,1.6,1.7

[email protected]
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/server dbus.c,1.6,1.7Update of /var/lib/cvsd/cvsroot/winex/server
In directory agravaine:/tmp/cvs-serv31395/server

Modified Files:
	dbus.c 
Log Message:
Fix for new D-Bus 1.0.0 version which is a lib stabilization point.
Ticket #1012.


Index: dbus.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/server/dbus.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- dbus.c	28 Mar 2007 18:39:33 -0000	1.6
+++ dbus.c	27 Apr 2007 13:14:16 -0000	1.7
@@ -257,6 +257,7 @@
 #define DBUS_VERSION_0_23_4  1
 #define DBUS_VERSION_0_35_2  2
 #define DBUS_VERSION_0_60_0  3
+#define DBUS_VERSION_1_0_0   4
 
 /**
  *  Code!
@@ -358,7 +359,7 @@
   
   /* HAL 0.5.4 mount/unmount doesn't send the other message, so.. */
   if ((SERVER_STATIC_VARIABLE(dbus, dbus_version) == DBUS_VERSION_0_35_2 ||
-       SERVER_STATIC_VARIABLE(dbus, dbus_version) == DBUS_VERSION_0_60_0) &&
+       SERVER_STATIC_VARIABLE(dbus, dbus_version) >= DBUS_VERSION_0_60_0) &&
       SERVER_STATIC_VARIABLE(dbus, dbus_ltable).dbus_message_is_signal(
       message,
       "org.freedesktop.Hal.Device",
@@ -394,7 +395,7 @@
     }
   }
 
-  if ((SERVER_STATIC_VARIABLE(dbus, dbus_version) == DBUS_VERSION_0_60_0) &&
+  if ((SERVER_STATIC_VARIABLE(dbus, dbus_version) >= DBUS_VERSION_0_60_0) &&
       SERVER_STATIC_VARIABLE(dbus, dbus_ltable).dbus_message_is_signal(
       message,
       "org.freedesktop.Hal.Device",
@@ -566,15 +567,23 @@
     const char dbus_libname0[] = "libdbus-1.so.0";
     const char dbus_libname1[] = "libdbus-1.so.1";
     const char dbus_libname2[] = "libdbus-1.so.2";
+    const char dbus_libname3[] = "libdbus-1.so.3";
     const char *libname;
     int version;
     void *lib;
     
-    version = DBUS_VERSION_0_60_0;
-    libname = dbus_libname2;
+    /* DBus 1.0.0 comes with a new library version */
+    version = DBUS_VERSION_1_0_0;
+    libname = dbus_libname3;
     lib = wine_dlopen(libname, RTLD_NOW, NULL, 0);
     if (!lib)
     {
+      version = DBUS_VERSION_0_60_0;
+      libname = dbus_libname2;
+      lib = wine_dlopen(libname, RTLD_NOW, NULL, 0);
+    }
+    if (!lib)
+    {
       version = DBUS_VERSION_0_35_2;
       libname = dbus_libname1;
       lib = wine_dlopen(libname, RTLD_NOW, NULL, 0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.