svn commit: samba r18565 - in branches/SAMBA_4_0/source: librpc librpc/idl pidl pidl/lib/Parse/Pidl/Samba4/NDR rpc_server/echo torture/rpc

jelmer at samba.org jelmer at samba.org
Fri Sep 15 20:07:56 GMT 2006


Author: jelmer
Date: 2006-09-15 20:07:55 +0000 (Fri, 15 Sep 2006)
New Revision: 18565

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18565

Log:
Fix echo.idl to be Samba3-, MIDL and midlc compatible

Modified:
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/librpc/idl/echo.idl
   branches/SAMBA_4_0/source/pidl/TODO
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c
   branches/SAMBA_4_0/source/torture/rpc/echo.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/config.mk
===================================================================
--- branches/SAMBA_4_0/source/librpc/config.mk	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/librpc/config.mk	2006-09-15 20:07:55 UTC (rev 18565)
@@ -618,11 +618,11 @@
 # 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

Modified: branches/SAMBA_4_0/source/librpc/idl/echo.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/echo.idl	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/librpc/idl/echo.idl	2006-09-15 20:07:55 UTC (rev 18565)
@@ -34,7 +34,7 @@
 	/* test strings */
  	void echo_TestCall (
 		[in,string,charset(UTF16)]       uint16 *s1,
-		[out,string,charset(UTF16)]      uint16 *s2
+		[out,string,charset(UTF16)]      uint16 **s2
  		);
 
 

Modified: branches/SAMBA_4_0/source/pidl/TODO
===================================================================
--- branches/SAMBA_4_0/source/pidl/TODO	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/pidl/TODO	2006-09-15 20:07:55 UTC (rev 18565)
@@ -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

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm	2006-09-15 20:07:55 UTC (rev 18565)
@@ -7,6 +7,10 @@
 
 package Parse::Pidl::Samba4::NDR::Parser;
 
+require Exporter;
+ at ISA = qw(Exporter);
+ at 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);

Modified: branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c	2006-09-15 20:07:55 UTC (rev 18565)
@@ -68,7 +68,7 @@
 
 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;
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/echo.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/echo.c	2006-09-15 19:24:38 UTC (rev 18564)
+++ branches/SAMBA_4_0/source/torture/rpc/echo.c	2006-09-15 20:07:55 UTC (rev 18565)
@@ -209,8 +209,10 @@
 {
 	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 @@
 		return False;
 	}
 
+	if (!strcmp(s, "input string")) {
+		printf("Didn't receive back same string\n");
+		return False;
+	}
+
 	return True;
 }
 



More information about the samba-cvs mailing list