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

minor bugs

上级 183e444e
...@@ -287,7 +287,7 @@ void rpcClose(void *param) { ...@@ -287,7 +287,7 @@ void rpcClose(void *param) {
(*taosCleanUpConn[pRpc->connType])(pRpc->udphandle); (*taosCleanUpConn[pRpc->connType])(pRpc->udphandle);
for (int i = 0; i < pRpc->sessions; ++i) { for (int i = 0; i < pRpc->sessions; ++i) {
if (pRpc->connList[i].user[0]) { if (pRpc->connList && pRpc->connList[i].user[0]) {
rpcCloseConn((void *)(pRpc->connList + i)); rpcCloseConn((void *)(pRpc->connList + i));
} }
} }
......
...@@ -99,7 +99,7 @@ void taosFreeQitem(void *param) { ...@@ -99,7 +99,7 @@ void taosFreeQitem(void *param) {
int taosWriteQitem(taos_queue param, int type, void *item) { int taosWriteQitem(taos_queue param, int type, void *item) {
STaosQueue *queue = (STaosQueue *)param; STaosQueue *queue = (STaosQueue *)param;
STaosQnode *pNode = (STaosQnode *)((char *)item - sizeof(STaosQnode)); STaosQnode *pNode = (STaosQnode *)(((char *)item) - sizeof(STaosQnode));
pNode->type = type; pNode->type = type;
pthread_mutex_lock(&queue->mutex); pthread_mutex_lock(&queue->mutex);
...@@ -187,6 +187,7 @@ int taosGetQitem(taos_qall param, int *type, void **pitem) { ...@@ -187,6 +187,7 @@ int taosGetQitem(taos_qall param, int *type, void **pitem) {
if (pNode) { if (pNode) {
*pitem = pNode->item; *pitem = pNode->item;
*type = pNode->type;
num = 1; num = 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册