commit - 318a6c1a4be3e07520b2a6640a095272397819f8
commit + e2a349f79360cc6441c367ccf4fb139535f61c58
blob - f9309ca7a0960ee768a9138ac4a1b637b092b94a
blob + bd5d9aad621b72140d5757bc6f1b1ba9c706e57a
--- net.c
+++ net.c
struct req;
+static struct req *req_by_id(uint32_t);
+
static void die(void) __attribute__((__noreturn__));
static void try_to_connect(int, short, void*);
static void close_with_err(struct req*, const char*);
static void close_with_errf(struct req*, const char*, ...)
__attribute__((format(printf, 2, 3)));
-static struct req *req_by_id(uint32_t);
static void net_tls_handshake(int, short, void *);
static void net_tls_readcb(int, short, void *);
event_once(req->fd, EV_WRITE, fn, req, tv);
}
+static struct req *
+req_by_id(uint32_t id)
+{
+ struct req *r;
+
+ TAILQ_FOREACH(r, &reqhead, reqs) {
+ if (r->id == id)
+ return r;
+ }
+
+ return NULL;
+}
+
static void __attribute__((__noreturn__))
die(void)
{
try_to_connect(0, 0, req);
}
#endif
-
-static struct req *
-req_by_id(uint32_t id)
-{
- struct req *r;
-
- TAILQ_FOREACH(r, &reqhead, reqs) {
- if (r->id == id)
- return r;
- }
-
- return NULL;
-}
static void
close_conn(int fd, short ev, void *d)