diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-01-24 14:06:22 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-01-24 14:06:22 +0300 |
commit | eba5fbff749b84a3e1bcd1f849c3454417532454 (patch) | |
tree | 42b9da9b96fb26706f4c8486cd01821f83e318f3 /source3/rpcclient/cmd_spoolss.c | |
parent | c17c64530ec479334f88679ef780691e06ccd65a (diff) | |
parent | 9344628bef74ac759197601dc5dd44514b836e3e (diff) | |
download | samba-eba5fbff749b84a3e1bcd1f849c3454417532454.tar.gz samba-eba5fbff749b84a3e1bcd1f849c3454417532454.tar.bz2 samba-eba5fbff749b84a3e1bcd1f849c3454417532454.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into ctdb-merge
(This used to be commit 42d06d41bf2e9fb094f6064dc04f549d880b5f8d)
Diffstat (limited to 'source3/rpcclient/cmd_spoolss.c')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index a7969bddd1..d98cb99276 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; + /* 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. |