From 3621d86ad205dcacb50022f8e6b669218600257f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 24 Feb 2009 14:53:31 -0500 Subject: Revert "Fixing serious memory allocation bug in sbus_message_handler." This reverts commit 13421cbe0af4343f9d110600755ffa756690b282. Conflicts: server/infopipe/infopipe.c server/infopipe/infopipe.h While this solution fixed the contingent memory problem it introduced other problems in handling asynchronous replies. Reverting in preparation for a different way to solve it. Conflicts have been taken care of. --- server/monitor/monitor.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/monitor') diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 45191a680..166cf3cdd 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -88,19 +88,22 @@ static void set_global_checker(struct mt_ctx *ctx); /* dbus_get_monitor_version * Return the monitor version over D-BUS */ static int dbus_get_monitor_version(DBusMessage *message, - struct sbus_message_ctx *reply) + void *data, + DBusMessage **r) { const char *version = MONITOR_VERSION; + DBusMessage *reply; dbus_bool_t ret; - reply->reply_message = dbus_message_new_method_return(message); - ret = dbus_message_append_args(reply->reply_message, DBUS_TYPE_STRING, + reply = dbus_message_new_method_return(message); + ret = dbus_message_append_args(reply, DBUS_TYPE_STRING, &version, DBUS_TYPE_INVALID); if (!ret) { return EIO; } + *r = reply; return EOK; } -- cgit