diff options
author | Gerald Carter <jerry@samba.org> | 2001-05-31 18:03:45 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2001-05-31 18:03:45 +0000 |
commit | e30a3be954c0eacb3ccffdaa1165a9f0e8b93a23 (patch) | |
tree | ef4a6660d00f85c3358d3a3c84eabaca08f44b4d /source/rpcclient | |
parent | 7e23ed48908cf396610d26efda9f54d5f5f0e83c (diff) | |
download | samba-e30a3be954c0eacb3ccffdaa1165a9f0e8b93a23.tar.gz samba-e30a3be954c0eacb3ccffdaa1165a9f0e8b93a23.tar.xz samba-e30a3be954c0eacb3ccffdaa1165a9f0e8b93a23.zip |
merge from 2.2
Diffstat (limited to 'source/rpcclient')
-rw-r--r-- | source/rpcclient/rpcclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 67077216513..53d5b40698c 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -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) { |