Call service state changed callback before state changed callback 72/269072/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 7 Jan 2022 07:35:08 +0000 (16:35 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Thu, 20 Jan 2022 09:30:28 +0000 (18:30 +0900)
commit877a5b40910fa1a85d23585cb3ef87fbfc1e7913
tree6dbe506fe497471fa0f0ca81ae08815938a1c6d1
parente200b2403672623bd57eeb8942450df548494b16
Call service state changed callback before state changed callback

https://review.tizen.org/gerrit/c/platform/core/uifw/voice-control/+/223267
The patch of this link makes that service state changed callback is called asynchronously. This was
because prepare process was handled on sub thread. In order to assure the callback calls on main
thread, the patch seperated the code for calling service state changed callback and state changed
callback. However, this change made client can not assure the value of service state because it
was updated unknown timing.

To solve this problem, this patch calls the service state changed callback before calling the state
changed callback. Current code does not handle the prepare process on sub thread but on main
thread. So, by this change, service state would be synchornously updated when the state changed
callback is called.

Change-Id: I276577fb494a93c8e4f58182c2e16a6ff88b7423
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/vc_mgr.c
server/vcd_server.c