ADDPRINTERDRIVER info level 6 fix - this is dynamic depending
authorJeremy Allison <jra@samba.org>
Wed, 22 Nov 2000 01:26:09 +0000 (01:26 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 22 Nov 2000 01:26:09 +0000 (01:26 +0000)
on a field in the struct - that's why it was so hard to find.
Jeremy.
(This used to be commit 0ab6eb01b0d15e5eb744333d2bd79c27451f50e3)

source3/rpc_parse/parse_spoolss.c

index fb6ce219e0a5927d10b84eb0c4210915a204d102..e3d9f896f508951dace0530c218143d09c8b6ec5 100644 (file)
@@ -4340,13 +4340,15 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_
 
        if(!prs_uint32("version", ps, depth, &il->version))
                return False;
-#if 0
-       /*
-        * Older build versions of W2K seem to need this. JRA.
-        */
-       if(!prs_uint32("dummy4", ps, depth, &il->dummy4))
-               return False;
-#endif
+       if (il->version != 0) {
+               /*
+                * If version != 0 then there are an extra 4 bytes.
+                * JohnR and I have verified this at Roseville... JRA.
+                */
+               if(!prs_uint32("dummy4", ps, depth, &il->dummy4))
+                       return False;
+       }
+
        if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
                return False;
        if(!prs_uint32("environment_ptr", ps, depth, &il->environment_ptr))