dbus/dbus dbus-bus.c,1.33,1.34
Olivier Andrieu
oandrieu at freedesktop.org
Mon Sep 27 10:01:20 UTC 2004
Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv8233/dbus
Modified Files:
dbus-bus.c
Log Message:
* bus/signals.c (bus_match_rule_parse): validate the components of
match rules (bug #1439).
* dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
Index: dbus-bus.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-bus.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- dbus-bus.c 10 Aug 2004 03:06:59 -0000 1.33
+++ dbus-bus.c 27 Sep 2004 10:01:18 -0000 1.34
@@ -338,7 +338,7 @@
if (!init_connections_unlocked ())
{
_DBUS_UNLOCK (bus);
- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+ _DBUS_SET_OOM (error);
return NULL;
}
@@ -842,25 +842,15 @@
-1, error);
if (reply == NULL)
- {
- _DBUS_ASSERT_ERROR_IS_SET (error);
- return;
- }
-
- if (dbus_set_error_from_message (error, reply))
- {
- _DBUS_ASSERT_ERROR_IS_SET (error);
- dbus_message_unref (reply);
- return;
- }
-
- dbus_message_unref (reply);
+ _DBUS_ASSERT_ERROR_IS_SET (error);
+ else
+ dbus_message_unref (reply);
}
else
{
/* Silently-fail nonblocking codepath */
- if (!dbus_connection_send (connection, msg, NULL))
- return;
+ dbus_message_set_no_reply (msg, TRUE);
+ dbus_connection_send (connection, msg, NULL);
}
}
@@ -898,6 +888,12 @@
DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS,
"AddMatch");
+ if (msg == NULL)
+ {
+ _DBUS_SET_OOM (error);
+ return;
+ }
+
if (!dbus_message_append_args (msg, DBUS_TYPE_STRING, rule,
DBUS_TYPE_INVALID))
{
More information about the dbus-commit
mailing list