- Fix for CK API changes
This commit is contained in:
parent
1081c5f70e
commit
4ad1bf331b
61
pa-ck-api-change.patch
Normal file
61
pa-ck-api-change.patch
Normal file
@ -0,0 +1,61 @@
|
||||
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);
|
||||
@ -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 @@ Obsoletes: pulseaudio-devel
|
||||
#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 @@ This package contains command line utilities for the PulseAudio sound server.
|
||||
#%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 @@ fi
|
||||
%{_mandir}/man1/pax11publish.1.gz
|
||||
|
||||
%changelog
|
||||
* Tue Jul 22 2008 Jon McCann <jmccann@redhat.com> 0.9.11-0.7.git20080626
|
||||
- Fix for CK API changes
|
||||
|
||||
* Thu Jun 26 2008 Lennart Poettering <lpoetter@redhat.com> 0.9.11-0.6.git20080626
|
||||
- New GIT snapshot
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user