Skip to content

Commit

Permalink
Set adapter name properly if non-default adapter is passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanshil Shah authored and oliviermartin committed Jul 20, 2020
1 parent f5c2fcc commit 054f64e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbus/gattlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ gatt_connection_t *gattlib_connect(void* adapter, const char *dst, unsigned long
// In case NULL is passed, we initialized default adapter
if (gattlib_adapter == NULL) {
gattlib_adapter = init_default_adapter();
} else {
adapter_name = gattlib_adapter->adapter_name;
}

get_device_path_from_mac(adapter_name, dst, object_path, sizeof(object_path));
Expand Down

0 comments on commit 054f64e

Please sign in to comment.