diff options
-rw-r--r-- | network/server.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/network/server.c b/network/server.c index de30f72e..e9fc2506 100644 --- a/network/server.c +++ b/network/server.c @@ -346,11 +346,13 @@ static void authorization_callback(DBusPendingCall *pcall, void *data) bridge = bridge_get_name(ns->id); if (bridge) { bnep_if_up(devname, 0); - if (!ns->up) + if (!ns->up) { bnep_if_up(bridge, ns->id); + ns->iface = g_strdup(bridge); + ns->up = TRUE; + } } else bnep_if_up(devname, ns->id); - ns->up = TRUE; ns->clients = g_slist_append(ns->clients, g_strdup(s->address)); @@ -1138,6 +1140,9 @@ static void server_unregister(DBusConnection *conn, void *data) info("Unregistered server path:%s", ns->path); + if (ns->up) + bnep_if_down(ns->iface); + server_free(ns); } |