未验证 提交 8b8ca3f2 编写于 作者: wafwerar's avatar wafwerar 提交者: GitHub

Merge pull request #11433 from taosdata/fix/ZhiqiangWang/TD-13254-fix-grant-feature

fix: grant feature.
cmake_minimum_required(VERSION 3.16)
if (NOT DEFINED TD_GRANT)
SET(TD_GRANT FALSE)
endif()
if (NOT DEFINED TD_USB_DONGLE)
SET(TD_USB_DONGLE FALSE)
endif()
IF (TD_GRANT)
ADD_DEFINITIONS(-D_GRANT)
ENDIF ()
IF ("${BUILD_TOOLS}" STREQUAL "")
IF (TD_LINUX)
IF (TD_ARM_32)
......
......@@ -23,6 +23,14 @@ target_include_directories(
)
target_link_libraries(taosd dnode)
IF (TD_GRANT)
TARGET_LINK_LIBRARIES(taosd grant)
ENDIF ()
IF (TD_USB_DONGLE)
TARGET_LINK_LIBRARIES(taosd usb_dongle)
else()
ENDIF ()
if(${BUILD_TEST})
add_subdirectory(test)
endif(${BUILD_TEST})
......@@ -16,6 +16,7 @@
#define _DEFAULT_SOURCE
#include "dndInt.h"
#include "tconfig.h"
#include "tgrant.h"
static struct {
bool dumpConfig;
......@@ -90,8 +91,7 @@ static int32_t dndParseArgs(int32_t argc, char const *argv[]) {
}
static void dndGenerateGrant() {
// grantParseParameter();
printf("this feature is not implemented yet\n");
grantParseParameter();
}
static void dndPrintVersion() {
......
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _DEFAULT_SOURCE
#ifndef _GRANT
#include "os.h"
#include "taoserror.h"
#include "tgrant.h"
#include "mndInt.h"
int32_t grantInit() { return TSDB_CODE_SUCCESS; }
void grantCleanUp() {}
void grantParseParameter() { mError("can't parsed parameter k"); }
int32_t grantCheck(EGrantType grant) { return TSDB_CODE_SUCCESS; }
void grantReset(EGrantType grant, uint64_t value) {}
void grantAdd(EGrantType grant, uint64_t value) {}
void grantRestore(EGrantType grant, uint64_t value) {}
#endif
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册