summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-17 00:27:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:56 -0500
commitc7a762bc748c63049d237de176167a13d1b8b0de (patch)
tree978b0fcbb1f1123afb2d2d96fb91732340f1ad1f /source4/scripting
parent71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4 (diff)
downloadsamba-c7a762bc748c63049d237de176167a13d1b8b0de.tar.gz
samba-c7a762bc748c63049d237de176167a13d1b8b0de.tar.bz2
samba-c7a762bc748c63049d237de176167a13d1b8b0de.zip
r3009: Fix up unmarshall functions to return Python dict instead of a NTSTATUS.
We can now unmarshall a single printer returned from an EnumPrinters. (This used to be commit 89da7a9196d40699881f12c9a5fe62301aafd4cf)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/swig/torture/spoolss.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/scripting/swig/torture/spoolss.py b/source4/scripting/swig/torture/spoolss.py
index e29178a0b6..d7a16917f9 100644
--- a/source4/scripting/swig/torture/spoolss.py
+++ b/source4/scripting/swig/torture/spoolss.py
@@ -6,11 +6,17 @@ def test_EnumPrinters(pipe):
r['flags'] = 0x02
r['server'] = None
r['level'] = 1
- r['buffer'] = 392 * '\x00'
- r['buf_size'] = 392
+ r['buffer'] = None
+ r['buf_size'] = 0
result = dcerpc.spoolss_EnumPrinters(pipe, r)
+ if result['result'] == dcerpc.WERR_INSUFFICIENT_BUFFER:
+ r['buffer'] = result['buf_size'] * '\x00'
+ r['buf_size'] = result['buf_size']
+
+ result = dcerpc.spoolss_EnumPrinters(pipe, r)
+
print dcerpc.unmarshall_spoolss_PrinterInfo1(result['buffer'])
def runtests(binding, domain, username, password):