svn commit: samba r3506 - in
branches/SAMBA_4_0/source/scripting/swig/torture: .
tpot at samba.org
tpot at samba.org
Wed Nov 3 06:29:23 GMT 2004
Author: tpot
Date: 2004-11-03 06:29:22 +0000 (Wed, 03 Nov 2004)
New Revision: 3506
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3506
Log:
Test EnumPorts function.
Modified:
branches/SAMBA_4_0/source/scripting/swig/torture/spoolss.py
Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/torture/spoolss.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/spoolss.py 2004-11-03 06:12:42 UTC (rev 3505)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/spoolss.py 2004-11-03 06:29:22 UTC (rev 3506)
@@ -104,15 +104,22 @@
print 'spoolss_EnumPorts()'
- r = {}
- r['handle'] = handle
- r['level'] = 1
- r['buffer'] = None
- r['buf_size'] = 0
+ for level in [1, 2]:
- result = ResizeBufferCall(dcerpc.spoolss_EnumPorts, pipe, r)
+ r = {}
+ r['handle'] = handle
+ r['servername'] = None
+ r['level'] = level
+ result = ResizeBufferCall(dcerpc.spoolss_EnumPorts, pipe, r)
+ ports = dcerpc.unmarshall_spoolss_PortInfo_array(
+ result['buffer'], r['level'], result['count'])
+
+ if level == 1:
+ port_names = map(lambda x: x['info1']['port_name'], ports)
+
+
def test_DeleteForm(pipe, handle, formname):
r = {}
@@ -377,6 +384,7 @@
handle = test_OpenPrinterEx(pipe, printername)
test_GetPrinter(pipe, handle)
+ test_EnumPorts(pipe, handle)
test_EnumForms(pipe, handle)
test_AddForm(pipe, handle)
test_EnumJobs(pipe, handle)
More information about the samba-cvs
mailing list