summaryrefslogtreecommitdiffstats
path: root/network/server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-04-16 20:54:02 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-04-16 20:54:02 +0000
commitef29c39ffc97adc9893841165f9e9a3f6a1e9a0a (patch)
treec52388a01e836caa18be12c2c3bfd83ee9982e9f /network/server.c
parentd3d1ce6e2bc9ecbfb70b5d306e419750ba0936b6 (diff)
Move code to bring up interface to common and use it on connection.
Diffstat (limited to 'network/server.c')
-rw-r--r--network/server.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/network/server.c b/network/server.c
index e47c06ac..7f4fbcf6 100644
--- a/network/server.c
+++ b/network/server.c
@@ -286,8 +286,7 @@ static void authorization_callback(DBusPendingCall *pcall, void *data)
char devname[16];
DBusError derr;
uint16_t response;
- int sk, sd, err;
- struct ifreq ifr;
+ int sk;
if (!ns->pauth) {
dbus_message_unref(reply);
@@ -327,14 +326,8 @@ static void authorization_callback(DBusPendingCall *pcall, void *data)
goto failed;
}
- sd = socket(AF_INET6, SOCK_DGRAM, 0);
- strcpy(ifr.ifr_name, devname);
- ifr.ifr_flags |= IFF_UP;
- if((ioctl(sd, SIOCSIFFLAGS, (caddr_t) &ifr)) < 0) {
- err = errno;
- error("Could not bring up %d. %s(%d)", devname, strerror(err),
- err);
- }
+ bnep_if_up(devname, TRUE);
+ bnep_if_up("pan0", TRUE);
/* FIXME: Enable routing if applied */