]> code.delx.au - pulseaudio/blobdiff - src/modules/dbus-util.c
Merge commit 'origin/master-tx'
[pulseaudio] / src / modules / dbus-util.c
index 905be13fff37ec7c64efda5da26685d5608f3384..d2abf087baa54adec8a986391fa381e3ffdb34f8 100644 (file)
@@ -27,7 +27,7 @@
 #include <pulse/xmalloc.h>
 #include <pulse/timeval.h>
 #include <pulsecore/log.h>
-#include <pulsecore/props.h>
+#include <pulsecore/shared.h>
 
 #include "dbus-util.h"
 
@@ -90,7 +90,7 @@ static pa_io_event_flags_t get_watch_flags(DBusWatch *watch) {
 }
 
 /* pa_io_event_cb_t IO event handler */
-static void handle_io_event(PA_GCC_UNUSED pa_mainloop_api *ea, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
+static void handle_io_event(pa_mainloop_api *ea, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
     unsigned int flags = 0;
     DBusWatch *watch = userdata;
 
@@ -126,7 +126,7 @@ static void handle_time_event(pa_mainloop_api *ea, pa_time_event* e, const struc
         dbus_timeout_handle(timeout);
 
         /* restart it for the next scheduled time */
-        pa_timeval_add(&next, dbus_timeout_get_interval(timeout) * 1000);
+        pa_timeval_add(&next, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
         ea->time_restart(e, &next);
     }
 }
@@ -192,7 +192,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
         return FALSE;
 
     pa_gettimeofday(&tv);
-    pa_timeval_add(&tv, dbus_timeout_get_interval(timeout) * 1000);
+    pa_timeval_add(&tv, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
 
     ev = c->mainloop->time_new(c->mainloop, &tv, handle_time_event, timeout);
 
@@ -227,7 +227,7 @@ static void toggle_timeout(DBusTimeout *timeout, void *data) {
         struct timeval tv;
 
         pa_gettimeofday(&tv);
-        pa_timeval_add(&tv, dbus_timeout_get_interval(timeout) * 1000);
+        pa_timeval_add(&tv, (pa_usec_t) dbus_timeout_get_interval(timeout) * 1000);
 
         c->mainloop->time_restart(ev, &tv);
     } else
@@ -254,7 +254,7 @@ static pa_dbus_connection* pa_dbus_connection_new(pa_core* c, DBusConnection *co
     pconn->connection = conn;
     pconn->dispatch_event = c->mainloop->defer_new(c->mainloop, dispatch_cb, conn);
 
-    pa_property_set(c, name, pconn);
+    pa_shared_set(c, name, pconn);
 
     return pconn;
 }
@@ -282,7 +282,7 @@ void pa_dbus_connection_unref(pa_dbus_connection *c) {
     }
 
     /* already disconnected, just free */
-    pa_property_remove(c->core, c->property_name);
+    pa_shared_remove(c->core, c->property_name);
     c->core->mainloop->defer_free(c->dispatch_event);
     dbus_connection_unref(c->connection);
     pa_xfree(c);
@@ -309,7 +309,7 @@ pa_dbus_connection* pa_dbus_bus_get(pa_core *c, DBusBusType type, DBusError *err
 
     pa_assert(type == DBUS_BUS_SYSTEM || type == DBUS_BUS_SESSION || type == DBUS_BUS_STARTER);
 
-    if ((pconn = pa_property_get(c, prop_name[type])))
+    if ((pconn = pa_shared_get(c, prop_name[type])))
         return pa_dbus_connection_ref(pconn);
 
     if (!(conn = dbus_bus_get_private(type, error)))