diff --git a/include/util/tnote.h b/include/util/tnote.h index f17857a32b..e613ec7e41 100644 --- a/include/util/tnote.h +++ b/include/util/tnote.h @@ -38,9 +38,9 @@ extern SNoteObj tsHttpNote; extern SNoteObj tsTscNote; extern SNoteObj tsInfoNote; -void taosInitNotes(); -void taosNotePrint(SNoteObj* pNote, const char* const format, ...); -void taosNotePrintBuffer(SNoteObj *pNote, char *buffer, int32_t len); +int32_t taosInitNotes(); +void taosNotePrint(SNoteObj* pNote, const char* const format, ...); +void taosNotePrintBuffer(SNoteObj* pNote, char* buffer, int32_t len); #define nPrintHttp(...) \ if (tsHttpEnableRecordSql) { \ diff --git a/source/dnode/mgmt/daemon/src/daemon.c b/source/dnode/mgmt/daemon/src/daemon.c index 326dfae4af..e160de62d9 100644 --- a/source/dnode/mgmt/daemon/src/daemon.c +++ b/source/dnode/mgmt/daemon/src/daemon.c @@ -16,7 +16,9 @@ #define _DEFAULT_SOURCE #include "dnode.h" #include "os.h" +#include "tconfig.h" #include "tglobal.h" +#include "tnote.h" #include "ulog.h" static struct { @@ -68,7 +70,11 @@ int dmnParseOpts(int argc, char const *argv[]) { return 0; } -void dmnGenerateGrant() { grantParseParameter(); } +void dmnGenerateGrant() { +#if 0 + grantParseParameter(); +#endif +} void dmnPrintVersion() { #ifdef TD_ENTERPRISE @@ -83,9 +89,6 @@ void dmnPrintVersion() { } int dmnReadConfig(const char *path) { - taosIgnSIGPIPE(); - taosBlockSIGPIPE(); - taosResolveCRC(); taosInitGlobalCfg(); taosReadGlobalLogCfg(); diff --git a/source/dnode/mgmt/impl/CMakeLists.txt b/source/dnode/mgmt/impl/CMakeLists.txt index b061d75731..d0830484ed 100644 --- a/source/dnode/mgmt/impl/CMakeLists.txt +++ b/source/dnode/mgmt/impl/CMakeLists.txt @@ -1,5 +1,5 @@ aux_source_directory(src DNODE_SRC) -add_library(dnode ${DNODE_SRC}) +add_library(dnode STATIC ${DNODE_SRC}) target_link_libraries( dnode PUBLIC cjson diff --git a/source/dnode/mgmt/impl/src/dndInt.c b/source/dnode/mgmt/impl/src/dndInt.c index 9e77da61b4..9f575ddb4d 100644 --- a/source/dnode/mgmt/impl/src/dndInt.c +++ b/source/dnode/mgmt/impl/src/dndInt.c @@ -21,6 +21,7 @@ #include "sync.h" #include "tcache.h" #include "wal.h" +#include "tcrc32c.h" EStat dndGetStat(SDnode *pDnode) { return pDnode->stat; } @@ -135,6 +136,10 @@ static void dndCleanupEnv(SDnode *pDnode) { } SDnode *dndInit(SDnodeOpt *pOptions) { + taosIgnSIGPIPE(); + taosBlockSIGPIPE(); + taosResolveCRC(); + SDnode *pDnode = calloc(1, sizeof(pDnode)); if (pDnode == NULL) { dError("failed to create dnode object"); diff --git a/source/dnode/mnode/impl/src/mnode.c b/source/dnode/mnode/impl/src/mnode.c index 877ec1431c..5eff8a37ca 100644 --- a/source/dnode/mnode/impl/src/mnode.c +++ b/source/dnode/mnode/impl/src/mnode.c @@ -207,6 +207,8 @@ void mnodeCleanupMsg(SMnodeMsg *pMsg) { taosFreeQitem(pMsg); } +void mnodeSendRsp(SMnodeMsg *pMsg, int32_t code) {} + static void mnodeProcessRpcMsg(SMnodeMsg *pMsg) { if (!mnodeIsMaster()) { mnodeSendRedirectMsg(NULL, &pMsg->rpcMsg, true); diff --git a/source/util/src/tnote.c b/source/util/src/tnote.c index 50b1e0002d..5606ab248d 100644 --- a/source/util/src/tnote.c +++ b/source/util/src/tnote.c @@ -40,7 +40,7 @@ static void taosInitNote(int32_t numOfLines, int32_t maxNotes, SNoteObj *pNote, taosNotePrint(pNote, "=================================================="); } -void taosInitNotes() { +int32_t taosInitNotes() { char name[TSDB_FILENAME_LEN * 2] = {0}; #if 0 @@ -58,7 +58,8 @@ void taosInitNotes() { snprintf(name, TSDB_FILENAME_LEN * 2, "%s/taosinfo", tsLogDir); taosInitNote(tsNumOfLogLines, 1, &tsInfoNote, name); } -#endif +#endif + return 0; } static bool taosLockNote(int32_t fd, SNoteObj *pNote) {