- p->iochan = iochan_create(sock, proxy_io, EVENT_INPUT);
+ p->iochan = iochan_create(sock, proxy_io, EVENT_INPUT, "http_proxy");
iochan_setdata(p->iochan, p);
iochan_add(ser->iochan_man, p->iochan);
iochan_setdata(p->iochan, p);
iochan_add(ser->iochan_man, p->iochan);
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);
if (!hc->oqueue && hc->proxy && !hc->proxy->iochan)
http_channel_destroy(i); // Server closed; we're done
if (!hc->oqueue && hc->proxy && !hc->proxy->iochan)
http_channel_destroy(i); // Server closed; we're done
- 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");
iochan_setdata(c, server);
iochan_add(server->iochan_man, c);
iochan_setdata(c, server);
iochan_add(server->iochan_man, c);