p->resettries = RESET_TRIES;
p->reqtries = getconf_int(CNF_REQ_TRIES);
p->conf_fn = conf_fn;
- pkt_init(&p->req, P_REQ, req);
+ pkt_init(&p->req, P_REQ, "%s", req);
/*
* These are here for the caller
}
else if(pkt->type == P_PREP) {
p->timeout = p->repwait - CURTIME + p->curtime + 1;
+ if (p->timeout <= 0)
+ p->timeout = 1;
return (PA_CONTPEND);
}