提交 98e3431e 编写于 作者: 陶建辉(Jeff)'s avatar 陶建辉(Jeff)

taosAcquireRef return a pointer, not an integer

上级 a2114b22
...@@ -1097,7 +1097,7 @@ static void syncProcessBrokenLink(void *param) { ...@@ -1097,7 +1097,7 @@ static void syncProcessBrokenLink(void *param) {
SSyncPeer *pPeer = param; SSyncPeer *pPeer = param;
SSyncNode *pNode = pPeer->pSyncNode; SSyncNode *pNode = pPeer->pSyncNode;
if (taosAcquireRef(tsSyncRefId, pNode->rid) < 0) return; if (taosAcquireRef(tsSyncRefId, pNode->rid) == NULL) return;
pthread_mutex_lock(&(pNode->mutex)); pthread_mutex_lock(&(pNode->mutex));
sDebug("%s, TCP link is broken(%s)", pPeer->id, strerror(errno)); sDebug("%s, TCP link is broken(%s)", pPeer->id, strerror(errno));
......
...@@ -77,8 +77,8 @@ void *acquireRelease(void *param) { ...@@ -77,8 +77,8 @@ void *acquireRelease(void *param) {
printf("a"); printf("a");
id = random() % pSpace->refNum; id = random() % pSpace->refNum;
code = taosAcquireRef(pSpace->rsetId, pSpace->p[id]); void *p = taosAcquireRef(pSpace->rsetId, pSpace->p[id]);
if (code >= 0) { if (p) {
usleep(id % 5 + 1); usleep(id % 5 + 1);
taosReleaseRef(pSpace->rsetId, pSpace->p[id]); taosReleaseRef(pSpace->rsetId, pSpace->p[id]);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册