mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
make it work on freebsd; from phil oleson
svn:r314
This commit is contained in:
parent
4922f342fc
commit
22e53c7a84
3
buffer.c
3
buffer.c
@ -138,6 +138,9 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
|
|||||||
buffer = (char *)buf->buffer + buf->off;
|
buffer = (char *)buf->buffer + buf->off;
|
||||||
space = buf->totallen - buf->misalign - buf->off;
|
space = buf->totallen - buf->misalign - buf->off;
|
||||||
|
|
||||||
|
#ifndef va_copy
|
||||||
|
#define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list))
|
||||||
|
#endif
|
||||||
va_copy(aq, ap);
|
va_copy(aq, ap);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
3
http.c
3
http.c
@ -538,10 +538,11 @@ evhttp_connection_done(struct evhttp_connection *evcon)
|
|||||||
* on the connection, so that we can reply to it.
|
* on the connection, so that we can reply to it.
|
||||||
*/
|
*/
|
||||||
if (evcon->flags & EVHTTP_CON_OUTGOING) {
|
if (evcon->flags & EVHTTP_CON_OUTGOING) {
|
||||||
|
int need_close;
|
||||||
TAILQ_REMOVE(&evcon->requests, req, next);
|
TAILQ_REMOVE(&evcon->requests, req, next);
|
||||||
req->evcon = NULL;
|
req->evcon = NULL;
|
||||||
|
|
||||||
int need_close =
|
need_close =
|
||||||
evhttp_is_connection_close(req->input_headers) ||
|
evhttp_is_connection_close(req->input_headers) ||
|
||||||
evhttp_is_connection_close(req->output_headers);
|
evhttp_is_connection_close(req->output_headers);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user