Commit fc967bab authored by Laurent THOMAS's avatar Laurent THOMAS

Merge branch 'sim-channels' of gitlab.eurecom.fr:oai/openairinterface5g into sim-channels

parents 364ea768 1a93c759
......@@ -461,12 +461,12 @@ int process_command(char *buf) {
int i,j,k;
char modulename[TELNET_CMD_MAXSIZE];
char cmd[TELNET_CMD_MAXSIZE];
char cmdb[TELNET_MAX_MSGLENGTH];
char *cmdb=NULL;
char *bufbck;
int rt;
memset(modulename,0,sizeof(modulename));
memset(cmd,0,sizeof(cmd));
memset(cmdb,0,sizeof(cmdb));
if (strncasecmp(buf,"ex",2) == 0)
return CMDSTATUS_EXIT;
......@@ -490,12 +490,10 @@ int process_command(char *buf) {
return CMDSTATUS_FOUND;
}
memset(modulename,0,sizeof(modulename));
memset(cmd,0,sizeof(cmd));
memset(cmdb,0,sizeof(cmdb));
bufbck=strdup(buf);
rt=CMDSTATUS_NOTFOUND;
j = sscanf(buf,"%19s %19s %[^\t\n]",modulename,cmd,cmdb);
j = sscanf(buf,"%19s %19s %m[^\t\n]",modulename,cmd,&cmdb);
if (telnetparams.telnetdbg > 0)
printf("process_command: %i words, module=%s cmd=%s, parameters= %s\n",j,modulename,cmd,cmdb);
......@@ -562,7 +560,7 @@ int process_command(char *buf) {
rt= CMDSTATUS_FOUND;
} /* loop */
} /* for i */
free(cmdb);
free(bufbck);
return rt;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment