some printer parameters are getting corrupted, possibly by the client
authorAndrew Tridgell <tridge@samba.org>
Sun, 4 Jun 2000 04:17:59 +0000 (04:17 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 4 Jun 2000 04:17:59 +0000 (04:17 +0000)
possibly by smbd. Reset them so printing at least works while I try to
figure out what is going on.
(This used to be commit 70476d6767a571460fa375fb1dae884df77ca143)

source3/printing/nt_printing.c

index fb3afde3035ce9cea5ff37cbcd2ff9a3771ae104..1aa41b856adcef9f5cf597861e827252a50be766 100644 (file)
@@ -667,8 +667,8 @@ static uint32 add_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info)
 
        safe_free(buf);
 
-       DEBUG(8,("packed printer [%s] with form [%s] len=%d\n", 
-                info->portname, info->devmode->formname, len));
+       DEBUG(8,("packed printer [%s] with printprocessor [%s] parameters=[%s] len=%d\n", 
+                info->portname, info->printprocessor, info->parameters, len));
 
        return ret;
 }
@@ -1081,8 +1081,18 @@ static uint32 get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen
 
        nt_printing_getsec(sharename, &info.secdesc_buf);
 
+       /* the following should not be necessary - why are these values
+          getting corrupted? */
+       fstrcpy(info.printprocessor, "winprint");
+       fstrcpy(info.datatype, "RAW");
+       fstrcpy(info.parameters,"");
+       
        safe_free(dbuf.dptr);
        *info_ptr=memdup(&info, sizeof(info));
+
+       DEBUG(9,("Unpacked printprocessor for [%s] of [%s]\n",
+                sharename, info.printprocessor));
+
        
        return 0;       
 }