diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-27 22:11:29 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-03-27 22:11:29 +0000 |
commit | e7b6b11e91bb59eccf844abe4bb47b015b0c3cdf (patch) | |
tree | 204155dc06f7622c8d81250d64ca31ffc11c01b1 /network/connection.c | |
parent | fab1c990ee59d3f41331f6c612ba302c2543710b (diff) |
Get rid of old ioctl compability hack.
Diffstat (limited to 'network/connection.c')
-rw-r--r-- | network/connection.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/network/connection.c b/network/connection.c index 4496f110..ff3f5aab 100644 --- a/network/connection.c +++ b/network/connection.c @@ -387,7 +387,6 @@ static DBusHandlerResult connection_disconnect(DBusConnection *conn, { struct network_conn *nc = data; DBusMessage *reply; - char addr[18]; if (!nc->up) { err_failed(conn, msg, "Device not connected"); @@ -395,8 +394,7 @@ static DBusHandlerResult connection_disconnect(DBusConnection *conn, } close(nc->sk); - ba2str(&nc->dst, addr); - bnep_kill_connection(addr); + bnep_kill_connection(&nc->dst); reply = dbus_message_new_method_return(msg); if (!reply) @@ -461,18 +459,14 @@ static DBusHandlerResult connection_message(DBusConnection *conn, static void connection_free(struct network_conn *nc) { - char addr[18]; - if (!nc) return; if (nc->path) g_free(nc->path); - if (nc->up) { - ba2str(&nc->dst, addr); - bnep_kill_connection(addr); - } + if (nc->up) + bnep_kill_connection(&nc->dst); if (nc->dev) g_free(nc->dev); |