From: Amit Purwar Date: Mon, 4 Feb 2019 06:32:06 +0000 (+0530) Subject: Fixed the WriteAcquired property for char write X-Git-Tag: accepted/tizen/unified/20190212.084048~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=3d5b8559941e624c91712b57d161631125906cb9;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Fixed the WriteAcquired property for char write Change-Id: Ic49087d5c6a6efc45c102a4d5224e8e5eef3eb31 Signed-off-by: Amit Purwar --- diff --git a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c index bfeee9a..949ea0c 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c +++ b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c @@ -737,8 +737,11 @@ static void __bt_gatt_manager_method_call(GDBusConnection *connection, for (i = 0; i < char_info->flags_length; i++) { g_variant_builder_add(builder2, "s", char_info->char_flags[i]); - if (strncmp(char_info->char_flags[i], "write-without-response", 16) == 0) + + if (strncmp(char_info->char_flags[i], "write-without-response", 16) == 0) { + DBG("setting writeAcquired property"); writeAcquired = TRUE; + } if (strncmp(char_info->char_flags[i], "notify", 4) == 0) notifyAcquired = TRUE; @@ -752,9 +755,12 @@ static void __bt_gatt_manager_method_call(GDBusConnection *connection, g_variant_builder_add(inner_builder, "{sv}", "Notifying", g_variant_new("b", notify)); - /* Unicast */ - g_variant_builder_add(inner_builder, "{sv}", "WriteAcquired", + /* WriteAcquired */ + if (writeAcquired == TRUE) { + DBG("adding writeAcquired property"); + g_variant_builder_add(inner_builder, "{sv}", "WriteAcquired", g_variant_new("b", writeAcquired)); + } /* NotifyAcquired */ g_variant_builder_add(inner_builder, "{sv}", "NotifyAcquired",