minor bugs
This commit is contained in:
parent
183e444e95
commit
c427033a13
|
@ -287,7 +287,7 @@ void rpcClose(void *param) {
|
|||
(*taosCleanUpConn[pRpc->connType])(pRpc->udphandle);
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void taosFreeQitem(void *param) {
|
|||
|
||||
int taosWriteQitem(taos_queue param, int type, void *item) {
|
||||
STaosQueue *queue = (STaosQueue *)param;
|
||||
STaosQnode *pNode = (STaosQnode *)((char *)item - sizeof(STaosQnode));
|
||||
STaosQnode *pNode = (STaosQnode *)(((char *)item) - sizeof(STaosQnode));
|
||||
pNode->type = type;
|
||||
|
||||
pthread_mutex_lock(&queue->mutex);
|
||||
|
@ -187,6 +187,7 @@ int taosGetQitem(taos_qall param, int *type, void **pitem) {
|
|||
|
||||
if (pNode) {
|
||||
*pitem = pNode->item;
|
||||
*type = pNode->type;
|
||||
num = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue