diff options
Diffstat (limited to 'hcid/adapter.c')
| -rw-r--r-- | hcid/adapter.c | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/hcid/adapter.c b/hcid/adapter.c index b18b054f..4b1bc0eb 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -2130,6 +2130,24 @@ static void create_device_req_free(struct create_device_req *create)  	create = NULL;  } +struct device *adapter_get_device(struct adapter *adapter, const char *src) +{ +	struct device *device; +	GSList *l; + +	if (!adapter) +		return NULL; + +	l = g_slist_find_custom(adapter->devices, +				src, (GCompareFunc) device_address_cmp); +	if (!l) +		return NULL; + +	device = l->data; + +	return device; +} +  static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond,  						struct adapter *adapter)  { | 
