Commit 004b37ec authored by Michael Meeks's avatar Michael Meeks

2004-03-29 Michael Meeks <michael@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.
parent d7a044a1
2004-03-29 Michael Meeks <michael@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.
2004-03-27 Havoc Pennington <hp@redhat.com>
Patch from Timo Teräs:
......
......@@ -184,7 +184,7 @@ AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
AM_PROG_LIBTOOL
#### Look for mono
AC_CHECK_TOOL(MCS, mcs, mcs)
AC_CHECK_TOOL(MCS, mcs)
if test -z "$MCS" ; then
have_mcs=no
else
......
......@@ -3237,8 +3237,7 @@ dbus_connection_unregister_object_path (DBusConnection *connection,
CONNECTION_LOCK (connection);
return _dbus_object_tree_unregister_and_unlock (connection->objects,
path);
_dbus_object_tree_unregister_and_unlock (connection->objects, path);
}
/**
......
......@@ -1421,6 +1421,45 @@ dbus_message_new_error (DBusMessage *reply_to,
return message;
}
/**
* 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.
......
......@@ -72,6 +72,10 @@ DBusMessage* dbus_message_new_signal (const char *path,
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment