diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-06-09 22:14:10 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2008-06-09 22:14:10 +0000 |
commit | 55abd54fe949168a657d622762c604dccaa5cf83 (patch) | |
tree | ab75f8129e146201062dfb7c8fb51d67beaf05cd /hcid/dbus-common.c | |
parent | 5d49d848060b0809a25acb9a20b176600f52e66d (diff) |
Removed find_conn function
Diffstat (limited to 'hcid/dbus-common.c')
-rw-r--r-- | hcid/dbus-common.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c index ffb13dff..2ce4e25e 100644 --- a/hcid/dbus-common.c +++ b/hcid/dbus-common.c @@ -31,11 +31,8 @@ #include <errno.h> #include <stdlib.h> #include <string.h> -#include <ctype.h> #include <unistd.h> #include <fcntl.h> -#include <sys/types.h> -#include <sys/socket.h> #include <sys/ioctl.h> #include <arpa/inet.h> @@ -61,7 +58,6 @@ #define BLUEZ_NAME "org.bluez" -#define MAX_CONN_NUMBER 10 #define RECONNECT_RETRY_TIMEOUT 5000 static int experimental = 0; @@ -168,35 +164,6 @@ failed: return -1; } -int find_conn(int s, int dev_id, long arg) -{ - struct hci_conn_list_req *cl; - struct hci_conn_info *ci; - int i; - - cl = g_malloc0(10 * sizeof(*ci) + sizeof(*cl)); - - cl->dev_id = dev_id; - cl->conn_num = 10; - ci = cl->conn_info; - - if (ioctl(s, HCIGETCONNLIST, cl)) { - error("Can't get connection list"); - goto failed; - } - - for (i = 0; i < cl->conn_num; i++, ci++) { - if (bacmp((bdaddr_t *) arg, &ci->bdaddr)) - continue; - g_free(cl); - return 1; - } - -failed: - g_free(cl); - return 0; -} - void hcid_dbus_set_experimental(void) { experimental = 1; |