Fix app com deletion 68/272068/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 7 Mar 2022 23:38:23 +0000 (08:38 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 8 Mar 2022 00:04:52 +0000 (09:04 +0900)
commit85a0f2aa6aeeb8b94450216f0648b86e0e62a87c
treedb02bac18969652b064dcf04c33f96000016d54d
parent4ac444d9c027eb0a74478e3064b0dbf943a30620
Fix app com deletion

To avoid crash issue, this patch uses idler to remove the app_com_connection_h.
While calling the app_com_leave() function, the connection is set the disabled flag
to 'true'. If the disabled flag of the connection is 'true', the Invoke() method
doesn't call the callback function.
This patch is to fix the following crash issue:
+------------------------------------------------------------------------------+
| #0  0x43a88614 in std::_List_iterator<std::unique_ptr<(anonymous namespace)::|
|     AppComConnection, std::default_delete<(anonymous namespace)::AppComConnec|
|     tion> > >::operator++ (this=<synthetic pointer>)                         |
|     at /usr/lib/gcc/armv7l-tizen-linux-gnueabi/9.2.0/include/c++/mutex:109   |
| #1  (anonymous namespace)::Context::Receive (this=<optimized out>,           |
|     b=0x967c8af0) at /usr/src/debug/aul-0.43.10/src/app_com.cc:107           |
| #2  app_com_recv (b=0x967c8af0)                                              |
|     at /usr/src/debug/aul-0.43.10/src/app_com.cc:172                         |
+------------------------------------------------------------------------------+

Change-Id: I81a5d27fc49ba632c01c3171d4541e3eb3cd4605
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app_com.cc