projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed regression in CARetransmission from the deadlock fix
[platform/upstream/iotivity.git]
/
resource
/
csdk
/
connectivity
/
src
/
caretransmission.c
diff --git
a/resource/csdk/connectivity/src/caretransmission.c
b/resource/csdk/connectivity/src/caretransmission.c
index
e4938f5
..
b8c6f59
100644
(file)
--- a/
resource/csdk/connectivity/src/caretransmission.c
+++ b/
resource/csdk/connectivity/src/caretransmission.c
@@
-224,7
+224,7
@@
static void CARetransmissionBaseRoutine(void *threadValue)
OIC_LOG(DEBUG, TAG, "wake up..");
}
OIC_LOG(DEBUG, TAG, "wake up..");
}
- else
+ else
if (!context->isStop)
{
// check each RETRANSMISSION_CHECK_PERIOD_SEC time.
OIC_LOG_V(DEBUG, TAG, "wait..(%d)microseconds",
{
// check each RETRANSMISSION_CHECK_PERIOD_SEC time.
OIC_LOG_V(DEBUG, TAG, "wait..(%d)microseconds",
@@
-234,6
+234,10
@@
static void CARetransmissionBaseRoutine(void *threadValue)
uint64_t absTime = RETRANSMISSION_CHECK_PERIOD_SEC * (uint64_t) USECS_PER_SEC;
ca_cond_wait_for(context->threadCond, context->threadMutex, absTime );
}
uint64_t absTime = RETRANSMISSION_CHECK_PERIOD_SEC * (uint64_t) USECS_PER_SEC;
ca_cond_wait_for(context->threadCond, context->threadMutex, absTime );
}
+ else
+ {
+ // we are stopping, so we want to unlock and finish stopping
+ }
// mutex unlock
ca_mutex_unlock(context->threadMutex);
// mutex unlock
ca_mutex_unlock(context->threadMutex);