/**********************************************************************
callback to receive a MSG_PRINTER_DRVUPGRADE message and interate
over all printers, upgrading ones as necessary
+ This is now *ONLY* called inside the background lpq updater. JRA.
**********************************************************************/
void do_drv_upgrade_printer(struct messaging_context *msg,
uint32_t *count_p)
{
int snum;
- int n_services = lp_numservices();
+ int n_services;
union spoolss_PrinterInfo *info = NULL;
uint32_t count = 0;
WERROR result = WERR_OK;
return WERR_NOMEM;
}
+ /*
+ * printer shares are only updated on client enumeration. The background
+ * printer process updates printer_list.tdb at regular intervals.
+ */
+ become_root();
+ delete_and_reload_printers(server_event_context(), msg_ctx);
+ unbecome_root();
+
+ n_services = lp_numservices();
*count_p = 0;
*info_p = NULL;