diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-09-28 13:28:50 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-09-28 13:28:50 +0000 |
commit | 7b4212920e58f58b15c69146a109f02d365e2286 (patch) | |
tree | cc14332fd4e72e1a825fb2ef37e77d71b8911744 /network/server.c | |
parent | 76b8a8707dbb1887e94f812c4a9ca8b65d3353fd (diff) |
Fix bug on panu server.
Diffstat (limited to 'network/server.c')
-rw-r--r-- | network/server.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/network/server.c b/network/server.c index e9fc2506..b5a2c6d0 100644 --- a/network/server.c +++ b/network/server.c @@ -178,7 +178,7 @@ static int create_server_record(sdp_buf_t *buf, const char *name, profile[0].version = 0x0100; pfseq = sdp_list_append(NULL, &profile[0]); sdp_set_profile_descs(&record, pfseq); - + sdp_set_info_attr(&record, name, NULL, desc); break; case BNEP_SVC_PANU: @@ -337,14 +337,14 @@ static void authorization_callback(DBusPendingCall *pcall, void *data) info("Authorization succedded. New connection: %s", devname); response = BNEP_SUCCESS; - if (bridge_add_interface(ns->id, devname) < 0) { - error("Can't add %s to the bridge: %s(%d)", - devname, strerror(errno), errno); - goto failed; - } - bridge = bridge_get_name(ns->id); if (bridge) { + if (bridge_add_interface(ns->id, devname) < 0) { + error("Can't add %s to the bridge: %s(%d)", + devname, strerror(errno), errno); + goto failed; + } + bnep_if_up(devname, 0); if (!ns->up) { bnep_if_up(bridge, ns->id); @@ -1140,9 +1140,6 @@ 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); } |