summaryrefslogtreecommitdiffstats
path: root/server/sbus/sssd_dbus.h
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-02-24 16:36:16 -0500
committerSimo Sorce <idra@samba.org>2009-02-24 16:50:08 -0500
commit57df88bb0b4ce656855410a8c2969d93475c2f11 (patch)
tree644bf0ce008c446efc27cf369d18a248da5ae7b4 /server/sbus/sssd_dbus.h
parent3621d86ad205dcacb50022f8e6b669218600257f (diff)
downloadsssd-57df88bb0b4ce656855410a8c2969d93475c2f11.tar.gz
sssd-57df88bb0b4ce656855410a8c2969d93475c2f11.tar.xz
sssd-57df88bb0b4ce656855410a8c2969d93475c2f11.zip
Proper fix for memory handling problem.
sbus_message_handler is not responsible anymore for sending back data in any case. Transfer this responsibility to the handler function called. This way both synchronous and asynchronous funstions use the interface the same way and can properly free memory referenced by the reply after the send buffer has been filled in and all copies are done in sbus_conn_send_reply()
Diffstat (limited to 'server/sbus/sssd_dbus.h')
-rw-r--r--server/sbus/sssd_dbus.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/server/sbus/sssd_dbus.h b/server/sbus/sssd_dbus.h
index 5fec9c80a..a05d229a1 100644
--- a/server/sbus/sssd_dbus.h
+++ b/server/sbus/sssd_dbus.h
@@ -27,7 +27,7 @@ struct sbus_srv_ctx;
#include "dbus/dbus.h"
-typedef int (*sbus_msg_handler_fn)(DBusMessage *, void *, DBusMessage **);
+typedef int (*sbus_msg_handler_fn)(DBusMessage *, struct sbus_conn_ctx *);
/*
* sbus_conn_destructor_fn
@@ -66,12 +66,6 @@ struct sbus_method_ctx {
sbus_msg_handler_fn introspect_fn;
};
-struct sbus_message_handler_ctx {
- struct sbus_conn_ctx *conn_ctx;
- struct sbus_method_ctx *method_ctx;
- char *introspection_xml;
-};
-
/* Server Functions */
int sbus_new_server(TALLOC_CTX *mem_ctx,
struct event_context *ev, struct sbus_method_ctx *ctx,
@@ -129,4 +123,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *conn,
DBusMessage *message,
void *user_data);
+void sbus_conn_send_reply(struct sbus_conn_ctx *conn_ctx,
+ DBusMessage *reply);
+
#endif /* _SSSD_DBUS_H_*/