summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@codefactory.se>2003-03-16 22:25:18 +0000
committerAnders Carlsson <andersca@codefactory.se>2003-03-16 22:25:18 +0000
commit3f4086f0fdd1cc7fc03585ec9f750897fb3c1d55 (patch)
treea180077e4b5a97e83b0afc08619b2fb5db790f22 /dbus
parentd1f65c6c4f9dd9750f9ad3eda5b590a4ffca6498 (diff)
2003-03-16 Anders Carlsson <andersca@codefactory.se>
* bus/activation.c: (bus_pending_activation_entry_free), (bus_pending_activation_free), (bus_activation_new), (bus_activation_unref), (bus_activation_service_created), (bus_activation_activate_service): * bus/activation.h: * bus/bus.c: (bus_context_new): * bus/desktop-file.c: (new_section): * bus/driver.c: (bus_driver_send_service_deleted), (bus_driver_handle_activate_service): * bus/services.c: (bus_registry_new), (bus_registry_ensure): * bus/services.h: * dbus/dbus-connection.c: (dbus_connection_send_with_reply_and_block): * dbus/dbus-message.c: (dbus_message_append_args_valist): * dbus/dbus-protocol.h: Make activation work better. Now pending activations will be queued and the daemon won't try to activate services that are already registered.
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-connection.c2
-rw-r--r--dbus/dbus-message.c2
-rw-r--r--dbus/dbus-protocol.h6
3 files changed, 7 insertions, 3 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 2b4a7600..7f9423af 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -1488,7 +1488,7 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection,
timeout_milliseconds = (end_tv_sec - tv_sec) * 1000 +
(end_tv_usec - tv_usec) / 1000;
_dbus_verbose ("%d milliseconds remain\n", timeout_milliseconds);
- _dbus_assert (timeout_milliseconds > 0);
+ _dbus_assert (timeout_milliseconds >= 0);
if (status == DBUS_DISPATCH_NEED_MEMORY)
{
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index 6bcc2060..51a694aa 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -1167,7 +1167,7 @@ dbus_message_append_args_valist (DBusMessage *message,
case DBUS_TYPE_STRING_ARRAY:
{
int len;
- char **data;
+ const char **data;
data = va_arg (var_args, const char **);
len = va_arg (var_args, int);
diff --git a/dbus/dbus-protocol.h b/dbus/dbus-protocol.h
index e0b0c985..c7eb737f 100644
--- a/dbus/dbus-protocol.h
+++ b/dbus/dbus-protocol.h
@@ -77,6 +77,10 @@ extern "C" {
#define DBUS_SERVICE_REPLY_IN_QUEUE 0x2
#define DBUS_SERVICE_REPLY_SERVICE_EXISTS 0x4
#define DBUS_SERVICE_REPLY_ALREADY_OWNER 0x8
+
+/* Activation replies */
+#define DBUS_ACTIVATION_REPLY_ACTIVATED 0x0
+#define DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE 0x1
/* Messages */
#define DBUS_MESSAGE_ACTIVATE_SERVICE "org.freedesktop.DBus.ActivateService"
@@ -88,7 +92,7 @@ extern "C" {
#define DBUS_MESSAGE_SERVICE_CREATED "org.freedesktop.DBus.ServiceCreated"
#define DBUS_MESSAGE_SERVICE_DELETED "org.freedesktop.DBus.ServiceDeleted"
#define DBUS_MESSAGE_SERVICE_LOST "org.freedesktop.DBus.ServiceLost"
-
+
#define DBUS_MESSAGE_LOCAL_DISCONNECT "org.freedesktop.Local.Disconnect"
#ifdef __cplusplus