summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-07-11 00:06:29 +0000
committerJeremy Allison <jra@samba.org>2002-07-11 00:06:29 +0000
commit25148a148c1bec680924909722d59d0d47c795ae (patch)
treeb856cfccc097933b09b5c8cea3b08cba879bd74d /source3/param/loadparm.c
parent78722434a6511f06b8ea7da0b8a4ca08c8980c04 (diff)
downloadsamba-25148a148c1bec680924909722d59d0d47c795ae.tar.gz
samba-25148a148c1bec680924909722d59d0d47c795ae.tar.bz2
samba-25148a148c1bec680924909722d59d0d47c795ae.zip
*Experimental* new large-scaling printer code. Splits printing.tdb into
a separate tdb per printer, but only keeps (currently one) tdb open at a time (although this is easily changed by changing a #define). Needs scalability testing with large numbers of printers now.... Jeremy. (This used to be commit b0909cfa14fc7ef29d2b98b56d52723570da782a)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 0a9c425ea5..6e3ce460cd 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -1971,6 +1971,7 @@ static BOOL lp_add_ipc(char *ipc_name, BOOL guest_ok)
return (True);
}
+BOOL (*register_printer_fn)(const char *);
/***************************************************************************
add a new printer service, with defaults coming from service iFrom.
@@ -2004,6 +2005,8 @@ BOOL lp_add_printer(char *pszPrintername, int iDefaultService)
DEBUG(3, ("adding printer service %s\n", pszPrintername));
update_server_announce_as_printserver();
+ if (register_printer_fn && (!(*register_printer_fn)(pszPrintername)))
+ return False;
return (True);
}
@@ -3878,11 +3881,11 @@ void lp_set_name_resolve_order(char *new_order)
Globals.szNameResolveOrder = new_order;
}
-char *lp_printername(int snum)
+const char *lp_printername(int snum)
{
- char *ret = _lp_printername(snum);
+ const char *ret = _lp_printername(snum);
if (ret == NULL || (ret != NULL && *ret == '\0'))
- ret = lp_servicename(snum);
+ ret = lp_const_servicename(snum);
return ret;
}