X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=loadcfg.c;h=77b12d39faac43df0924f39459b79cf14e234797;hp=03729bf598b6bbcdf3744a7f0fbe1193ea9297db;hb=65e38359d73dc0e1d2c7d7dc6ad98c39d08f9a88;hpb=64a14a3afe5ffea3ee2226e7170677895b651b6f diff --git a/loadcfg.c b/loadcfg.c index 03729bf5..77b12d39 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,4 +1,4 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.34 2002/03/06 23:14:35 jongfoster Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.36 2002/03/13 00:27:05 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ @@ -35,6 +35,12 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.34 2002/03/06 23:14:35 jongfoster * * Revisions : * $Log: loadcfg.c,v $ + * Revision 1.36 2002/03/13 00:27:05 jongfoster + * Killing warnings + * + * Revision 1.35 2002/03/07 03:52:44 oes + * Set logging to tty for --no-daemon mode + * * Revision 1.34 2002/03/06 23:14:35 jongfoster * Trivial cosmetic changes to make function comments easier to find. * @@ -452,6 +458,30 @@ void unload_configfile (void * data) } +#ifdef FEATURE_GRACEFUL_TERMINATION +/********************************************************************* + * + * Function : unload_current_config_file + * + * Description : Unloads current config file - reset to state at + * beginning of program. + * + * Parameters : None + * + * Returns : N/A + * + *********************************************************************/ +void unload_current_config_file(void) +{ + if (current_configfile) + { + current_configfile->unloader = unload_configfile; + current_configfile = NULL; + } +} +#endif + + /********************************************************************* * * Function : load_config @@ -774,7 +804,7 @@ struct configuration_spec * load_config(void) { cur_fwd->forward_host = strdup(p); - if ((p = strchr(cur_fwd->forward_host, ':'))) + if (NULL != (p = strchr(cur_fwd->forward_host, ':'))) { *p++ = '\0'; cur_fwd->forward_port = atoi(p); @@ -837,7 +867,7 @@ struct configuration_spec * load_config(void) { cur_fwd->gateway_host = strdup(p); - if ((p = strchr(cur_fwd->gateway_host, ':'))) + if (NULL != (p = strchr(cur_fwd->gateway_host, ':'))) { *p++ = '\0'; cur_fwd->gateway_port = atoi(p); @@ -855,7 +885,7 @@ struct configuration_spec * load_config(void) { cur_fwd->forward_host = strdup(p); - if ((p = strchr(cur_fwd->forward_host, ':'))) + if (NULL != (p = strchr(cur_fwd->forward_host, ':'))) { *p++ = '\0'; cur_fwd->forward_port = atoi(p); @@ -916,7 +946,7 @@ struct configuration_spec * load_config(void) cur_fwd->gateway_host = strdup(p); - if ((p = strchr(cur_fwd->gateway_host, ':'))) + if (NULL != (p = strchr(cur_fwd->gateway_host, ':'))) { *p++ = '\0'; cur_fwd->gateway_port = atoi(p); @@ -933,7 +963,7 @@ struct configuration_spec * load_config(void) { cur_fwd->forward_host = strdup(p); - if ((p = strchr(cur_fwd->forward_host, ':'))) + if (NULL != (p = strchr(cur_fwd->forward_host, ':'))) { *p++ = '\0'; cur_fwd->forward_port = atoi(p); @@ -1310,7 +1340,7 @@ struct configuration_spec * load_config(void) if ( NULL != config->haddr ) { - if ((p = strchr(config->haddr, ':'))) + if (NULL != (p = strchr(config->haddr, ':'))) { *p++ = '\0'; if (*p)