Changeset 599 for trunk/server/source3/smbd/server.c
- Timestamp:
- Jul 6, 2011, 8:21:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/smbd/server.c
r454 r599 542 542 } 543 543 544 static bool parent_housekeeping_fn(const struct timeval *now, void *private_data) 545 { 546 DEBUG(5, ("houskeeping\n")); 547 /* check if we need to reload services */ 548 check_reload(time(NULL)); 549 return true; 550 } 551 544 552 /**************************************************************************** 545 553 Open the socket communication. … … 601 609 } 602 610 611 /* Keep the first port for mDNS service 612 * registration. 613 */ 614 if (dns_port == 0) { 615 dns_port = port; 616 } 617 603 618 if (!smbd_open_one_socket(parent, ifss, port)) { 604 619 return false; … … 668 683 claim_connection(NULL,"", 669 684 FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_DBWRAP); 685 686 if (!(event_add_idle(smbd_event_context(), NULL, 687 timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0), 688 "parent_housekeeping", parent_housekeeping_fn, 689 parent))) { 690 DEBUG(0, ("Could not add housekeeping event\n")); 691 exit(1); 692 } 670 693 671 694 /* Listen to messages */ … … 735 758 } 736 759 737 /*************************************************************************** *738 Reload printers739 ************************************************************************** /760 /*************************************************************************** 761 purge stale printers and reload from pre-populated pcap cache 762 ***************************************************************************/ 740 763 void reload_printers(void) 741 764 { … … 745 768 const char *pname; 746 769 747 pcap_cache_reload(); 748 749 /* remove stale printers */ 770 DEBUG(10, ("reloading printer services from pcap cache\n")); 750 771 for (snum = 0; snum < n_services; snum++) { 751 772 /* avoid removing PRINTERS_NAME or non-autoloaded printers */ … … 794 815 ret = lp_load(get_dyn_CONFIGFILE(), False, False, True, True); 795 816 796 reload_printers();817 pcap_cache_reload(&reload_printers); 797 818 798 819 /* perhaps the config filename is now set */
Note:
See TracChangeset
for help on using the changeset viewer.