2010-07-13 18:46:22

by Elvis Pfutzenreuter

[permalink] [raw]
Subject: [PATCH 1/1] Makes FindAdapter() accept lower-case hex addresses

---
src/manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/manager.c b/src/manager.c
index cbbca1e..9b90cab 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -337,7 +337,7 @@ static gint adapter_address_cmp(gconstpointer a, gconstpointer b)
adapter_get_address(adapter, &bdaddr);
ba2str(&bdaddr, addr);

- return strcmp(addr, address);
+ return strcasecmp(addr, address);
}

struct btd_adapter *manager_find_adapter(const bdaddr_t *sba)
--
1.7.0.4



2010-07-13 19:53:36

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH 1/1] Makes FindAdapter() accept lower-case hex addresses

Hi Elvis,

On Tue, Jul 13, 2010, Elvis Pf?tzenreuter wrote:
> ---
> src/manager.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/manager.c b/src/manager.c
> index cbbca1e..9b90cab 100644
> --- a/src/manager.c
> +++ b/src/manager.c
> @@ -337,7 +337,7 @@ static gint adapter_address_cmp(gconstpointer a, gconstpointer b)
> adapter_get_address(adapter, &bdaddr);
> ba2str(&bdaddr, addr);
>
> - return strcmp(addr, address);
> + return strcasecmp(addr, address);

The patch is now upstream. Thanks.

Johan