X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=common-src%2Fprotocol.c;h=932cfc3ceb7011cbe18a31c2cc61d894572c4f30;hb=b221e8dc16f345f8c8d7df8df71f4d36daaabb4c;hp=da587042749e6679fc4150c9c150783612291259;hpb=e442edb4d5816c4ad107ad9e71164f845eba70ad;p=debian%2Famanda diff --git a/common-src/protocol.c b/common-src/protocol.c index da58704..932cfc3 100644 --- a/common-src/protocol.c +++ b/common-src/protocol.c @@ -159,7 +159,7 @@ protocol_sendreq( 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 @@ -602,6 +602,8 @@ s_repwait( } else if(pkt->type == P_PREP) { p->timeout = p->repwait - CURTIME + p->curtime + 1; + if (p->timeout <= 0) + p->timeout = 1; return (PA_CONTPEND); }