summaryrefslogtreecommitdiffstats
path: root/network/connection.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-05-08 14:00:22 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-05-08 14:00:22 +0000
commit89aa5447d1310dc3b9a8591dbe80abac9239a114 (patch)
treef664be5442ee33e8fff238763daeab9c9d088586 /network/connection.c
parent734d59c4b7d40106069f621747ccf63934b048ff (diff)
Make connection host address available via GetInfo.
Diffstat (limited to 'network/connection.c')
-rw-r--r--network/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/network/connection.c b/network/connection.c
index 2bbd3e60..cd1e0a5d 100644
--- a/network/connection.c
+++ b/network/connection.c
@@ -509,6 +509,8 @@ static DBusHandlerResult get_info(DBusConnection *conn,
DBusMessageIter iter;
DBusMessageIter dict;
const char *uuid;
+ char raddr[18];
+ const char *paddr = raddr;
reply = dbus_message_new_method_return(msg);
if (!reply)
@@ -528,6 +530,10 @@ static DBusHandlerResult get_info(DBusConnection *conn,
dbus_message_iter_append_dict_entry(&dict, "uuid",
DBUS_TYPE_STRING, &uuid);
+ ba2str(&nc->dst, raddr);
+ dbus_message_iter_append_dict_entry(&dict, "address",
+ DBUS_TYPE_STRING, &paddr);
+
dbus_message_iter_close_container(&iter, &dict);
return send_message_and_unref(conn, reply);