summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-03 12:50:19 +1000
committerAndrew Tridgell <tridge@samba.org>2009-09-03 18:36:08 +1000
commit642a84c12927176726c24f5d709a3479c36bd7e3 (patch)
tree977442078da351ef0bfdc5876766253e4296266d /librpc
parent127bf61a4006c60a70b0e43b61c60e532990d3b8 (diff)
downloadsamba-642a84c12927176726c24f5d709a3479c36bd7e3.tar.gz
samba-642a84c12927176726c24f5d709a3479c36bd7e3.tar.bz2
samba-642a84c12927176726c24f5d709a3479c36bd7e3.zip
fix the ndr print routines for samba4
This uses a hackish #if just for samba4. The proper fix is much more complex.
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index 7d4a2bc09c..837690b484 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -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: