summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-12 05:40:26 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-12 05:40:26 +0000
commitfcd86aa59ea11e9113938da623ca8e3e17612cac (patch)
tree2d4f7f73ce1060de717bf8e724f48969c4b9edf7 /source4/rpc_server
parent9d8ef74eac5c4f77602d3da76ffdb0526b060c74 (diff)
downloadsamba-fcd86aa59ea11e9113938da623ca8e3e17612cac.tar.gz
samba-fcd86aa59ea11e9113938da623ca8e3e17612cac.tar.bz2
samba-fcd86aa59ea11e9113938da623ca8e3e17612cac.zip
added the echo pipe test calls
(This used to be commit 8ad47eff4971e86763f9bd8f298e07d3de7e1089)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/rpc_echo.c47
1 files changed, 45 insertions, 2 deletions
diff --git a/source4/rpc_server/rpc_echo.c b/source4/rpc_server/rpc_echo.c
index 37e7dd5bb8..42856737c4 100644
--- a/source4/rpc_server/rpc_echo.c
+++ b/source4/rpc_server/rpc_echo.c
@@ -57,12 +57,55 @@ static NTSTATUS echo_SourceData(struct dcesrv_state *dce, TALLOC_CTX *mem_ctx, s
static NTSTATUS echo_TestCall(struct dcesrv_state *dce, TALLOC_CTX *mem_ctx, struct TestCall *r)
{
- return NT_STATUS_BAD_NETWORK_NAME;
+ r->out.s2 = "this is a test string";
+
+ return NT_STATUS_OK;
}
static NTSTATUS echo_TestCall2(struct dcesrv_state *dce, TALLOC_CTX *mem_ctx, struct TestCall2 *r)
{
- return NT_STATUS_BAD_NETWORK_NAME;
+ r->out.info = talloc(mem_ctx, sizeof(*r->out.info));
+ if (!r->out.info) {
+ r->out.result = NT_STATUS_NO_MEMORY;
+ return NT_STATUS_OK;
+ }
+
+ r->out.result = NT_STATUS_OK;
+
+ switch (r->in.level) {
+ case 1:
+ r->out.info->info1.v = 10;
+ break;
+ case 2:
+ r->out.info->info2.v = 20;
+ break;
+ case 3:
+ r->out.info->info3.v = 30;
+ break;
+ case 4:
+ r->out.info->info4.v.low = 40;
+ r->out.info->info4.v.high = 0;
+ break;
+ case 5:
+ r->out.info->info5.v1 = 50;
+ r->out.info->info5.v2.low = 60;
+ r->out.info->info5.v2.high = 0;
+ break;
+ case 6:
+ r->out.info->info6.v1 = 70;
+ r->out.info->info6.info1.v= 80;
+ break;
+ case 7:
+ r->out.info->info7.v1 = 80;
+ r->out.info->info7.info4.v.low = 90;
+ r->out.info->info7.info4.v.high = 0;
+ break;
+ default:
+ r->out.result = NT_STATUS_INVALID_LEVEL;
+ break;
+ }
+
+ return NT_STATUS_OK;
}