Author: baggins                      Date: Tue Oct  9 15:39:58 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- skip printers with names begining with '.' if reading LPRng printcap

---- Files affected:
SOURCES:
   samba-lprng-no-dot-printers.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/samba-lprng-no-dot-printers.patch
diff -u /dev/null SOURCES/samba-lprng-no-dot-printers.patch:1.1
--- /dev/null   Tue Oct  9 17:39:58 2007
+++ SOURCES/samba-lprng-no-dot-printers.patch   Tue Oct  9 17:39:53 2007
@@ -0,0 +1,37 @@
+diff -ur samba-3.0.26a/source/param/loadparm.c 
samba-3.0.26a-lprng/source/param/loadparm.c
+--- samba-3.0.26a/source/param/loadparm.c      2007-09-11 16:21:57.000000000 
+0200
++++ samba-3.0.26a-lprng/source/param/loadparm.c        2007-10-09 
17:22:57.000000000 +0200
+@@ -5548,6 +5548,11 @@
+       return PRINTCAP_NAME;
+ }
+ 
++int lp_defaultprinting(void)
++{
++      return sDefault.iPrinting;
++}
++
+ /*******************************************************************
+  Ensure we don't use sendfile if server smb signing is active.
+ ********************************************************************/
+diff -ur samba-3.0.26a/source/printing/pcap.c 
samba-3.0.26a-lprng/source/printing/pcap.c
+--- samba-3.0.26a/source/printing/pcap.c       2005-10-18 04:44:57.000000000 
+0200
++++ samba-3.0.26a-lprng/source/printing/pcap.c 2007-10-09 17:27:18.000000000 
+0200
+@@ -113,6 +113,7 @@
+       pcap_cache_t *tmp_cache = NULL;
+       XFILE *pcap_file;
+       char *pcap_line;
++      enum printing_types printing = lp_defaultprinting();
+ 
+       DEBUG(3, ("reloading printcap cache\n"));
+ 
+@@ -210,6 +211,10 @@
+               comment[60] = 0;
+               name[MAXPRINTERLEN] = 0;
+ 
++              /* skip .name in case of LPRng */
++              if (printing == PRINT_LPRNG && *name = '.')
++                      continue;
++
+               if (*name && !pcap_cache_add(name, comment)) {
+                       x_fclose(pcap_file);
+                       goto done;
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to