diff options
author | Karolin Seeger <kseeger@samba.org> | 2008-02-29 10:44:38 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-02-29 10:44:38 +0100 |
commit | c4fbe2846231a6b322c1094c6a1dbf93b7305768 (patch) | |
tree | 09eb77a294f4acda131b41fe4c9bec4ed175eb16 /source3/rpcclient/cmd_spoolss.c | |
parent | 1a6415fc77c708b87c8e2ce6e7828f486ffc87ac (diff) | |
parent | 695b6662abe64a40061bfa05ede12173fc4b1945 (diff) | |
download | samba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.tar.gz samba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.tar.bz2 samba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.zip |
Merge commit 'origin/v3-2-test' into v3-2-stable
Conflicts:
WHATSNEW.txt
(This used to be commit a390bcf9403df4cf4d5eef42b35ebccbe253882e)
Diffstat (limited to 'source3/rpcclient/cmd_spoolss.c')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index a7969bddd1..e923302f4e 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1222,9 +1222,10 @@ void set_drv_info_3_env (DRIVER_INFO_3 *info, const char *arch) static char* get_driver_3_param (char* str, const char* delim, UNISTR* dest) { char *ptr; + char *saveptr; /* get the next token */ - ptr = strtok(str, delim); + ptr = strtok_r(str, delim, &saveptr); /* a string of 'NULL' is used to represent an empty parameter because two consecutive delimiters @@ -1251,7 +1252,8 @@ static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info, { char *str, *str2; uint32 len, i; - + char *saveptr = NULL; + /* fill in the UNISTR fields */ str = get_driver_3_param (args, ":", &info->name); str = get_driver_3_param (NULL, ":", &info->driverpath); @@ -1266,13 +1268,13 @@ static bool init_drv_info_3_members ( TALLOC_CTX *mem_ctx, DRIVER_INFO_3 *info, str = str2; /* begin to strip out each filename */ - str = strtok(str, ","); + str = strtok_r(str, ",", &saveptr); len = 0; while (str != NULL) { /* keep a cumlative count of the str lengths */ len += strlen(str)+1; - str = strtok(NULL, ","); + str = strtok_r(NULL, ",", &saveptr); } /* allocate the space; add one extra slot for a terminating NULL. @@ -1481,7 +1483,7 @@ static WERROR cmd_spoolss_setdriver(struct rpc_pipe_client *cli, goto done;; } - printf("Succesfully set %s to driver %s.\n", argv[1], argv[2]); + printf("Successfully set %s to driver %s.\n", argv[1], argv[2]); done: /* Cleanup */ |