[TD-571] merge changes of 1.6
This commit is contained in:
parent
20f95567de
commit
7bae0faeac
|
@ -73,6 +73,7 @@ bool httpParseTaosdAuthToken(HttpContext *pContext, char *token, int len) {
|
||||||
unsigned char *base64 = base64_decode(token, len, &outlen);
|
unsigned char *base64 = base64_decode(token, len, &outlen);
|
||||||
if (base64 == NULL || outlen == 0) {
|
if (base64 == NULL || outlen == 0) {
|
||||||
httpError("context:%p, fd:%d, ip:%s, taosd token:%s parsed error", pContext, pContext->fd, pContext->ipstr, token);
|
httpError("context:%p, fd:%d, ip:%s, taosd token:%s parsed error", pContext, pContext->fd, pContext->ipstr, token);
|
||||||
|
if (base64) free(base64);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (outlen != (TSDB_USER_LEN + TSDB_PASSWORD_LEN)) {
|
if (outlen != (TSDB_USER_LEN + TSDB_PASSWORD_LEN)) {
|
||||||
|
|
|
@ -68,7 +68,6 @@ bool httpInitContexts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void httpCleanupContexts() {
|
void httpCleanupContexts() {
|
||||||
// TODO: wait until all context is closed
|
|
||||||
if (tsHttpServer.contextCache != NULL) {
|
if (tsHttpServer.contextCache != NULL) {
|
||||||
SCacheObj *cache = tsHttpServer.contextCache;
|
SCacheObj *cache = tsHttpServer.contextCache;
|
||||||
httpPrint("context cache is cleanuping, size:%d", taosHashGetSize(cache->pHashTable));
|
httpPrint("context cache is cleanuping, size:%d", taosHashGetSize(cache->pHashTable));
|
||||||
|
|
|
@ -56,8 +56,9 @@ static void httpStopThread(HttpThread* pThread) {
|
||||||
|
|
||||||
void httpCleanUpConnect() {
|
void httpCleanUpConnect() {
|
||||||
HttpServer *pServer = &tsHttpServer;
|
HttpServer *pServer = &tsHttpServer;
|
||||||
pthread_join(pServer->thread, NULL);
|
if (pServer->pThreads == NULL) return;
|
||||||
|
|
||||||
|
pthread_join(pServer->thread, NULL);
|
||||||
for (int i = 0; i < pServer->numOfThreads; ++i) {
|
for (int i = 0; i < pServer->numOfThreads; ++i) {
|
||||||
HttpThread* pThread = pServer->pThreads + i;
|
HttpThread* pThread = pServer->pThreads + i;
|
||||||
if (pThread != NULL) {
|
if (pThread != NULL) {
|
||||||
|
@ -195,9 +196,9 @@ static void httpProcessHttpData(void *param) {
|
||||||
for (int i = 0; i < fdNum; ++i) {
|
for (int i = 0; i < fdNum; ++i) {
|
||||||
pContext = httpGetContext(events[i].data.ptr);
|
pContext = httpGetContext(events[i].data.ptr);
|
||||||
if (pContext == NULL) {
|
if (pContext == NULL) {
|
||||||
httpError("fd:%d, is already released, close connect", events[i].data.fd);
|
httpError("context:%p, is already released, close connect", events[i].data.ptr);
|
||||||
epoll_ctl(pThread->pollFd, EPOLL_CTL_DEL, pContext->fd, NULL);
|
//epoll_ctl(pThread->pollFd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
|
||||||
tclose(events[i].data.fd);
|
//tclose(events[i].data.fd);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ if $rows != 0 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql create database a012345678901201234567890120123456789012 -x step4
|
sql create database a012345678901201234567890120123456789012a012345678901201234567890120123456789012 -x step4
|
||||||
return -1
|
return -1
|
||||||
step4:
|
step4:
|
||||||
sql show databases
|
sql show databases
|
||||||
|
|
Loading…
Reference in New Issue