diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-17 19:37:49 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-17 19:37:49 +0000 |
commit | 2fbfb83dae49fb9de541869986bc719e06b6cf12 (patch) | |
tree | 0da08cbf09b2f33fcaa91379257743b5c9e8d31b /serial/manager.c | |
parent | 01cb453b85b7cf26ee9e5f848717d82ce455070a (diff) |
serial: added port GetAddress
Diffstat (limited to 'serial/manager.c')
-rw-r--r-- | serial/manager.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/serial/manager.c b/serial/manager.c index 9a6972da..c6c35131 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -193,6 +193,7 @@ static void open_notify(int fd, int err, void *data) const char *owner; DBusMessage *reply; struct pending_connect *pc = data; + bdaddr_t dst; if (err) { /* Max tries exceeded */ @@ -229,7 +230,8 @@ static void open_notify(int fd, int err, void *data) DBUS_TYPE_STRING, &pname, DBUS_TYPE_INVALID); - port_add_listener(pc->conn, pc->id, fd, port_name, owner); + str2ba(pc->bda, &dst); + port_add_listener(pc->conn, pc->id, &dst, fd, port_name, owner); } static gboolean rfcomm_connect_cb(GIOChannel *chan, @@ -446,7 +448,7 @@ static void record_reply(DBusPendingCall *call, void *data) } snprintf(port_name, sizeof(port_name), "/dev/rfcomm%d", err); - port_register(pc->conn, err, port_name, path); + port_register(pc->conn, err, &dst, port_name, path); reply = dbus_message_new_method_return(pc->msg); dbus_message_append_args(reply, @@ -721,7 +723,7 @@ static DBusHandlerResult create_port(DBusConnection *conn, return err_failed(conn, msg, strerror(-err)); snprintf(port_name, sizeof(port_name), "/dev/rfcomm%d", err); - port_register(conn, err, port_name, path); + port_register(conn, err, &dst, port_name, path); reply = dbus_message_new_method_return(msg); if (!reply) |