Fix timing issue 61/264561/3
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 24 Sep 2021 09:04:56 +0000 (18:04 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 28 Sep 2021 08:52:36 +0000 (17:52 +0900)
commit5f266f62ff63afcf0aaf169b65308a1a3d18d4e7
treebe0fd64f65a8a6e50454886033d55384a603e84c
parentca14d0cf3bd7fd678ea84f98d24c14a3f3a10abe
Fix timing issue

Following scenario can occur. (Th: thread)
1. Th1: Call vine_dp_open()
2. Th2: opened_cb isn't invoked yet.
3. Th1: Call vine_dp_close() or vine_dp_destroy()
4. Th2: Access to freed memory

LWS with external poll doesn't provide API for cancel websocket creation.
So, This patch handles close() and destroy() request in internal thread(Th2).

Change-Id: I394786fdfb5b7cf161ef4d2a904b9ba5d9960b2d
packaging/capi-network-vine.spec
plugins/libwebsockets/libwebsockets-plugin.cpp
src/vine-data-path.cpp
tests/vine-test/vine-test.cpp