summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/dbus-protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-daemon/dbus-protocol.c')
-rw-r--r--avahi-daemon/dbus-protocol.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c
index 4e67281..b5c3e9a 100644
--- a/avahi-daemon/dbus-protocol.c
+++ b/avahi-daemon/dbus-protocol.c
@@ -38,6 +38,9 @@
#include "dbus-protocol.h"
#include "main.h"
+/* Include generated introspection data */
+#include "server-introspect-xml.c"
+
typedef struct Server Server;
typedef struct Client Client;
typedef struct EntryGroupInfo EntryGroupInfo;
@@ -873,7 +876,16 @@ static DBusHandlerResult msg_server_impl(DBusConnection *c, DBusMessage *m, void
dbus_message_get_path(m),
dbus_message_get_member(m));
- if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostName")) {
+ if (dbus_message_is_method_call(m, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) {
+
+ if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
+ avahi_log_warn("Error parsing Introspect message");
+ goto fail;
+ }
+
+ return respond_string(c, m, server_introspect_xml);
+
+ } else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetHostName")) {
if (!dbus_message_get_args(m, &error, DBUS_TYPE_INVALID)) {
avahi_log_warn("Error parsing Server::GetHostName message");