From ca9725f806d20f2750f20629d8135ec3462d29a2 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Sun, 19 May 2019 00:19:33 +0200 Subject: [PATCH] dbus: Implement gattlib_connect_async() --- dbus/gattlib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dbus/gattlib.c b/dbus/gattlib.c index 3c132dd..c1daf1b 100644 --- a/dbus/gattlib.c +++ b/dbus/gattlib.c @@ -360,7 +360,14 @@ gatt_connection_t *gattlib_connect_async(const char *src, const char *dst, uint8_t dest_type, gattlib_bt_sec_level_t sec_level, int psm, int mtu, gatt_connect_cb_t connect_cb, void* data) { - return NULL; + gatt_connection_t *connection; + + connection = gattlib_connect(src, dst, dest_type, sec_level, psm, mtu); + if ((connection != NULL) && (connect_cb != NULL)) { + connect_cb(connection, data); + } + + return connection; } int gattlib_disconnect(gatt_connection_t* connection) {