summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-15 20:07:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:47 -0500
commitd9b4bdd5bb32806162514f7e010a97d24fb94549 (patch)
treed72ab8f87bf4235dcb60450980e4db839fab9a62
parentdb0fdcf6ce8b3d02a5f720652f22a2b7167c5e26 (diff)
downloadsamba-d9b4bdd5bb32806162514f7e010a97d24fb94549.tar.gz
samba-d9b4bdd5bb32806162514f7e010a97d24fb94549.tar.bz2
samba-d9b4bdd5bb32806162514f7e010a97d24fb94549.zip
r18565: Fix echo.idl to be Samba3-, MIDL and midlc compatible
(This used to be commit ab0a798c57564901f0adcd8aedc1ef0928e79edd)
-rw-r--r--source4/librpc/config.mk10
-rw-r--r--source4/librpc/idl/echo.idl2
-rw-r--r--source4/pidl/TODO3
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm4
-rw-r--r--source4/rpc_server/echo/rpc_echo.c2
-rw-r--r--source4/torture/rpc/echo.c7
6 files changed, 21 insertions, 7 deletions
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index b1c45e47da..a1bac05e01 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -618,11 +618,11 @@ PRIVATE_DEPENDENCIES = \
# End SUBSYSTEM dcerpc
################################################
-[MODULE::RPC_EJS_ECHO]
-INIT_FUNCTION = ejs_init_rpcecho
-OBJ_FILES = gen_ndr/ndr_echo_ejs.o
-SUBSYSTEM = smbcalls
-PUBLIC_DEPENDENCIES = dcerpc NDR_ECHO EJSRPC
+#[MODULE::RPC_EJS_ECHO]
+#INIT_FUNCTION = ejs_init_rpcecho
+#OBJ_FILES = gen_ndr/ndr_echo_ejs.o
+#SUBSYSTEM = smbcalls
+#PUBLIC_DEPENDENCIES = dcerpc NDR_ECHO EJSRPC
[MODULE::RPC_EJS_MISC]
INIT_FUNCTION = ejs_init_misc
diff --git a/source4/librpc/idl/echo.idl b/source4/librpc/idl/echo.idl
index cda29685a1..80123f9922 100644
--- a/source4/librpc/idl/echo.idl
+++ b/source4/librpc/idl/echo.idl
@@ -34,7 +34,7 @@ interface rpcecho
/* test strings */
void echo_TestCall (
[in,string,charset(UTF16)] uint16 *s1,
- [out,string,charset(UTF16)] uint16 *s2
+ [out,string,charset(UTF16)] uint16 **s2
);
diff --git a/source4/pidl/TODO b/source4/pidl/TODO
index e51c205f91..5b3610232c 100644
--- a/source4/pidl/TODO
+++ b/source4/pidl/TODO
@@ -1,3 +1,6 @@
+- EJS output backend shouldn't use the NDR levels stuff but instead
+ as the "C levels" and NDR levels don't necessarily match.
+
- warn about [out] attributes on pointers (midl/samba3 compatibility)
- true multiple dimension array / strings in arrays support
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 9e4388e28d..bbcc9f884e 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -7,6 +7,10 @@
package Parse::Pidl::Samba4::NDR::Parser;
+require Exporter;
+@ISA = qw(Exporter);
+@EXPORT = qw(is_charset_array);
+
use strict;
use Parse::Pidl::Typelist qw(hasType getType mapType);
use Parse::Pidl::Util qw(has_property ParseExpr print_uuid);
diff --git a/source4/rpc_server/echo/rpc_echo.c b/source4/rpc_server/echo/rpc_echo.c
index d7d7ef31c2..3de24fb366 100644
--- a/source4/rpc_server/echo/rpc_echo.c
+++ b/source4/rpc_server/echo/rpc_echo.c
@@ -68,7 +68,7 @@ static NTSTATUS echo_SourceData(struct dcesrv_call_state *dce_call, TALLOC_CTX *
static NTSTATUS echo_TestCall(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_TestCall *r)
{
- r->out.s2 = talloc_strdup(mem_ctx, "this is a test string");
+ *r->out.s2 = talloc_strdup(mem_ctx, "this is a test string");
return NT_STATUS_OK;
}
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 5752b90ccf..02f255e5f8 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -209,8 +209,10 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct echo_TestCall r;
+ char *s = NULL;
r.in.s1 = "input string";
+ r.out.s2 = &s;
printf("\nTesting TestCall\n");
status = dcerpc_echo_TestCall(p, mem_ctx, &r);
@@ -219,6 +221,11 @@ static BOOL test_testcall(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return False;
}
+ if (!strcmp(s, "input string")) {
+ printf("Didn't receive back same string\n");
+ return False;
+ }
+
return True;
}