summaryrefslogtreecommitdiffstats
path: root/network/server.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-28 13:30:48 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-09-28 13:30:48 +0000
commit54943abd65058d7c24fbf9384759181c16913a96 (patch)
tree1a15484532ef237cf2d5aa55c2ca3756ef3c3235 /network/server.c
parent684fe2781c46ccfb30a4e653fad126286bddcdcb (diff)
Add secure link mode.
Diffstat (limited to 'network/server.c')
-rw-r--r--network/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/network/server.c b/network/server.c
index b5a2c6d0..ac87ad19 100644
--- a/network/server.c
+++ b/network/server.c
@@ -600,7 +600,8 @@ static gboolean connect_event(GIOChannel *chan,
return TRUE;
}
-int server_init(DBusConnection *conn, const char *iface_prefix)
+int server_init(DBusConnection *conn, const char *iface_prefix,
+ gboolean secure)
{
struct l2cap_options l2o;
struct sockaddr_l2 l2a;
@@ -645,8 +646,7 @@ int server_init(DBusConnection *conn, const char *iface_prefix)
goto fail;
}
- /* FIXME: Set link mode - it is applied to all servers */
- lm = 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)",