summaryrefslogtreecommitdiffstats
path: root/network/manager.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-28 13:25:27 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-28 13:25:27 +0000
commitec7083e9e5ba28b679f231c7bc341330feddf2ce (patch)
tree3a4d6f463fe5e3aabbb4fa0a74940510a72680a3 /network/manager.c
parent6113615ecfb8026a6a3ce0af38fc79ec8abec748 (diff)
Fixes codestyle, bridge creation and some code cleanup.
Diffstat (limited to 'network/manager.c')
-rw-r--r--network/manager.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/network/manager.c b/network/manager.c
index c82d1c03..b5b4f0a8 100644
--- a/network/manager.c
+++ b/network/manager.c
@@ -928,12 +928,6 @@ int network_init(DBusConnection *conn, struct network_conf *service_conf)
return -1;
}
- if (bridge_create(BNEP_SVC_GN) < 0)
- error("Can't create GN bridge");
-
- if (bridge_create(BNEP_SVC_NAP) < 0)
- error("Can't create NAP bridge");
-
if (bnep_init(conf->panu_script, conf->gn_script, conf->nap_script)) {
error("Can't init bnep module");
return -1;
@@ -967,6 +961,12 @@ int network_init(DBusConnection *conn, struct network_conf *service_conf)
return -1;
}
+ if (bridge_create(BNEP_SVC_GN) < 0)
+ error("Can't create GN bridge");
+
+ if (bridge_create(BNEP_SVC_NAP) < 0)
+ error("Can't create NAP bridge");
+
connection = dbus_connection_ref(conn);
info("Registered manager path:%s", NETWORK_PATH);
@@ -984,10 +984,10 @@ int network_init(DBusConnection *conn, struct network_conf *service_conf)
void network_exit(void)
{
server_exit();
+ connection_exit();
dbus_connection_destroy_object_path(connection, NETWORK_PATH);
dbus_connection_unref(connection);
-
connection = NULL;
if (bridge_remove(BNEP_SVC_GN) < 0)