dbus/dbus dbus-connection.c, 1.77, 1.78 dbus-message.c, 1.124,
1.125 dbus-message.h, 1.52, 1.53
Michael Meeks
michael at pdx.freedesktop.org
Mon Mar 29 05:11:07 PST 2004
Update of /cvs/dbus/dbus/dbus
In directory pdx:/tmp/cvs-serv22690/dbus
Modified Files:
dbus-connection.c dbus-message.c dbus-message.h
Log Message:
2004-03-29 Michael Meeks <michael at ximian.com>
* dbus/dbus-message.c
(dbus_message_new_error_printf): impl.
* dbus/dbus-connection.c
(dbus_connection_unregister_object_path): fix warning.
* configure.in: fix no-mono-installed situation.
Index: dbus-connection.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-connection.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- a/dbus-connection.c 27 Mar 2004 05:29:31 -0000 1.77
+++ b/dbus-connection.c 29 Mar 2004 13:11:05 -0000 1.78
@@ -3237,8 +3237,7 @@
CONNECTION_LOCK (connection);
- return _dbus_object_tree_unregister_and_unlock (connection->objects,
- path);
+ _dbus_object_tree_unregister_and_unlock (connection->objects, path);
}
/**
Index: dbus-message.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- a/dbus-message.c 23 Mar 2004 18:07:48 -0000 1.124
+++ b/dbus-message.c 29 Mar 2004 13:11:05 -0000 1.125
@@ -1422,6 +1422,45 @@
}
/**
+ * Creates a new message that is an error reply to a certain message.
+ * Error replies are possible in response to method calls primarily.
+ *
+ * @param reply_to the original message
+ * @param error_name the error name
+ * @param error_format the error message string to be printed
+ * @param ... value of first argument, list of additional values to print
+ * @returns a new error message
+ */
+DBusMessage*
+dbus_message_new_error_printf (DBusMessage *reply_to,
+ const char *error_name,
+ const char *error_format,
+ ...)
+{
+ va_list args;
+ DBusString str;
+ DBusMessage *message;
+
+ if (!_dbus_string_init (&str))
+ return NULL;
+
+ va_start (args, error_format);
+
+ if (_dbus_string_append_printf_valist (&str, error_format, args))
+ message = dbus_message_new_error (reply_to, error_name,
+ _dbus_string_get_const_data (&str));
+ else
+ message = NULL;
+
+ _dbus_string_free (&str);
+
+ va_end (args);
+
+ return message;
+}
+
+
+/**
* Creates a new message that is an exact replica of the message
* specified, except that its refcount is set to 1.
*
Index: dbus-message.h
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-message.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- a/dbus-message.h 23 Mar 2004 18:07:48 -0000 1.52
+++ b/dbus-message.h 29 Mar 2004 13:11:05 -0000 1.53
@@ -72,6 +72,10 @@
DBusMessage* dbus_message_new_error (DBusMessage *reply_to,
const char *error_name,
const char *error_message);
+DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to,
+ const char *error_name,
+ const char *error_format,
+ ...);
DBusMessage* dbus_message_copy (const DBusMessage *message);
More information about the dbus-commit
mailing list