diff options
author | Gerald Carter <jerry@samba.org> | 2005-01-24 18:42:33 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:55:09 -0500 |
commit | 5ee21705191a2f74c984b267bbc80259cbd2e68a (patch) | |
tree | ec1f8f515b9599a5cc882848dadbf2056ae10740 /source3 | |
parent | b1288c61a9fde624db7ed945de723dc7193632ee (diff) | |
download | samba-5ee21705191a2f74c984b267bbc80259cbd2e68a.tar.gz samba-5ee21705191a2f74c984b267bbc80259cbd2e68a.tar.bz2 samba-5ee21705191a2f74c984b267bbc80259cbd2e68a.zip |
r4966: don't enumerate the drivers for the same architecture string more than once
(This used to be commit c488ce9934aaf640c3f63cbdabc3110b8cf70fae)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 0b0d015238..fa77af4145 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -31,6 +31,13 @@ struct table_node { 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 @@ static WERROR cmd_spoolss_enum_drivers(struct cli_state *cli, { 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); |