diff options
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 80c5fba25f..0e3ec1d033 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -766,88 +766,6 @@ static void smbd_parent_loop(struct smbd_parent_context *parent) /* NOTREACHED return True; */ } -/**************************************************************************** - Reload printers -**************************************************************************/ -void reload_printers(void) -{ - int snum; - int n_services = lp_numservices(); - int pnum = lp_servicenumber(PRINTERS_NAME); - const char *pname; - - pcap_cache_reload(); - - /* remove stale printers */ - for (snum = 0; snum < n_services; snum++) { - /* avoid removing PRINTERS_NAME or non-autoloaded printers */ - if (snum == pnum || !(lp_snum_ok(snum) && lp_print_ok(snum) && - lp_autoloaded(snum))) - continue; - - pname = lp_printername(snum); - if (!pcap_printername_ok(pname)) { - DEBUG(3, ("removing stale printer %s\n", pname)); - - if (is_printer_published(NULL, snum, NULL)) - nt_printer_publish(NULL, snum, DSPRINT_UNPUBLISH); - del_a_printer(pname); - lp_killservice(snum); - } - } - - load_printers(); -} - -/**************************************************************************** - Reload the services file. -**************************************************************************/ - -bool reload_services(bool test) -{ - bool ret; - - if (lp_loaded()) { - char *fname = lp_configfile(); - if (file_exist(fname) && - !strcsequal(fname, get_dyn_CONFIGFILE())) { - set_dyn_CONFIGFILE(fname); - test = False; - } - } - - reopen_logs(); - - if (test && !lp_file_list_changed()) - return(True); - - lp_killunused(conn_snum_used); - - ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True); - - reload_printers(); - - /* perhaps the config filename is now set */ - if (!test) - reload_services(True); - - reopen_logs(); - - load_interfaces(); - - if (smbd_server_fd() != -1) { - set_socket_options(smbd_server_fd(),"SO_KEEPALIVE"); - set_socket_options(smbd_server_fd(), lp_socket_options()); - } - - mangle_reset_cache(); - reset_stat_cache(); - - /* this forces service parameters to be flushed */ - set_current_service(NULL,0,True); - - return(ret); -} /**************************************************************************** Initialise connect, service and file structs. |