diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-31 14:48:55 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-31 14:48:55 +0000 |
commit | a67fa98d477404a1b65e283b646db77914106c35 (patch) | |
tree | 72120a44300bb1582789b3e13063293f79c52a86 /network/server.c | |
parent | 97fd2ad39b3a08d695f5d45783e2dd0ee377bf3f (diff) |
Remove bridge creation of NAP and make a better use of ahavi-autoipd.
Diffstat (limited to 'network/server.c')
-rw-r--r-- | network/server.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/network/server.c b/network/server.c index 1622d102..e9db7df9 100644 --- a/network/server.c +++ b/network/server.c @@ -640,7 +640,7 @@ int server_init(DBusConnection *conn, const char *iface_prefix, goto fail; } - lm = secure? L2CAP_LM_SECURE : 0; + lm = secure ? L2CAP_LM_SECURE : 0; if (lm && setsockopt(sk, SOL_L2CAP, L2CAP_LM, &lm, sizeof(lm)) < 0) { err = errno; error("Failed to set link mode. %s(%d)", @@ -662,6 +662,10 @@ int server_init(DBusConnection *conn, const char *iface_prefix, g_io_channel_set_close_on_unref(bnep_io, FALSE); g_io_add_watch(bnep_io, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL, connect_event, NULL); + + if (bridge_create(BNEP_SVC_GN) < 0) + error("Can't create GN bridge"); + return 0; fail: @@ -684,6 +688,9 @@ void server_exit() bnep_io = NULL; } + if (bridge_remove(BNEP_SVC_GN) < 0) + error("Can't remove GN bridge"); + dbus_connection_unref(connection); connection = NULL; } |