Merge remote-tracking branch 'github/20_win64_compilation' into 21_win64_compilation
authorNick Mathewson <nickm@torproject.org>
Fri, 2 Nov 2012 15:46:14 +0000 (11:46 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 2 Nov 2012 15:46:14 +0000 (11:46 -0400)
Conflicts:
http.c
signal.c

1  2 
http.c
signal.c
win32select.c

diff --cc http.c
index b096705a0eb7101eb715f19dcd55de7292b15aad,3994b917dc24353c41f39857722142eab84d7786..34d1dc96aa58a417c53f095ebedfbf81da63c83f
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -2059,12 -1976,12 +2064,12 @@@ evhttp_read_firstline(struct evhttp_con
  {
        enum message_read_status res;
  
 -      res = evhttp_parse_firstline(req, bufferevent_get_input(evcon->bufev));
 +      res = evhttp_parse_firstline_(req, bufferevent_get_input(evcon->bufev));
        if (res == DATA_CORRUPTED || res == DATA_TOO_LONG) {
                /* Error while reading, terminate */
-               event_debug(("%s: bad header lines on %d\n",
-                       __func__, evcon->fd));
+               event_debug(("%s: bad header lines on "EV_SOCK_FMT"\n",
+                       __func__, EV_SOCK_ARG(evcon->fd)));
 -              evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER);
 +              evhttp_connection_fail_(evcon, EVCON_HTTP_INVALID_HEADER);
                return;
        } else if (res == MORE_DATA_EXPECTED) {
                /* Need more header lines */
@@@ -2082,11 -1999,12 +2087,12 @@@ evhttp_read_header(struct evhttp_connec
        enum message_read_status res;
        evutil_socket_t fd = evcon->fd;
  
 -      res = evhttp_parse_headers(req, bufferevent_get_input(evcon->bufev));
 +      res = evhttp_parse_headers_(req, bufferevent_get_input(evcon->bufev));
        if (res == DATA_CORRUPTED || res == DATA_TOO_LONG) {
                /* Error while reading, terminate */
-               event_debug(("%s: bad header lines on %d\n", __func__, fd));
+               event_debug(("%s: bad header lines on "EV_SOCK_FMT"\n",
+                       __func__, EV_SOCK_ARG(fd)));
 -              evhttp_connection_fail(evcon, EVCON_HTTP_INVALID_HEADER);
 +              evhttp_connection_fail_(evcon, EVCON_HTTP_INVALID_HEADER);
                return;
        } else if (res == MORE_DATA_EXPECTED) {
                /* Need more header lines */
@@@ -3844,15 -3683,12 +3851,15 @@@ evhttp_get_request_connection
                return (NULL);
        }
  
-       event_debug(("%s: new request from %s:%s on %d\n",
-                       __func__, hostname, portname, fd));
+       event_debug(("%s: new request from %s:%s on "EV_SOCK_FMT"\n",
+               __func__, hostname, portname, EV_SOCK_ARG(fd)));
  
        /* we need a connection object to put the http request on */
 -      evcon = evhttp_connection_base_new(
 -              http->base, NULL, hostname, atoi(portname));
 +      if (http->bevcb != NULL) {
 +              bev = (*http->bevcb)(http->base, http->bevcbarg);
 +      }
 +      evcon = evhttp_connection_base_bufferevent_new(
 +              http->base, NULL, bev, hostname, atoi(portname));
        mm_free(hostname);
        mm_free(portname);
        if (evcon == NULL)
diff --cc signal.c
Simple merge
diff --cc win32select.c
index 67c6f97dd87f562953542ebcdfedc7cb2eb57579,00ce27af9d27d2345930a30da23833da4396ae16..68f7697a72572eb3e74e777331c58ae236a447bb
@@@ -243,12 -237,13 +243,13 @@@ win32_add(struct event_base *base, evut
  
  int
  win32_del(struct event_base *base, evutil_socket_t fd, short old, short events,
 -                void *_idx)
 +                void *idx_)
  {
        struct win32op *win32op = base->evbase;
 -      struct idx_info *idx = _idx;
 +      struct idx_info *idx = idx_;
  
-       event_debug(("%s: Removing event for %d", __func__, fd));
+       event_debug(("%s: Removing event for "EV_SOCK_FMT,
+               __func__, EV_SOCK_ARG(fd)));
        if (events & EV_READ)
                do_fd_clear(base, win32op, idx, 1);
        if (events & EV_WRITE)