The Samba-Bugzilla – Attachment 867 Details for
Bug 2190
SWAT displays parameter values in unix charset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
a possible fix
samba-3.0.10-swat-utf8conv.patch (text/plain), 2.00 KB, created by
Shiro Yamada
on 2004-12-24 03:18:21 UTC
(
hide
)
Description:
a possible fix
Filename:
MIME Type:
Creator:
Shiro Yamada
Created:
2004-12-24 03:18:21 UTC
Size:
2.00 KB
patch
obsolete
>diff -uNr samba-3.0.10.org/source/web/swat.c samba-3.0.10/source/web/swat.c >--- samba-3.0.10.org/source/web/swat.c Tue Oct 26 06:05:04 2004 >+++ samba-3.0.10/source/web/swat.c Tue Dec 21 13:57:30 2004 >@@ -193,6 +193,7 @@ > { > int i; > void *ptr = parm->ptr; >+ char *utf8_s1, *utf8_s2; > > if (parm->class == P_LOCAL && snum >= 0) { > ptr = lp_local_ptr(snum, ptr); >@@ -214,10 +215,17 @@ > char **list = *(char ***)ptr; > for (;*list;list++) { > /* enclose in quotes if the string contains a space */ >- if ( strchr_m(*list, ' ') ) >- printf("\'%s\'%s", *list, ((*(list+1))?", ":"")); >- else >- printf("%s%s", *list, ((*(list+1))?", ":"")); >+ if ( strchr_m(*list, ' ') ) { >+ push_utf8_allocate(&utf8_s1, *list); >+ push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":"")); >+ printf("\'%s\'%s", utf8_s1, utf8_s2); >+ } else { >+ push_utf8_allocate(&utf8_s1, *list); >+ push_utf8_allocate(&utf8_s2, ((*(list+1))?", ":"")); >+ printf("%s%s", utf8_s1, utf8_s2); >+ } >+ SAFE_FREE(utf8_s1); >+ SAFE_FREE(utf8_s2); > } > } > printf("\">"); >@@ -238,16 +246,20 @@ > > case P_STRING: > case P_USTRING: >+ push_utf8_allocate(&utf8_s1, *(char **)ptr); > printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", >- make_parm_name(parm->label), *(char **)ptr); >+ make_parm_name(parm->label), utf8_s1); >+ SAFE_FREE(utf8_s1); > printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", > _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); > break; > > case P_GSTRING: > case P_UGSTRING: >+ push_utf8_allocate(&utf8_s1, (char *)ptr); > printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", >- make_parm_name(parm->label), (char *)ptr); >+ make_parm_name(parm->label), utf8_s1); >+ SAFE_FREE(utf8_s1); > printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">", > _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue))); > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2190
: 867