commit edfe87bea0c396c48cb8344f02dcce6e3880711f from: Omar Polo date: Sat Jul 24 21:19:44 2021 UTC move struct req declaration up avoid a dummy `struct req;' commit - 77ae5e91860b3ea55ee275089622584597f3062b commit + edfe87bea0c396c48cb8344f02dcce6e3880711f blob - 4a38494b43e30e334e53f66617e910be038f6251 blob + 3e6726f3b89de15d813296cfcb0f1ba9a6c22f14 --- net.c +++ net.c @@ -41,8 +41,26 @@ static struct imsgev *iev_ui; static struct tls_config *tlsconf; -struct req; +/* a pending request */ +struct req { + struct phos_uri url; + uint32_t id; + int fd; + struct tls *ctx; + char req[1024]; + size_t len; + int done_header; + struct bufferevent *bev; + struct addrinfo *servinfo, *p; +#if HAVE_ASR_RUN + struct addrinfo hints; + struct event_asr *asrev; +#endif + + TAILQ_ENTRY(req) reqs; +}; + static struct req *req_by_id(uint32_t); static void die(void) __attribute__((__noreturn__)); @@ -94,26 +112,7 @@ static imsg_handlerfn *handlers[] = { typedef void (*statefn)(int, short, void*); TAILQ_HEAD(, req) reqhead; -/* a pending request */ -struct req { - struct phos_uri url; - uint32_t id; - int fd; - struct tls *ctx; - char req[1024]; - size_t len; - int done_header; - struct bufferevent *bev; - struct addrinfo *servinfo, *p; -#if HAVE_ASR_RUN - struct addrinfo hints; - struct event_asr *asrev; -#endif - - TAILQ_ENTRY(req) reqs; -}; - static inline void yield_r(struct req *req, statefn fn, struct timeval *tv) {