[IOT-1625] Fix a logic to terminate CA in case of failure of init
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Wed, 30 Nov 2016 04:29:36 +0000 (13:29 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 9 Dec 2016 12:28:12 +0000 (12:28 +0000)
commit2749ff9dff85a4d035630f17668819d86de86cbe
tree2b235b69a3c6f17cafcfbd3f0742eb546776fe9b
parentb1dff99b4c40a3f31cddbb1130962a94f7aa6040
[IOT-1625] Fix a logic to terminate CA in case of failure of init

- If CAInitializeMessageHandler() fails, we should call
CATerminateMessageHandler() to terminate the main thread successfully.
- Calling u_arraylist_reserve before creating the thread

Bug: https://jira.iotivity.org/browse/IOT-1625
Change-Id: If291d90bbe69abbf967a7f0014c6e5d44644131d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14941
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15327
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
resource/csdk/connectivity/common/inc/uarraylist.h
resource/csdk/connectivity/common/src/cathreadpool_pthreads.c
resource/csdk/connectivity/common/src/uarraylist.c
resource/csdk/connectivity/src/caconnectivitymanager.c
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/caqueueingthread.c