The Samba-Bugzilla – Attachment 820 Details for
Bug 2091
extended printer definition not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
prevent remove_stale_printers() from removing statically defined printer shares
look (text/plain), 1.35 KB, created by
Gerald (Jerry) Carter (dead mail address)
on 2004-12-02 10:18:45 UTC
(
hide
)
Description:
prevent remove_stale_printers() from removing statically defined printer shares
Filename:
MIME Type:
Creator:
Gerald (Jerry) Carter (dead mail address)
Created:
2004-12-02 10:18:45 UTC
Size:
1.35 KB
patch
obsolete
>Index: source/smbd/service.c >=================================================================== >--- source/smbd/service.c (revision 4032) >+++ source/smbd/service.c (revision 4043) >@@ -152,10 +152,9 @@ > int iPrinterService; > > if ((iPrinterService = lp_servicenumber(PRINTERS_NAME)) >= 0) { >- char *pszTemp; >+ const char *pszTemp = lp_printcapname(); > > DEBUG(3,("checking whether %s is a valid printer name...\n", service)); >- pszTemp = lp_printcapname(); > if ((pszTemp != NULL) && pcap_printername_ok(service, pszTemp)) { > DEBUG(3,("%s is a valid printer name\n", service)); > DEBUG(3,("adding %s as a printer service\n", service)); >@@ -877,12 +876,21 @@ > iNumServices = lp_numservices(); > printersServiceNum = lp_servicenumber( PRINTERS_NAME); > for( snum = 0; snum < iNumServices; snum++) { >+ > /* Never remove PRINTERS_NAME */ >+ > if ( snum == printersServiceNum) > continue; > pname = lp_printername( snum); >- /* Is snum a print service and still in the printing subsystem? */ >- if ( lp_print_ok( snum) && !pcap_printername_ok( pname, NULL)) { >+ >+ /* Is snum an autoloaded print service and still >+ in the printing subsystem? */ >+ >+ if ( lp_snum_ok(snum) >+ && lp_print_ok(snum) >+ && lp_autoloaded(snum) >+ && !pcap_printername_ok( pname, NULL)) >+ { > DEBUG( 3, ( "Removing printer: %s\n", pname)); > lp_killservice( snum); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2091
: 820