commit - 0d40acb17f9926cbf33284d1a0129a9d1984ac33
commit + 318a6c1a4be3e07520b2a6640a095272397819f8
blob - e6a8c5f417cf8aa0397279ec0a985f9a409b0e0c
blob + f9309ca7a0960ee768a9138ac4a1b637b092b94a
--- net.c
+++ net.c
static void close_with_errf(struct req*, const char*, ...)
__attribute__((format(printf, 2, 3)));
static struct req *req_by_id(uint32_t);
-static struct req *req_by_id_try(uint32_t);
static void net_tls_handshake(int, short, void *);
static void net_tls_readcb(int, short, void *);
{
struct req *r;
- if ((r = req_by_id_try(id)) == NULL)
- die();
- return r;
-}
-
-static struct req *
-req_by_id_try(uint32_t id)
-{
- struct req *r;
-
TAILQ_FOREACH(r, &reqhead, reqs) {
if (r->id == id)
return r;
{
struct req *req;
- if ((req = req_by_id_try(imsg->hdr.peerid)) == NULL)
+ if ((req = req_by_id(imsg->hdr.peerid)) == NULL)
return;
bufferevent_enable(req->bev, EV_READ);
{
struct req *req;
- if ((req = req_by_id_try(imsg->hdr.peerid)) == NULL)
+ if ((req = req_by_id(imsg->hdr.peerid)) == NULL)
return;
close_conn(0, 0, req);
}