Changeset 860 for vendor/current/source3/smbd/server.c
- Timestamp:
- May 12, 2014, 8:58:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/server.c
r746 r860 109 109 change_to_root_user(); 110 110 reload_services(msg, smbd_server_conn->sock, False); 111 if (am_parent) { 112 pcap_cache_reload(ev_ctx, msg, 113 &reload_pcap_change_notify); 114 } 111 /* printer reload triggered by background printing process */ 115 112 } 116 113 … … 132 129 reload_printers(ev_ctx, msg); 133 130 } 131 132 static void smbd_sig_term_handler(struct tevent_context *ev, 133 struct tevent_signal *se, 134 int signum, 135 int count, 136 void *siginfo, 137 void *private_data) 138 { 139 exit_server_cleanly("termination signal"); 140 } 141 142 static void smbd_setup_sig_term_handler(void) 143 { 144 struct tevent_signal *se; 145 146 se = tevent_add_signal(smbd_event_context(), 147 smbd_event_context(), 148 SIGTERM, 0, 149 smbd_sig_term_handler, 150 NULL); 151 if (!se) { 152 exit_server("failed to setup SIGTERM handler"); 153 } 154 } 155 156 static void smbd_sig_hup_handler(struct tevent_context *ev, 157 struct tevent_signal *se, 158 int signum, 159 int count, 160 void *siginfo, 161 void *private_data) 162 { 163 struct messaging_context *msg_ctx = talloc_get_type_abort( 164 private_data, struct messaging_context); 165 change_to_root_user(); 166 DEBUG(1,("Reloading services after SIGHUP\n")); 167 reload_services(msg_ctx, smbd_server_conn->sock, false); 168 } 169 170 static void smbd_setup_sig_hup_handler(struct tevent_context *ev, 171 struct messaging_context *msg_ctx) 172 { 173 struct tevent_signal *se; 174 175 se = tevent_add_signal(ev, ev, SIGHUP, 0, smbd_sig_hup_handler, 176 msg_ctx); 177 if (!se) { 178 exit_server("failed to setup SIGHUP handler"); 179 } 180 } 181 134 182 135 183 /******************************************************************* … … 773 821 smb_stat_cache_delete); 774 822 messaging_register(msg_ctx, NULL, MSG_DEBUG, smbd_msg_debug); 775 messaging_register(msg_ctx, server_event_context(), MSG_PRINTER_PCAP,776 smb_pcap_updated);777 823 brl_register_msgs(msg_ctx); 778 824 … … 1235 1281 exit(1); 1236 1282 1237 /* Publish nt printers, this requires a working winreg pipe */1238 pcap_cache_reload(server_event_context(), smbd_messaging_context(),1239 &reload_printers);1240 1241 1283 /* only start the background queue daemon if we are 1242 1284 running as a daemon -- bad things will happen if … … 1246 1288 if (is_daemon && !interactive 1247 1289 && lp_parm_bool(-1, "smbd", "backgroundqueue", true)) { 1248 start_background_queue(smbd_event_context(), 1249 smbd_messaging_context()); 1290 /* background queue is responsible for printcap cache updates */ 1291 messaging_register(smbd_server_conn->msg_ctx, 1292 smbd_event_context(), 1293 MSG_PRINTER_PCAP, smb_pcap_updated); 1294 start_background_queue(server_event_context(), 1295 smbd_server_conn->msg_ctx); 1296 } else { 1297 DEBUG(3, ("running without background printer process, dynamic " 1298 "printer updates disabled\n")); 1299 /* Publish nt printers, this requires a working winreg pipe */ 1300 pcap_cache_reload(server_event_context(), 1301 smbd_messaging_context(), 1302 &reload_printers_full); 1250 1303 } 1251 1304
Note:
See TracChangeset
for help on using the changeset viewer.