file, linenum, *err, newsrv->id);
return -1;
}
+ if (val <= 0) {
+ Alert("parsing [%s:%d]: invalid value %d for argument '%s' of server %s.\n",
+ file, linenum, val, args[cur_arg], newsrv->id);
+ return -1;
+ }
newsrv->inter = val;
cur_arg += 2;
}
file, linenum, *err, newsrv->id);
return -1;
}
+ if (val <= 0) {
+ Alert("parsing [%s:%d]: invalid value %d for argument '%s' of server %s.\n",
+ file, linenum, val, args[cur_arg], newsrv->id);
+ return -1;
+ }
newsrv->fastinter = val;
cur_arg += 2;
}
file, linenum, *err, newsrv->id);
return -1;
}
+ if (val <= 0) {
+ Alert("parsing [%s:%d]: invalid value %d for argument '%s' of server %s.\n",
+ file, linenum, val, args[cur_arg], newsrv->id);
+ return -1;
+ }
newsrv->downinter = val;
cur_arg += 2;
}
file, linenum, *err, newsrv->id);
return -1;
}
+ if (val <= 0) {
+ Alert("parsing [%s:%d]: invalid value %d for argument '%s' of server %s.\n",
+ file, linenum, val, args[cur_arg], newsrv->id);
+ return -1;
+ }
newsrv->slowstart = (val + 999) / 1000;
cur_arg += 2;
}
void process_chk(struct task *t, struct timeval *next)
{
__label__ new_chk, out;
+ int attempts = 0;
struct server *s = t->context;
struct sockaddr_in sa;
int fd;
//fprintf(stderr, "process_chk: task=%p\n", t);
new_chk:
+ if (attempts++ > 0) {
+ /* we always fail to create a server, let's stop insisting... */
+ while (tv_isle(&t->expire, &now))
+ tv_ms_add(&t->expire, &t->expire, s->inter);
+ task_queue(t); /* restore t to its place in the task list */
+ *next = t->expire;
+ goto out;
+ }
fd = s->curfd;
if (fd < 0) { /* no check currently running */
//fprintf(stderr, "process_chk: 2\n");