pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1906:    if (nsno >= sizeof(nameservers)) {    if(r->retries++ > RETRIES)    {    r->retry_co = call_out(remove, REMOVE_DELAY, r);    return;    } else {    nsno = 0;    }    }    -  send(nameservers[nsno],53,r->req); +     r->retry_co = call_out(retry, RETRY_DELAY, r, nsno+1); -  +  udp::send(nameservers[nsno], 53, r->req);    }       //! Enqueue a new raw DNS request.    //!    //! @returns    //! Returns a @[Request] object.    //!    //! @note    //! Pike versions prior to 8.0 did not return the @[Request] object.    Request do_query(string domain, int cl, int type,
pike.git/lib/modules/Protocols.pmod/DNS.pmod:1929:    mixed ... args)    {    for(int e=next_client ? 100 : 256;e>=0;e--)    {    int lid = random(65536);    if(!catch { requests[lid]++; })    {    string req=low_mkquery(lid,domain,cl,type);       object r = Request(domain, req, callback, args); -  requests[lid]=r; -  udp::send(nameservers[0],53,r->req); +     r->retry_co = call_out(retry, RETRY_DELAY, r, 1); -  +  requests[lid] = r; +  udp::send(nameservers[0], 53, req);    return r;    }    }       /* We failed miserably to find a request id to use,    * so we create a second UDP port to be able to have more    * requests 'in the air'. /Hubbe    */    if(!next_client)    next_client=this_program(nameservers,domains);