Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/external.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ if(TD_WEBSOCKET)
ENDIF()


if(${TD_LINUX})
if(TD_LINUX AND TD_ENTERPRISE) # {
if(${BUILD_LIBSASL}) # {
if(${TD_LINUX})
set(ext_sasl2 libsasl2.a)
Expand Down
2 changes: 1 addition & 1 deletion source/libs/transport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif()


if (${TD_LINUX})
if (${BUILD_LIBSASL})
if (${TD_ENTERPRISE}) # {
DEP_ext_sasl2(transport)
endif()
endif()
Expand Down
20 changes: 19 additions & 1 deletion source/libs/transport/src/transSvr.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ SDataTimeWhiteListTab* uvDataTimeWhiteListCreate() {
return pWhiteList;
}
void uvDataTimeWhiteListDestroy(SDataTimeWhiteListTab* pWhite) {
if (pWhite == NULL) {
return;
}
SHashObj* pWhiteList = pWhite->pList;
void* pIter = taosHashIterate(pWhiteList, NULL);
while (pIter) {
Expand Down Expand Up @@ -537,6 +540,9 @@ void uvDataTimeWhiteListDebug(SDataTimeWhiteListTab* pWrite) {
if (!(rpcDebugFlag & DEBUG_DEBUG)) {
return;
}
if (pWrite == NULL) {
return;
}
int32_t len = 0;
SHashObj* pWhiteList = pWrite->pList;
void* pIter = taosHashIterate(pWhiteList, NULL);
Expand All @@ -560,7 +566,13 @@ void uvDataTimeWhiteListDebug(SDataTimeWhiteListTab* pWrite) {
}
int32_t uvDataTimeWhiteListAdd(SDataTimeWhiteListTab* pWhite, char* user, SUserDateTimeWhiteList* plist, int64_t ver) {
int32_t code = 0;
if (pWhite == NULL) {
return TSDB_CODE_INVALID_PARA;
}
SHashObj* pWhiteList = pWhite->pList;
if (pWhiteList == NULL) {
return TSDB_CODE_INVALID_PARA;
}

SUserDateTimeWhiteList* pUserList = taosHashGet(pWhiteList, user, strlen(user));
if (pUserList == NULL) {
Expand Down Expand Up @@ -2125,6 +2137,13 @@ void* transInitServer(SIpAddr* addr, char* label, int numOfThreads, void* fp, vo
code = terrno;
goto End;
}

thrd->pDataTimeWhiteList = uvDataTimeWhiteListCreate();
if (thrd->pDataTimeWhiteList == NULL) {
destroyWorkThrdObj(thrd);
code = terrno;
goto End;
}
thrd->connRefMgt = transOpenRefMgt(50000, transDestroyExHandle);
if (thrd->connRefMgt < 0) {
code = thrd->connRefMgt;
Expand Down Expand Up @@ -2376,7 +2395,6 @@ void uvHandleUpdateDataTimeWhiteList(SSvrRespMsg* msg, SWorkThrd* thrd) {
} else {
tError("failed to update ip-white-list since %s", tstrerror(code));
}
// uvDataTimeWhiteListToStr(thrd->pDataTimeWhiteList, user, &pBuf);
_error:
if (code != 0) {
tError("failed to update data-time-white-list since %s", tstrerror(code));
Expand Down
Loading