Fix WriteValue timeout issue 24/309824/1
authorWootak Jung <wootak.jung@samsung.com>
Sun, 7 Apr 2024 23:18:17 +0000 (08:18 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 17 Apr 2024 03:11:10 +0000 (12:11 +0900)
commit1f3392fc52a1f8860aea24cc10323690f5943cf5
tree77287b0ef8ff2411b613ade2d478ac0dcafa6c1b
parent449dc27d51c6b9953849a8050645993680f88a7b
Fix WriteValue timeout issue

Apr 04 16:11:51.062065 Samsung-FamilyHub bluetoothd[6483]: src/gatt-database.c:pending_write_new() ### op 0xabccb558 attrib 0xabccd568 queue 0xabccf2e0 id 1
Apr 04 16:11:51.062329 Samsung-FamilyHub bluetoothd[6483]: src/gatt-database.c:send_write() ### op 0xabccb558 attrib 0xabccd568
// timeout occurs if no reply
Apr 04 16:16:51.064207 Samsung-FamilyHub bluetoothd[6483]: src/gatt-database.c:pending_op_free() op 0xabccb558

g_dbus_method_invocation_return_value:
 * if (error != NULL)
 *   g_dbus_method_invocation_return_gerror (invocation, error);
 * else
 *   g_dbus_method_invocation_return_value (invocation,
 *                                          g_variant_new ("(s)", result_string));
 *
 * // Do not free @invocation here; returning a value does that
 * ]|
 *
 * This method will take ownership of @invocation. See
 * #GDBusInterfaceVTable for more information about the ownership of
 * @invocation.

GDBusInterfaceVTable:
Ownership of the GDBusMethodInvocation object passed to the method_call() function
is transferred to your handler; you must call one of the methods of GDBusMethodInvocation
to return a reply (possibly empty), or an error.
These functions also take ownership of the passed-in invocation object,
so unless the invocation object has otherwise been referenced, it will be then be freed.

Change-Id: I389475519d912044bff5d98ceffa8064ec9012d3
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
bt-oal/bluez_hal/src/bt-hal-gatt-server.c