along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net.c,v 1.35.4.100 2001/02/27 16:37:25 guus Exp $
+ $Id: net.c,v 1.35.4.101 2001/03/01 21:32:01 guus Exp $
*/
#include "config.h"
#include "process.h"
#include "protocol.h"
#include "subnet.h"
+#include "process.h"
#include "system.h"
cfg = get_config_val(upstreamcfg, config_connectto); /* Or else we try the next ConnectTo line */
}
- signal(SIGALRM, sigalrm_handler);
- upstreamcfg = config;
- seconds_till_retry = MAXTIMEOUT;
- syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in %d seconds"), seconds_till_retry);
- alarm(seconds_till_retry);
+ if(do_detach)
+ {
+ signal(SIGALRM, sigalrm_handler);
+ upstreamcfg = config;
+ seconds_till_retry = MAXTIMEOUT;
+ syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in %d seconds"), seconds_till_retry);
+ alarm(seconds_till_retry);
+ }
+ else
+ return -1;
+
cp
return 0;
}
for(node = connection_tree->head; node; node = node->next)
{
p = (connection_t *)node->data;
+ p->status.outgoing = 0;
p->status.active = 0;
terminate_connection(p);
}
if(read_server_config())
{
syslog(LOG_ERR, _("Unable to reread configuration file, exiting"));
- exit(0);
+ exit(1);
}
sleep(5);