OCT 1. 移除非必要情况下的zmq库调用

2. 进程句柄优化266-->116
This commit is contained in:
huangxin 2023-03-14 09:55:40 +08:00
parent 44d3cb5984
commit 7ebc4fd9d9
3 changed files with 8 additions and 4 deletions

View File

@ -4,8 +4,9 @@ INCLUDE(FetchContent)
PKG_SEARCH_MODULE(LIBCURL QUIET libcurl)
PKG_SEARCH_MODULE(LIBSSL QUIET libssl)
PKG_SEARCH_MODULE(LIBCRYPTO QUIET libcrypto)
PKG_SEARCH_MODULE(LIBZMQ QUIET libzmq)
IF (USED_ZMQ)
PKG_SEARCH_MODULE(LIBZMQ QUIET libzmq)
ENDIF ()
IF ((NOT LIBZMQ_FOUND) OR (NOT LIBCRYPTO_FOUND) OR (NOT LIBSSL_FOUND) OR (NOT LIBCURL_FOUND))
LINUX_INSTALL_SYSTEM_PACKAGE()
ENDIF ()

View File

@ -186,8 +186,11 @@ static int on_cmd2(void *pTbl[], const char *pName, void *pInfo) {
}
pJsonStr = cJSON_PrintUnformatted(pJsonObj);
ret = mq_cmd_run(pSvr, pJsonStr);
#ifdef ZEROMQ_ON
ret = mq_cmd_run(pSvr, pJsonStr);
#else
ret = ERR_SUCCESS;
#endif
cJSON_Delete(pJsonObj);
free((void *)pJsonStr);