diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2008-09-12 21:52:14 +0530 |
---|---|---|
committer | Alok Barsode <alok.barsode@azingo.com> | 2008-09-12 21:52:14 +0530 |
commit | 26e1749b1e18fd55ce32e84654e7a9123630bedf (patch) | |
tree | cd035525c86b87bfb6839c0f64bf754a99d35337 /src/dbus-common.c | |
parent | 7d93ead47f6b203feca6bfee78c4494b285539d2 (diff) |
Modifying l2raw_connect to take bdaddr_t as parameter.
Diffstat (limited to 'src/dbus-common.c')
-rw-r--r-- | src/dbus-common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c index e9295998..6c15dea2 100644 --- a/src/dbus-common.c +++ b/src/dbus-common.c @@ -54,7 +54,7 @@ #define RECONNECT_RETRY_TIMEOUT 5000 -int l2raw_connect(const char *local, const bdaddr_t *remote) +int l2raw_connect(const bdaddr_t *src, const bdaddr_t *dst) { struct sockaddr_l2 addr; long arg; @@ -68,7 +68,7 @@ int l2raw_connect(const char *local, const bdaddr_t *remote) memset(&addr, 0, sizeof(addr)); addr.l2_family = AF_BLUETOOTH; - str2ba(local, &addr.l2_bdaddr); + bacpy(&addr.l2_bdaddr, src); if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { error("Can't bind socket: %s (%d)", strerror(errno), errno); @@ -89,7 +89,7 @@ int l2raw_connect(const char *local, const bdaddr_t *remote) memset(&addr, 0, sizeof(addr)); addr.l2_family = AF_BLUETOOTH; - bacpy(&addr.l2_bdaddr, remote); + bacpy(&addr.l2_bdaddr, dst); if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { if (errno == EAGAIN || errno == EINPROGRESS) |