From 9ce93182d3d2e9ed90ef46c102cac27fd2d278d8 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Thu, 28 Aug 2008 14:39:02 -0300 Subject: the bind call on l2cap_bind was using the wrong address --- common/glib-helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/glib-helper.c b/common/glib-helper.c index 33fde08d..64641858 100644 --- a/common/glib-helper.c +++ b/common/glib-helper.c @@ -771,7 +771,6 @@ static int l2cap_bind(struct io_context *io_ctxt, const char *address, { int err; struct l2cap_options l2o; - struct sockaddr_l2 l2a; io_ctxt->fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP); if (io_ctxt->fd < 0) @@ -797,7 +796,7 @@ static int l2cap_bind(struct io_context *io_ctxt, const char *address, memset(addr, 0, sizeof(*addr)); addr->l2_family = AF_BLUETOOTH; - str2ba(address, &l2a.l2_bdaddr); + str2ba(address, &addr->l2_bdaddr); addr->l2_psm = htobs(psm); err = bind(io_ctxt->fd, (struct sockaddr *) addr, sizeof(*addr)); -- cgit From d4536bb1c8decaff4950d229191ec23f359f8ee0 Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Thu, 28 Aug 2008 16:22:28 -0300 Subject: Fixes a free on the wrong structure. --- network/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/network/server.c b/network/server.c index 18ee24f6..3fa99d25 100644 --- a/network/server.c +++ b/network/server.c @@ -531,7 +531,8 @@ reply: static void setup_destroy(void *user_data) { - struct timeout *to = user_data; + struct network_adapter *na = user_data; + struct timeout *to = na->to; if (to->id) g_source_remove(to->id); -- cgit