summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-29 16:33:47 +0100
committerGünther Deschner <gd@samba.org>2008-10-31 02:44:32 +0100
commitd2cc4e63c570633c387f72cb977e3adcfc3a7ce8 (patch)
tree83d8886c933899a11a4e4a64e3e9b6a4dac27f6e /source4/torture/rpc
parent8859e9a9042d94e73257137ae57b55ef418590cb (diff)
downloadsamba-d2cc4e63c570633c387f72cb977e3adcfc3a7ce8.tar.gz
samba-d2cc4e63c570633c387f72cb977e3adcfc3a7ce8.tar.bz2
samba-d2cc4e63c570633c387f72cb977e3adcfc3a7ce8.zip
s4-srvsvc: merge srvsvc_NetTransportEnum from s3 idl.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/srvsvc.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 3e584aaba5..a6536faec7 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -826,21 +826,36 @@ static bool test_NetTransportEnum(struct torture_context *tctx,
{
NTSTATUS status;
struct srvsvc_NetTransportEnum r;
- struct srvsvc_NetTransportCtr0 c0;
+ struct srvsvc_NetTransportInfoCtr transports;
+ struct srvsvc_NetTransportCtr0 ctr0;
+ struct srvsvc_NetTransportCtr1 ctr1;
+
+ uint32_t totalentries = 0;
uint32_t levels[] = {0, 1};
int i;
+ ZERO_STRUCT(transports);
+
r.in.server_unc = talloc_asprintf(tctx,"\\\\%s", dcerpc_server_name(p));
- r.in.transports.ctr0 = &c0;
- r.in.transports.ctr0->count = 0;
- r.in.transports.ctr0->array = NULL;
+ r.in.transports = &transports;
r.in.max_buffer = (uint32_t)-1;
r.in.resume_handle = NULL;
+ r.out.totalentries = &totalentries;
+ r.out.transports = &transports;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- ZERO_STRUCT(r.out);
- r.in.level = levels[i];
- torture_comment(tctx, "testing NetTransportEnum level %u\n", r.in.level);
+ transports.level = levels[i];
+ switch (transports.level) {
+ case 0:
+ ZERO_STRUCT(ctr0);
+ transports.ctr.ctr0 = &ctr0;
+ break;
+ case 1:
+ ZERO_STRUCT(ctr1);
+ transports.ctr.ctr1 = &ctr1;
+ break;
+ }
+ torture_comment(tctx, "testing NetTransportEnum level %u\n", transports.level);
status = dcerpc_srvsvc_NetTransportEnum(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "NetTransportEnum failed");
if (!W_ERROR_IS_OK(r.out.result)) {