diff options
author | Jeremy Allison <jra@samba.org> | 2002-05-09 19:54:47 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-05-09 19:54:47 +0000 |
commit | 059da8fb3b7197bd6a9bfe57940a96a2546e63a5 (patch) | |
tree | 2a9321487a1e4dd0903e40216df90c0a82a387ca /source3/printing | |
parent | 909bb7a0551b54a18540b50c5e5159738c76b3c9 (diff) | |
download | samba-059da8fb3b7197bd6a9bfe57940a96a2546e63a5.tar.gz samba-059da8fb3b7197bd6a9bfe57940a96a2546e63a5.tar.bz2 samba-059da8fb3b7197bd6a9bfe57940a96a2546e63a5.zip |
Merged in printing fixes... There were many missing !
Jeremy
(This used to be commit 32fa089adead6ff3279172fd36560f4f9e2aeef0)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 29bc185a6d..9b79eac3e0 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -314,6 +314,11 @@ BOOL nt_printing_init(void) update_c_setprinter(True); + /* + * register callback to handle updating printers as new + * drivers are installed + */ + message_register(MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer); return True; } @@ -2960,6 +2965,30 @@ uint32 set_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level) } /**************************************************************************** + Delete driver init data stored for a specified driver +****************************************************************************/ + +BOOL del_driver_init(char *drivername) +{ + pstring key; + TDB_DATA kbuf; + + if (!drivername || !*drivername) { + DEBUG(3,("del_driver_init: No drivername specified!\n")); + return False; + } + + slprintf(key, sizeof(key)-1, "%s%s", DRIVER_INIT_PREFIX, drivername); + + kbuf.dptr = key; + kbuf.dsize = strlen(key)+1; + + DEBUG(6,("del_driver_init: Removing driver init data for [%s]\n", drivername)); + + return (tdb_delete(tdb_drivers, kbuf) == 0); +} + +/**************************************************************************** Pack up the DEVMODE and specifics for a printer into a 'driver init' entry in the tdb. Note: this is different from the driver entry and the printer entry. There should be a single driver init entry for each driver regardless |