Consider processing state as no error 14/290314/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 20 Mar 2023 12:37:51 +0000 (21:37 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 19 Apr 2023 08:44:59 +0000 (08:44 +0000)
commit4db14493e89f18eed7e43f0c1851119488db251f
treef3118c3a9fed6cd7c86d4a3c3134114023ff44dc
parente0e050708f3df706e5744a2217976de713a2a905
Consider processing state as no error

- Issue:
When stt_stop() is invoked while silence detection is enabled, sometimes
the framework makes error.

- Solution:
stt_stop() function works asynchronously and silence detection also has
asynchronous behavior. So, these two logic can conflict with each other.
To avoid this situation, this patch skip the remained logic if the state
is already changes to processing. Through this patch, even if the two
logic is invoked at once, one of the logic will properly stop the
recording and another one will pass the logic with no error.
Post condition of these two process is same, so it is fine to skip the
logic with no error handling.

Change-Id: I7d5e143153b7167f742ec64daf50f73041491fab
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/sttd_client_data.c
server/sttd_server.c