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 | c488ce9934aaf640c3f63cbdabc3110b8cf70fae (patch) | |
tree | 30fd2082cf29bcdf4e235c2164876120d5f301d5 /source/rpcclient | |
parent | d95c9c4d74ea2fb7e5aac4a58888ab6fbc571dfb (diff) | |
download | samba-c488ce9934aaf640c3f63cbdabc3110b8cf70fae.tar.gz samba-c488ce9934aaf640c3f63cbdabc3110b8cf70fae.tar.xz samba-c488ce9934aaf640c3f63cbdabc3110b8cf70fae.zip |
r4966: don't enumerate the drivers for the same architecture string more than once
Diffstat (limited to 'source/rpcclient')
-rw-r--r-- | source/rpcclient/cmd_spoolss.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/rpcclient/cmd_spoolss.c b/source/rpcclient/cmd_spoolss.c index 0b0d015238e..fa77af4145d 100644 --- a/source/rpcclient/cmd_spoolss.c +++ b/source/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); |