mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Merge remote-tracking branch 'origin/patches-2.0'
This commit is contained in:
commit
9155b09534
3
evdns.c
3
evdns.c
@ -1152,6 +1152,9 @@ request_parse(u8 *packet, int length, struct evdns_server_port *port, struct soc
|
|||||||
GET16(answers);
|
GET16(answers);
|
||||||
GET16(authority);
|
GET16(authority);
|
||||||
GET16(additional);
|
GET16(additional);
|
||||||
|
(void)answers;
|
||||||
|
(void)additional;
|
||||||
|
(void)authority;
|
||||||
|
|
||||||
if (flags & 0x8000) return -1; /* Must not be an answer. */
|
if (flags & 0x8000) return -1; /* Must not be an answer. */
|
||||||
flags &= 0x0110; /* Only RD and CD get preserved. */
|
flags &= 0x0110; /* Only RD and CD get preserved. */
|
||||||
|
1
evmap.c
1
evmap.c
@ -165,7 +165,6 @@ void evmap_io_clear(struct event_io_map *ctx)
|
|||||||
#define GET_SIGNAL_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \
|
#define GET_SIGNAL_SLOT_AND_CTOR(x, map, slot, type, ctor, fdinfo_len) \
|
||||||
do { \
|
do { \
|
||||||
if ((map)->entries[slot] == NULL) { \
|
if ((map)->entries[slot] == NULL) { \
|
||||||
EVUTIL_ASSERT(ctor != NULL); \
|
|
||||||
(map)->entries[slot] = \
|
(map)->entries[slot] = \
|
||||||
mm_calloc(1,sizeof(struct type)+fdinfo_len); \
|
mm_calloc(1,sizeof(struct type)+fdinfo_len); \
|
||||||
EVUTIL_ASSERT((map)->entries[slot] != NULL); \
|
EVUTIL_ASSERT((map)->entries[slot] != NULL); \
|
||||||
|
@ -551,7 +551,7 @@ want_fail_eventcb(struct bufferevent *bev, short what, void *ctx)
|
|||||||
if (what & BEV_EVENT_ERROR) {
|
if (what & BEV_EVENT_ERROR) {
|
||||||
s = bufferevent_getfd(bev);
|
s = bufferevent_getfd(bev);
|
||||||
err = evutil_socket_error_to_string(evutil_socket_geterror(s));
|
err = evutil_socket_error_to_string(evutil_socket_geterror(s));
|
||||||
TT_BLATHER(("connection failure %s", err));
|
TT_BLATHER(("connection failure on %d: %s", s, err));
|
||||||
test_ok = 1;
|
test_ok = 1;
|
||||||
} else {
|
} else {
|
||||||
TT_FAIL(("didn't fail? what %hd", what));
|
TT_FAIL(("didn't fail? what %hd", what));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user