summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-15 20:50:06 -0400
committerSimo Sorce <idra@samba.org>2010-07-15 20:50:06 -0400
commit2f249538ac8f2a54d9c8f8dbf0107db2f33bfe16 (patch)
tree00eb61080648488e0d4d5e370f4d30827f4e9228 /pidl/lib/Parse
parent0ab8e8be62bcbb1f6441f745736fcee7cbd559eb (diff)
parent5f8678f34be57ccbbf9d9c93ee34b1d8f09c75c4 (diff)
downloadsamba-2f249538ac8f2a54d9c8f8dbf0107db2f33bfe16.tar.gz
samba-2f249538ac8f2a54d9c8f8dbf0107db2f33bfe16.tar.bz2
samba-2f249538ac8f2a54d9c8f8dbf0107db2f33bfe16.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm15
1 files changed, 3 insertions, 12 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index a25d12bfea..0ea43e48ad 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -145,7 +145,6 @@ sub ParseFunction($$)
pidl "struct ndr_pull *pull;";
pidl "struct ndr_push *push;";
pidl "enum ndr_err_code ndr_err;";
- pidl "DATA_BLOB blob;";
pidl "struct $fn->{NAME} *r;";
pidl "";
pidl "call = &ndr_table_$if->{NAME}.calls[$op];";
@@ -155,12 +154,7 @@ sub ParseFunction($$)
pidl "\treturn false;";
pidl "}";
pidl "";
- pidl "if (!prs_data_blob(&p->in_data.data, &blob, r)) {";
- pidl "\ttalloc_free(r);";
- pidl "\treturn false;";
- pidl "}";
- pidl "";
- pidl "pull = ndr_pull_init_blob(&blob, r);";
+ pidl "pull = ndr_pull_init_blob(&p->in_data.data, r);";
pidl "if (pull == NULL) {";
pidl "\ttalloc_free(r);";
pidl "\treturn false;";
@@ -211,11 +205,8 @@ sub ParseFunction($$)
pidl "\treturn false;";
pidl "}";
pidl "";
- pidl "blob = ndr_push_blob(push);";
- pidl "if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {";
- pidl "\ttalloc_free(r);";
- pidl "\treturn false;";
- pidl "}";
+ pidl "p->out_data.rdata = ndr_push_blob(push);";
+ pidl "talloc_steal(p->mem_ctx, p->out_data.rdata.data);";
pidl "";
pidl "talloc_free(r);";
pidl "";