mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
merge from 2.2
This commit is contained in:
parent
7e23ed4890
commit
e30a3be954
@ -401,6 +401,7 @@ static uint32 process_cmd(struct cli_state *cli, char *cmd)
|
||||
pstring buf;
|
||||
char *p = cmd;
|
||||
uint32 result=0;
|
||||
int len = 0;
|
||||
|
||||
if (cmd[strlen(cmd) - 1] == '\n')
|
||||
cmd[strlen(cmd) - 1] = '\0';
|
||||
@ -409,6 +410,11 @@ static uint32 process_cmd(struct cli_state *cli, char *cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* strip the trainly \n if it exsists */
|
||||
len = strlen(buf);
|
||||
if (buf[len-1] == '\n')
|
||||
buf[len-1] = '\0';
|
||||
|
||||
/* Search for matching commands */
|
||||
|
||||
for (temp_list = cmd_list; temp_list; temp_list = temp_list->next) {
|
||||
|
Loading…
Reference in New Issue
Block a user