#define VERIFY(cond) do { \
if (!(cond)) { \
fprintf(stderr, "[error] %s\n", #cond); \
+ exit(EXIT_FAILURE); \
} \
} while (0); \
{
ev_ssize_t len;
struct evbuffer *evbuf;
+ struct evhttp_connection *evcon;
VERIFY(req);
+ evcon = evhttp_request_get_connection(req);
+ VERIFY(evcon);
evbuf = evhttp_request_get_input_buffer(req);
len = evbuffer_get_length(evbuf);
}
{
- proxy = evhttp_uri_parse(argv[1]);
+ VERIFY(proxy = evhttp_uri_parse(argv[1]));
VERIFY(evhttp_uri_get_host(proxy));
VERIFY(evhttp_uri_get_port(proxy) > 0);
}