1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

fix the ndr print routines for samba4

This uses a hackish #if just for samba4. The proper fix is much more
complex.
This commit is contained in:
Andrew Tridgell 2009-09-03 12:50:19 +10:00
parent 127bf61a40
commit 642a84c129

View File

@ -255,7 +255,14 @@ _PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char *name
ndr->print = ndr_print_debug_helper;
ndr->depth = 1;
ndr->flags = 0;
/* this is a s4 hack until we build up the courage to pass
* this all the way down
*/
#if _SAMBA_BUILD_ == 4
ndr->iconv_convenience = smb_iconv_convenience_init(talloc_autofree_context(), "ASCII", "UTF-8", true);
#endif
fn(ndr, name, flags, ptr);
talloc_free(ndr);
}
@ -277,6 +284,14 @@ _PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, c
ndr->print = ndr_print_string_helper;
ndr->depth = 1;
ndr->flags = 0;
/* this is a s4 hack until we build up the courage to pass
* this all the way down
*/
#if _SAMBA_BUILD_ == 4
ndr->iconv_convenience = smb_iconv_convenience_init(talloc_autofree_context(), "ASCII", "UTF-8", true);
#endif
fn(ndr, name, ptr);
ret = talloc_steal(mem_ctx, (char *)ndr->private_data);
failed: