svn commit: samba r4966 - in branches/SAMBA_3_0/source/rpcclient: .
jerry at samba.org
jerry at samba.org
Mon Jan 24 18:42:34 GMT 2005
Author: jerry
Date: 2005-01-24 18:42:33 +0000 (Mon, 24 Jan 2005)
New Revision: 4966
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4966
Log:
don't enumerate the drivers for the same architecture string more than once
Modified:
branches/SAMBA_3_0/source/rpcclient/cmd_spoolss.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/cmd_spoolss.c
===================================================================
--- branches/SAMBA_3_0/source/rpcclient/cmd_spoolss.c 2005-01-24 17:42:19 UTC (rev 4965)
+++ branches/SAMBA_3_0/source/rpcclient/cmd_spoolss.c 2005-01-24 18:42:33 UTC (rev 4966)
@@ -31,6 +31,13 @@
int version;
};
+/* The version int is used by getdrivers. Note that
+ all architecture strings that support mutliple
+ versions must be grouped together since enumdrivers
+ uses this property to prevent issuing multiple
+ enumdriver calls for the same arch */
+
+
static const struct table_node archi_table[]= {
{"Windows 4.0", "WIN40", 0 },
@@ -1134,6 +1141,11 @@
{
uint32 needed;
+ /* check to see if we already asked for this architecture string */
+
+ if ( i>0 && strequal(archi_table[i].long_archi, archi_table[i-1].long_archi) )
+ continue;
+
werror = cli_spoolss_enumprinterdrivers(
cli, mem_ctx, 0, &needed, info_level,
archi_table[i].long_archi, &returned, &ctr);
More information about the samba-cvs
mailing list