gatt client: Fix SIGABRT 68/163368/1 accepted/tizen_3.0_common accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable tizen_3.0 accepted/tizen/3.0/common/20171214.102437 accepted/tizen/3.0/mobile/20171214.091005 accepted/tizen/3.0/tv/20171214.091010 accepted/tizen/3.0/wearable/20171214.091015 submit/tizen_3.0/20171211.001202
authorAnupam Roy <anupam.r@samsung.com>
Mon, 13 Nov 2017 12:35:02 +0000 (18:05 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 11 Dec 2017 00:11:08 +0000 (09:11 +0900)
commit3382118a806bae4539f7b815269538aab1a0d5dd
tree6fea2eb4f1cc0db84ad542278fab92e925abe45d
parent9b3ce9cf92bea3a70a76eae7d01c0dbca9b99ae8
gatt client: Fix SIGABRT

JIRA Issue: http://suprem.sec.samsung.net/jira/browse/TSAM-14037

[Problem] Application terminates when GATT descriptor
          'WriteValue' API fails.
[Cause] In case of error in BlueZ DBUS API 'WriteValue', NULL
        is received in g_dbus_connection_call_finish() in gatt
        client. So, instead of returning after chekcing
        error value, code was trying to unref NULL value causing
        application to terminate abnormally.
[Measure] Return from GATT write descriptor callback, in case of error.
[Checking Method] Perform GATT desc 'WriteValue' using bt_unit_test.

Change-Id: Iadddd7084b1a76acb7667e77c4acf7e6a0a9a4f5
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
bt-api/bt-gatt-client.c