diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
commit | 20796bcf57a7f5e1921dc12e0568221f985fe4f2 (patch) | |
tree | 8f0540a602a9ea0031d656bc31c0b8bc1e91eb70 /source3/web/swat.c | |
parent | 323be4a6907e4915bb76aa103bf5b868f0b459b1 (diff) | |
parent | 1a416ff13ca7786f2e8d24c66addf00883e9cb12 (diff) | |
download | samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.gz samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.bz2 samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.zip |
Merge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into docbook
Conflicts:
source/Makefile.in
(This used to be commit 01987778a123f853fccdcb7fe9566143e2d7c490)
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r-- | source3/web/swat.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 6d8f4cae06..3e14d2d098 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -228,6 +228,7 @@ static void show_parameter(int snum, struct parm_struct *parm) int i; void *ptr = parm->ptr; char *utf8_s1, *utf8_s2; + size_t converted_size; TALLOC_CTX *ctx = talloc_stackframe(); if (parm->p_class == P_LOCAL && snum >= 0) { @@ -252,12 +253,12 @@ static void show_parameter(int snum, struct parm_struct *parm) for (;*list;list++) { /* enclose in HTML encoded quotes if the string contains a space */ if ( strchr_m(*list, ' ') ) { - push_utf8_allocate(&utf8_s1, *list); - push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":"")); + push_utf8_allocate(&utf8_s1, *list, &converted_size); + push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""), &converted_size); printf(""%s"%s", utf8_s1, utf8_s2); } else { - push_utf8_allocate(&utf8_s1, *list); - push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":"")); + push_utf8_allocate(&utf8_s1, *list, &converted_size); + push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":""), &converted_size); printf("%s%s", utf8_s1, utf8_s2); } SAFE_FREE(utf8_s1); @@ -282,7 +283,7 @@ static void show_parameter(int snum, struct parm_struct *parm) case P_STRING: case P_USTRING: - push_utf8_allocate(&utf8_s1, *(char **)ptr); + push_utf8_allocate(&utf8_s1, *(char **)ptr, &converted_size); printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", make_parm_name(parm->label), fix_quotes(ctx, utf8_s1)); SAFE_FREE(utf8_s1); @@ -897,6 +898,7 @@ static void shares_page(void) int i; int mode = 0; unsigned int parm_filter = FLAG_BASIC; + size_t converted_size; if (share) snum = lp_servicenumber(share); @@ -951,7 +953,7 @@ static void shares_page(void) for (i=0;i<lp_numservices();i++) { s = lp_servicename(i); if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) { - push_utf8_allocate(&utf8_s, s); + push_utf8_allocate(&utf8_s, s, &converted_size); printf("<option %s value=\"%s\">%s\n", (share && strcmp(share,s)==0)?"SELECTED":"", utf8_s, utf8_s); |