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