Merge pull request #25100 from taosdata/feat/TD-29108-3.0
modify getGrantInfo buffer size
This commit is contained in:
commit
61dfa1abdf
|
@ -1152,7 +1152,7 @@ void shellSourceFile(const char *file) {
|
||||||
|
|
||||||
bool shellGetGrantInfo(char* buf) {
|
bool shellGetGrantInfo(char* buf) {
|
||||||
bool community = true;
|
bool community = true;
|
||||||
char sinfo[1024] = {0};
|
char sinfo[256] = {0};
|
||||||
tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo));
|
tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo));
|
||||||
strtok(sinfo, "\r\n");
|
strtok(sinfo, "\r\n");
|
||||||
|
|
||||||
|
@ -1368,7 +1368,7 @@ int32_t shellExecute() {
|
||||||
#ifdef WEBSOCKET
|
#ifdef WEBSOCKET
|
||||||
if (!shell.args.restful && !shell.args.cloud) {
|
if (!shell.args.restful && !shell.args.cloud) {
|
||||||
#endif
|
#endif
|
||||||
char buf[512] = "";
|
char* buf = taosMemoryMalloc(512);
|
||||||
bool community = shellGetGrantInfo(buf);
|
bool community = shellGetGrantInfo(buf);
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
printfIntroduction(community);
|
printfIntroduction(community);
|
||||||
|
@ -1383,6 +1383,7 @@ bool community = shellGetGrantInfo(buf);
|
||||||
if(!community) {
|
if(!community) {
|
||||||
printf("%s\n", buf);
|
printf("%s\n", buf);
|
||||||
}
|
}
|
||||||
|
taosMemoryFree(buf);
|
||||||
|
|
||||||
#ifdef WEBSOCKET
|
#ifdef WEBSOCKET
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue