[Trivial] Fix initialization code of TSDB_MOD_MGMT module.

* Description
This patch fixes enablement of TSDB_MOD_MGMT module, which was
incorrectly assign to 'name' variable.

* Testing
Compile the code. Feel free to suggest more testing that needs to
be done. Given that 'tsModule' is zero initialized, I don't think
there's any functional difference for this patch.
This commit is contained in:
yifan hao 2020-05-03 13:10:35 -06:00
parent a2f6d85c9d
commit f041e6c25c
1 changed files with 3 additions and 3 deletions

View File

@ -44,13 +44,13 @@ static void dnodeUnSetModuleStatus(int32_t module) {
}
static void dnodeAllocModules() {
tsModule[TSDB_MOD_MGMT].name = false;
tsModule[TSDB_MOD_MGMT].enable = false;
tsModule[TSDB_MOD_MGMT].name = "mgmt";
tsModule[TSDB_MOD_MGMT].initFp = mgmtInitSystem;
tsModule[TSDB_MOD_MGMT].cleanUpFp = mgmtCleanUpSystem;
tsModule[TSDB_MOD_MGMT].startFp = mgmtStartSystem;
tsModule[TSDB_MOD_MGMT].stopFp = mgmtStopSystem;
tsModule[TSDB_MOD_HTTP].enable = (tsEnableHttpModule == 1);
tsModule[TSDB_MOD_HTTP].name = "http";
tsModule[TSDB_MOD_HTTP].initFp = httpInitSystem;
@ -60,7 +60,7 @@ static void dnodeAllocModules() {
if (tsEnableHttpModule) {
dnodeSetModuleStatus(TSDB_MOD_HTTP);
}
tsModule[TSDB_MOD_MONITOR].enable = (tsEnableMonitorModule == 1);
tsModule[TSDB_MOD_MONITOR].name = "monitor";
tsModule[TSDB_MOD_MONITOR].initFp = monitorInitSystem;