rpms/pulseaudio/devel pa-ck-api-change.patch, NONE, 1.1 pulseaudio.spec, 1.47, 1.48

William Jon McCann (mccann) fedora-extras-commits at redhat.com
Wed Jul 23 00:06:34 UTC 2008


Author: mccann

Update of /cvs/pkgs/rpms/pulseaudio/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5724

Modified Files:
	pulseaudio.spec 
Added Files:
	pa-ck-api-change.patch 
Log Message:
- Fix for CK API changes



pa-ck-api-change.patch:

--- NEW FILE pa-ck-api-change.patch ---
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 3adee99..3b7b57e 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -71,7 +71,7 @@ struct userdata {
 static void add_session(struct userdata *u, const char *id) {
     DBusError error;
     DBusMessage *m = NULL, *reply = NULL;
-    int32_t uid;
+    uid_t uid;
     struct session *session;
     char *t;
 
@@ -92,10 +92,12 @@ static void add_session(struct userdata *u, const char *id) {
         goto fail;
     }
 
-    /* FIXME: Why is this in int32? and not an uint32? */
-    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &uid, DBUS_TYPE_INVALID)) {
-        pa_log("Failed to parse GetUnixUser() result: %s: %s", error.name, error.message);
-        goto fail;
+    /* CK 0.3 this changed from int32 to uint32 */
+    if (!dbus_message_get_args(reply, &error, DBUS_TYPE_UINT32, &uid, DBUS_TYPE_INVALID)) {
+        if (!dbus_message_get_args(reply, &error, DBUS_TYPE_INT32, &uid, DBUS_TYPE_INVALID)) {
+            pa_log("Failed to parse GetUnixUser() result: %s: %s", error.name, error.message);
+            goto fail;
+        }
     }
 
     /* We only care about our own sessions */
@@ -163,18 +165,24 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
 
     if (dbus_message_is_signal(message, "org.freedesktop.ConsoleKit.Seat", "SessionAdded")) {
 
-        if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
-            pa_log_error("Failed to parse SessionAdded message: %s: %s", error.name, error.message);
-            goto finish;
+        /* CK API changed to match spec in 0.3 */
+        if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+            if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
+                pa_log_error("Failed to parse SessionAdded message: %s: %s", error.name, error.message);
+                goto finish;
+            }
         }
 
         add_session(u, path);
 
     } else if (dbus_message_is_signal(message, "org.freedesktop.ConsoleKit.Seat", "SessionRemoved")) {
 
-        if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID) || dbus_error_is_set(&error)) {
-            pa_log_error("Failed to parse SessionRemoved message: %s: %s", error.name, error.message);
-            goto finish;
+        /* CK API changed to match spec in 0.3 */
+        if (!dbus_message_get_args(message, &error, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID)) {
+            if (!dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID)) {
+                pa_log_error("Failed to parse SessionRemoved message: %s: %s", error.name, error.message);
+                goto finish;
+            }
         }
 
         remove_session(u, path);


Index: pulseaudio.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pulseaudio/devel/pulseaudio.spec,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- pulseaudio.spec	26 Jun 2008 18:45:39 -0000	1.47
+++ pulseaudio.spec	23 Jul 2008 00:05:45 -0000	1.48
@@ -5,7 +5,7 @@
 Name:		pulseaudio
 Summary: 	Improved Linux sound server
 Version:	0.9.11
-Release:	0.6.%{alphatag}%{?dist}
+Release:	0.7.%{alphatag}%{?dist}
 License:	GPLv2+
 Group:		System Environment/Daemons
 Source0:	http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-%{version}.%{alphatag}.tar.gz
@@ -34,6 +34,7 @@
 #Patch8:	pulseaudio-0.9.8-disable-realtime.patch
 #Patch9:	pulseaudio-0.9.8-cputime-abort.patch
 #Patch10: 	wrong-assert.patch
+Patch11:        pa-ck-api-change.patch
 
 %description
 PulseAudio is a sound server for Linux and other Unix like operating 
@@ -179,6 +180,7 @@
 #%patch8 -p1 -b .realtime
 #%patch9 -p1 -b .cputime-abort
 #%patch10 -p1 -b .wrong-assert
+%patch11 -p1 -b .api-change
 
 %build
 %configure --disable-ltdl-install --disable-static --disable-rpath --with-system-user=pulse --with-system-group=pulse --with-realtime-group=pulse-rt --with-access-group=pulse-access
@@ -408,6 +410,9 @@
 %{_mandir}/man1/pax11publish.1.gz
 
 %changelog
+* Tue Jul 22 2008 Jon McCann <jmccann at redhat.com> 0.9.11-0.7.git20080626
+- Fix for CK API changes
+
 * Thu Jun 26 2008 Lennart Poettering <lpoetter at redhat.com> 0.9.11-0.6.git20080626
 - New GIT snapshot
 




More information about the fedora-extras-commits mailing list