summaryrefslogtreecommitdiffstats
path: root/src/sbus
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-04-17 16:55:29 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-04-19 10:32:50 +0200
commit7a9a6ee1b5f5479c3a6958401f9b34c571c3b6bf (patch)
tree1bf298a940a6abbfe3f3b8afceb6fbb58d4b7026 /src/sbus
parentdd3398f8cc5a80cd99546bfe9c500589b78a96f1 (diff)
downloadsssd-7a9a6ee1b5f5479c3a6958401f9b34c571c3b6bf.tar.gz
sssd-7a9a6ee1b5f5479c3a6958401f9b34c571c3b6bf.tar.xz
sssd-7a9a6ee1b5f5479c3a6958401f9b34c571c3b6bf.zip
SBUS: Create an sbus_method_meta instance for Introspection
Also fixes a warning about uninitialized 'method' as the 'method' variable was unused and not set previously when introspecting.
Diffstat (limited to 'src/sbus')
-rw-r--r--src/sbus/sssd_dbus_connection.c1
-rw-r--r--src/sbus/sssd_dbus_introspect.c8
-rw-r--r--src/sbus/sssd_dbus_private.h3
3 files changed, 12 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_connection.c b/src/sbus/sssd_dbus_connection.c
index 64777fbe8..16ec72f92 100644
--- a/src/sbus/sssd_dbus_connection.c
+++ b/src/sbus/sssd_dbus_connection.c
@@ -441,6 +441,7 @@ DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn,
handler_fn = sbus_introspect;
ictx->iface = interface;
handler_data = ictx;
+ method = &introspect_method;
}
}
}
diff --git a/src/sbus/sssd_dbus_introspect.c b/src/sbus/sssd_dbus_introspect.c
index ffc1f4d38..ef0ff2fd5 100644
--- a/src/sbus/sssd_dbus_introspect.c
+++ b/src/sbus/sssd_dbus_introspect.c
@@ -28,6 +28,14 @@
#include "sbus/sssd_dbus_private.h"
#include "sbus/sssd_dbus_meta.h"
+static const struct sbus_arg_meta introspect_method_arg_out[] = {
+ { "data", "s" },
+ { NULL, }
+};
+
+const struct sbus_method_meta introspect_method =
+ { DBUS_INTROSPECT_METHOD, NULL, introspect_method_arg_out, 0 };
+
#define SSS_INTROSPECT_DOCTYPE \
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n" \
"\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n"
diff --git a/src/sbus/sssd_dbus_private.h b/src/sbus/sssd_dbus_private.h
index 929caeccb..6abe56c66 100644
--- a/src/sbus/sssd_dbus_private.h
+++ b/src/sbus/sssd_dbus_private.h
@@ -98,6 +98,9 @@ struct sbus_request *
sbus_new_request(struct sbus_connection *conn, struct sbus_interface *intf,
DBusMessage *message);
+/* =Interface=introspection=============================================== */
+extern const struct sbus_method_meta introspect_method;
+
struct sbus_introspect_ctx {
const struct sbus_interface_meta *iface;
};