- signal(SIGALRM, sigalrm_handler);
- seconds_till_retry += 5;
- if(seconds_till_retry>300) /* Don't wait more than 5 minutes. */
- seconds_till_retry = 300;
- alarm(seconds_till_retry);
- syslog(LOG_ERR, _("Still failed to connect to other, will retry in %d seconds"),
- seconds_till_retry);
+ if(!setup_outgoing_connection(cfg->data.ip->ip)) /* function returns 0 when there are no problems */
+ {
+ signal(SIGALRM, SIG_IGN);
+ return;
+ }
+ cfg = get_next_config_val(upstreamip, upstreamindex++); /* Or else we try the next ConnectTo line */