diff options
author | Günther Deschner <gd@samba.org> | 2010-01-27 15:04:00 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-01-27 15:04:00 +0100 |
commit | 0e2d1cf9c4067dfce80a21ebf735d7d6a823d55e (patch) | |
tree | 4d4c835f71d5f38bf9cf34e15750ff05809ce16f /source4/torture | |
parent | 1ead83947fce60a74ca88460c2453d8e7e0f58c4 (diff) | |
download | samba-0e2d1cf9c4067dfce80a21ebf735d7d6a823d55e.tar.gz samba-0e2d1cf9c4067dfce80a21ebf735d7d6a823d55e.tar.bz2 samba-0e2d1cf9c4067dfce80a21ebf735d7d6a823d55e.zip |
s4-smbtorture: pick correct last packet while checking backchannel replies in RPC-SPOOLSS-NOTIFY.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/spoolss_notify.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c index e5e52d6b73..dac89500a5 100644 --- a/source4/torture/rpc/spoolss_notify.c +++ b/source4/torture/rpc/spoolss_notify.c @@ -354,12 +354,20 @@ static bool test_start_dcerpc_server(struct torture_context *tctx, return true; } +static struct received_packet *last_packet(struct received_packet *p) +{ + struct received_packet *tmp; + for (tmp = p; tmp->next; tmp = tmp->next) ;; + return tmp; +} + static bool test_RFFPCNEx(struct torture_context *tctx, struct dcerpc_pipe *p) { struct dcesrv_context *dce_ctx; struct policy_handle handle; const char *address; + struct received_packet *tmp; received_packets = NULL; @@ -372,8 +380,8 @@ static bool test_RFFPCNEx(struct torture_context *tctx, torture_assert_int_equal(tctx, received_packets->opnum, NDR_SPOOLSS_REPLYOPENPRINTER, "no ReplyOpenPrinter packet after RemoteFindFirstPrinterChangeNotifyEx"); torture_assert(tctx, test_ClosePrinter(tctx, p, &handle), ""); - torture_assert(tctx, received_packets, "no packets received"); - torture_assert_int_equal(tctx, received_packets->opnum, NDR_SPOOLSS_REPLYCLOSEPRINTER, + tmp = last_packet(received_packets); + torture_assert_int_equal(tctx, tmp->opnum, NDR_SPOOLSS_REPLYCLOSEPRINTER, "no ReplyClosePrinter packet after ClosePrinter"); /* Shut down DCE/RPC server */ |