Skip to content

Commit

Permalink
Fix gattlib_connection_is_connected
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviermartin committed Apr 8, 2024
1 parent c95930a commit fa748d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/gattlib_common_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct _connection_is_connected {

static gint _is_device_connection(gconstpointer a, gconstpointer b) {
const gattlib_device_t* device = a;
return (&device->connection == b);
return (&device->connection == b) ? 0 : -1; // We need to return 0 when it matches
}

static void _gattlib_connection_is_connected(gpointer data, gpointer user_data) {
Expand Down

0 comments on commit fa748d7

Please sign in to comment.