summaryrefslogtreecommitdiffstats
path: root/network/server.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/server.c
parent6113615ecfb8026a6a3ce0af38fc79ec8abec748 (diff)
Fixes codestyle, bridge creation and some code cleanup.
Diffstat (limited to 'network/server.c')
-rw-r--r--network/server.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/network/server.c b/network/server.c
index 80ab49a1..de30f72e 100644
--- a/network/server.c
+++ b/network/server.c
@@ -80,6 +80,7 @@ struct network_server {
char *path; /* D-Bus path */
gboolean enable; /* Enable flag */
gboolean secure; /* Security flag */
+ gboolean up; /* Interface up flag */
uint32_t record_id; /* Service record id */
uint16_t id; /* Service class identifier */
GSList *clients; /* Active connections */
@@ -345,14 +346,14 @@ static void authorization_callback(DBusPendingCall *pcall, void *data)
bridge = bridge_get_name(ns->id);
if (bridge) {
bnep_if_up(devname, 0);
- bnep_if_up(bridge, ns->id);
+ if (!ns->up)
+ bnep_if_up(bridge, ns->id);
} else
bnep_if_up(devname, ns->id);
+ ns->up = TRUE;
ns->clients = g_slist_append(ns->clients, g_strdup(s->address));
- /* FIXME: Enable routing if applied */
-
/* FIXME: send the D-Bus message to notify the new bnep iface */
failed: