diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-04-16 20:54:02 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-04-16 20:54:02 +0000 |
commit | ef29c39ffc97adc9893841165f9e9a3f6a1e9a0a (patch) | |
tree | c52388a01e836caa18be12c2c3bfd83ee9982e9f /network/connection.c | |
parent | d3d1ce6e2bc9ecbfb70b5d306e419750ba0936b6 (diff) |
Move code to bring up interface to common and use it on connection.
Diffstat (limited to 'network/connection.c')
-rw-r--r-- | network/connection.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/network/connection.c b/network/connection.c index 0bd255d2..50f60023 100644 --- a/network/connection.c +++ b/network/connection.c @@ -155,6 +155,8 @@ static gboolean bnep_connect_cb(GIOChannel *chan, GIOCondition cond, goto failed; } + bnep_if_up(nc->dev, TRUE); + signal = dbus_message_new_signal(nc->path, NETWORK_CONNECTION_INTERFACE, "Connected"); @@ -461,6 +463,7 @@ static DBusHandlerResult connection_disconnect(DBusConnection *conn, return DBUS_HANDLER_RESULT_HANDLED; } + bnep_if_up(nc->dev, FALSE); bnep_kill_connection(&nc->dst); reply = dbus_message_new_method_return(msg); @@ -534,8 +537,10 @@ static void connection_free(struct network_conn *nc) if (nc->path) g_free(nc->path); - if (nc->state == CONNECTED) + if (nc->state == CONNECTED) { + bnep_if_up(nc->dev, FALSE); bnep_kill_connection(&nc->dst); + } if (nc->name) g_free(nc->name); |