From 8843eea2e06736f27080eedab883ffc51feacb33 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 16 Jun 2010 11:03:31 +0200 Subject: s4-smbtorture: only pull info when status code indicates success in smbcli_rap_netprintqgetinfo(). Guenther --- source4/torture/rap/rap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/torture/rap') diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c index 33d67156a3..34036f0ae7 100644 --- a/source4/torture/rap/rap.c +++ b/source4/torture/rap/rap.c @@ -719,10 +719,12 @@ NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree, NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.convert)); NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.available)); - call->ndr_pull_data->relative_rap_convert = r->out.convert; + if (r->out.status == 0) { + call->ndr_pull_data->relative_rap_convert = r->out.convert; - NDR_GOTO(ndr_pull_set_switch_value(call->ndr_pull_data, &r->out.info, r->in.level)); - NDR_GOTO(ndr_pull_rap_printq_info(call->ndr_pull_data, NDR_SCALARS|NDR_BUFFERS, &r->out.info)); + NDR_GOTO(ndr_pull_set_switch_value(call->ndr_pull_data, &r->out.info, r->in.level)); + NDR_GOTO(ndr_pull_rap_printq_info(call->ndr_pull_data, NDR_SCALARS|NDR_BUFFERS, &r->out.info)); + } if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(rap_NetPrintQGetInfo, r); -- cgit