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/nss/nsssrv_dp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/nss/nsssrv_dp.c') diff --git a/server/nss/nsssrv_dp.c b/server/nss/nsssrv_dp.c index b5746e86..487ac285 100644 --- a/server/nss/nsssrv_dp.c +++ b/server/nss/nsssrv_dp.c @@ -281,19 +281,20 @@ done: return err; } -static int nss_dp_identity(DBusMessage *message, struct sbus_message_ctx *reply) +static int nss_dp_identity(DBusMessage *message, void *data, DBusMessage **r) { dbus_uint16_t version = DATA_PROVIDER_VERSION; dbus_uint16_t clitype = DP_CLI_FRONTEND; const char *cliname = "NSS"; const char *nullname = ""; + DBusMessage *reply; dbus_bool_t ret; DEBUG(4,("Sending ID reply: (%d,%d,%s)\n", clitype, version, cliname)); - reply->reply_message = dbus_message_new_method_return(message); - ret = dbus_message_append_args(reply->reply_message, + reply = dbus_message_new_method_return(message); + ret = dbus_message_append_args(reply, DBUS_TYPE_UINT16, &clitype, DBUS_TYPE_UINT16, &version, DBUS_TYPE_STRING, &cliname, @@ -303,6 +304,7 @@ static int nss_dp_identity(DBusMessage *message, struct sbus_message_ctx *reply) return EIO; } + *r = reply; return EOK; } -- cgit