mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r18565: Fix echo.idl to be Samba3-, MIDL and midlc compatible
(This used to be commit ab0a798c57
)
This commit is contained in:
parent
db0fdcf6ce
commit
d9b4bdd5bb
@ -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
|
||||
|
@ -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
|
||||
);
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user