fix: last modify information
This commit is contained in:
parent
987e0b845f
commit
cca0bf6af0
|
@ -39,7 +39,7 @@ void shellAutoExit();
|
|||
void callbackAutoTab(char* sqlstr, TAOS* pSql, bool usedb);
|
||||
|
||||
// introduction
|
||||
void printfIntroduction();
|
||||
void printfIntroduction(bool community);
|
||||
|
||||
// show enterprise AD at start or end
|
||||
void showAD(bool end);
|
||||
|
|
|
@ -421,21 +421,20 @@ void printfIntroduction(bool community) {
|
|||
printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n");
|
||||
printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n");
|
||||
if(community) {
|
||||
printf(" * ----------------------------------------------------------------------------- *\n");
|
||||
printf(" * You are using TDengine OSS. To experience more advanced TDengine features and *\n");
|
||||
printf(" * receive professional technical support, try TDengine Enterprise: *\n");
|
||||
printf(" * http://www.tdengine.com *\n");
|
||||
printf(" * ---------------------------------------------------------------------------------- *\n");
|
||||
printf(" * You are using TDengine OSS. To experience more advanced features and receive *\n");
|
||||
printf(" * professional technical support, try TDengine Enterprise or Cloud, *\n");
|
||||
printf(" * learn more at https://tdengine.com *\n");
|
||||
}
|
||||
printf(" **************************************************************************************\n\n");
|
||||
}
|
||||
|
||||
// show enterprise AD
|
||||
void showAD(bool end) {
|
||||
printf("\n");
|
||||
printf(" You are using TDengine OSS. To experience more advanced TDengine features and \n");
|
||||
printf(" receive professional technical support, try TDengine Enterprise: \n");
|
||||
printf(" http://www.tdengine.com \n");
|
||||
printf("\n");
|
||||
printf(" You are using TDengine OSS. To experience more advanced features and receive \n");
|
||||
printf(" professional technical support, try TDengine Enterprise or Cloud, \n");
|
||||
printf(" learn more at https://tdengine.com \n");
|
||||
printf(" \n");
|
||||
}
|
||||
|
||||
void showHelp() {
|
||||
|
|
|
@ -1150,7 +1150,7 @@ void shellSourceFile(const char *file) {
|
|||
taosCloseFile(&pFile);
|
||||
}
|
||||
|
||||
bool shellGetGrantInfo() {
|
||||
bool shellGetGrantInfo(char* buf) {
|
||||
bool community = true;
|
||||
char sinfo[1024] = {0};
|
||||
tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo));
|
||||
|
@ -1198,10 +1198,10 @@ bool shellGetGrantInfo() {
|
|||
community = true;
|
||||
} else if (strcmp(expiretime, "unlimited") == 0) {
|
||||
community = false;
|
||||
fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo);
|
||||
fprintf(buf, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo);
|
||||
} else {
|
||||
community = false;
|
||||
fprintf(stdout, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo,
|
||||
fprintf(buf, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo,
|
||||
expiretime);
|
||||
}
|
||||
|
||||
|
@ -1368,7 +1368,8 @@ int32_t shellExecute() {
|
|||
#ifdef WEBSOCKET
|
||||
if (!shell.args.restful && !shell.args.cloud) {
|
||||
#endif
|
||||
bool community = shellGetGrantInfo();
|
||||
char buf[512] = "";
|
||||
bool community = shellGetGrantInfo(buf);
|
||||
#ifndef WINDOWS
|
||||
printfIntroduction(community);
|
||||
#else
|
||||
|
@ -1376,6 +1377,10 @@ bool community = shellGetGrantInfo();
|
|||
showAD(false)
|
||||
}
|
||||
#endif
|
||||
// printf version
|
||||
if(!community) {
|
||||
printf(buf);
|
||||
}
|
||||
|
||||
#ifdef WEBSOCKET
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue