static struct http_channel *http_channel_create(http_server_t http_server,
const char *addr,
struct conf_server *server);
static struct http_channel *http_channel_create(http_server_t http_server,
const char *addr,
struct conf_server *server);
- p->iochan = iochan_create(sock, proxy_io, EVENT_INPUT);
+ p->iochan = iochan_create(sock, proxy_io, EVENT_INPUT, "http_proxy");
static void http_io(IOCHAN i, int event)
{
struct http_channel *hc = iochan_getdata(i);
static void http_io(IOCHAN i, int event)
{
struct http_channel *hc = iochan_getdata(i);
htbuf = http_buf_create(hc->http_server);
res = recv(iochan_getfd(i), htbuf->buf, HTTP_BUF_SIZE -1, 0);
if (res == -1 && errno == EAGAIN)
htbuf = http_buf_create(hc->http_server);
res = recv(iochan_getfd(i), htbuf->buf, HTTP_BUF_SIZE -1, 0);
if (res == -1 && errno == EAGAIN)
- res = send(iochan_getfd(hc->iochan), wb->buf + wb->offset, wb->len, 0);
+ int res;
+ res = send(iochan_getfd(hc->iochan),
+ wb->buf + wb->offset, wb->len, 0);
- c = iochan_create(s, http_io, EVENT_INPUT | EVENT_EXCEPT);
+ c = iochan_create(s, http_io, EVENT_INPUT | EVENT_EXCEPT, "http_session_socket");
- c = iochan_create(l, http_accept, EVENT_INPUT | EVENT_EXCEPT);
+ c = iochan_create(l, http_accept, EVENT_INPUT | EVENT_EXCEPT, "http_server");