From: Jaehyun Kim Date: Thu, 10 Oct 2019 05:58:11 +0000 (+0000) Subject: Merge "Fix double CONN_LOCK call leading to deadlock" into tizen X-Git-Tag: accepted/tizen/5.5/unified/20191031.030104~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c479089321319f3ab984271279c3d54194607241;hp=b043720029edaa3c6a8cffb8db72fd0a63e47e2d;p=platform%2Fcore%2Fapi%2Fconnection.git Merge "Fix double CONN_LOCK call leading to deadlock" into tizen --- diff --git a/packaging/capi-network-connection.spec b/packaging/capi-network-connection.spec index 71bdb8e..b673b4e 100755 --- a/packaging/capi-network-connection.spec +++ b/packaging/capi-network-connection.spec @@ -1,6 +1,6 @@ Name: capi-network-connection Summary: Network Connection library in TIZEN C API -Version: 1.0.116 +Version: 1.0.117 Release: 1 Group: System/Network License: Apache-2.0 diff --git a/src/connection.c b/src/connection.c index 371ef54..b90606f 100755 --- a/src/connection.c +++ b/src/connection.c @@ -217,13 +217,13 @@ EXPORT_API int connection_create_cs(int tid, connection_h *connection) { int rv; - CONN_LOCK; - rv = connection_create(connection); - if (rv == CONNECTION_ERROR_NONE) + if (rv == CONNECTION_ERROR_NONE) { + CONN_LOCK; _connection_set_cs_tid(tid, *connection); + CONN_UNLOCK; + } - CONN_UNLOCK; return rv; } @@ -232,11 +232,11 @@ EXPORT_API int connection_destroy_cs(int tid, connection_h connection) int rv; CONN_LOCK; - _connection_unset_cs_tid(tid, connection); + CONN_UNLOCK; + rv = connection_destroy(connection); - CONN_UNLOCK; return rv; }