diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2008-08-28 14:39:02 -0300 |
---|---|---|
committer | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2008-08-28 14:54:20 -0300 |
commit | 9ce93182d3d2e9ed90ef46c102cac27fd2d278d8 (patch) | |
tree | bb15a0f7962041fc2a07590331960288ef34657c /common/glib-helper.c | |
parent | 6c49baa76eef3b34b6bc83be093d66a3bc4a6af3 (diff) |
the bind call on l2cap_bind was using the wrong address
Diffstat (limited to 'common/glib-helper.c')
-rw-r--r-- | common/glib-helper.c | 3 |
1 files changed, 1 insertions, 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)); |