Reload rendezvous service keys on sighup; otherwise, we wind up with a

bunch of half-initialized services.  This should solve half of
weasel's current bug.  The crash is the other half.

(arma: should we also call rend_services_init on hup?)


svn:r1578
This commit is contained in:
Nick Mathewson 2004-04-09 17:48:09 +00:00
parent a1a4c5be19
commit facb5d4221

View File

@ -529,6 +529,12 @@ static int do_hup(void) {
if (init_from_config(0, NULL) < 0) { if (init_from_config(0, NULL) < 0) {
exit(1); exit(1);
} }
/* reload keys as needed for rendezvous services. */
if (rend_service_init_keys()<0) {
log_fn(LOG_ERR,"Error reloading rendezvous service keys");
exit(1);
}
/* XXX also call rend_services_init ?? */
if(retry_all_connections() < 0) { if(retry_all_connections() < 0) {
log_fn(LOG_ERR,"Failed to bind one of the listener ports."); log_fn(LOG_ERR,"Failed to bind one of the listener ports.");
return -1; return -1;