+int lp_defaultprinting(void)
+{
-+ return sDefault.iPrinting;
++ return sDefault.printing;
+}
+
/*******************************************************************
Ensure we don't use sendfile if server smb signing is active.
********************************************************************/
-diff -ur samba-3.0.26a/source3/printing/pcap.c samba-3.0.26a-lprng/source3/printing/pcap.c
---- samba-3.0.26a/source3/printing/pcap.c 2005-10-18 04:44:57.000000000 +0200
-+++ samba-3.0.26a-lprng/source3/printing/pcap.c 2007-10-09 17:27:18.000000000 +0200
-@@ -113,6 +113,7 @@
- pcap_cache_t *tmp_cache = NULL;
- XFILE *pcap_file;
+--- samba-3.6.0/source3/printing/print_standard.c~ 2011-08-09 13:17:47.000000000 +0200
++++ samba-3.6.0/source3/printing/print_standard.c 2011-10-17 21:15:15.693523176 +0200
+@@ -64,6 +64,7 @@ bool std_pcap_cache_reload(const char *p
char *pcap_line;
+ struct pcap_cache *pcache = NULL;
+ bool print_warning = false;
+ enum printing_types printing = lp_defaultprinting();
- DEBUG(3, ("reloading printcap cache\n"));
-
-@@ -210,6 +211,10 @@
- comment[60] = 0;
- name[MAXPRINTERLEN] = 0;
+ if ((pcap_file = x_fopen(pcap_name, O_RDONLY, 0)) == NULL) {
+ DEBUG(0, ("Unable to open printcap file %s for read!\n", pcap_name));
+@@ -77,6 +79,10 @@
+ if (*pcap_line == '#' || *pcap_line == 0)
+ continue;
+ /* 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;
+ /* now we have a real printer line - cut at the first : */
+ if ((p = strchr_m(pcap_line, ':')) != NULL)
+ *p = 0;
+