Fix dst bufferevent BEV_EVENT_CONNECTED handler

This removes the spurious "Unknown bufferevent 0x80" debug message but
does not have any change in functionality, since return would have been
called anyway after falling down the debug message.

While here, remove the useless "ignoring event" debug message unless
DEBUG_PROXY is defined, and also print the timeout flag in debug mode.
pull/13/head
Daniel Roethlisberger 11 years ago
parent a0bf21b1a4
commit cfa5b15223

@ -1396,20 +1396,23 @@ pxy_bev_eventcb(struct bufferevent *bev, short events, void *arg)
#ifdef DEBUG_PROXY
if (OPTS_DEBUG(ctx->opts)) {
log_dbg_printf("%p %p eventcb %s %s%s%s\n", arg, (void*)bev,
log_dbg_printf("%p %p eventcb %s %s%s%s%s\n", arg, (void*)bev,
(bev == ctx->src.bev) ? "src" : "dst",
events & BEV_EVENT_CONNECTED ? "connected" : "",
events & BEV_EVENT_ERROR ? "error" : "",
events & BEV_EVENT_TIMEOUT ? "timeout" : "",
events & BEV_EVENT_EOF ? "eof" : "");
}
#endif /* DEBUG_PROXY */
if (events & BEV_EVENT_CONNECTED) {
if (bev != ctx->dst.bev) {
#ifdef DEBUG_PROXY
if (OPTS_DEBUG(ctx->opts)) {
log_dbg_printf("src buffer event connected: "
"ignoring event\n");
}
#endif /* DEBUG_PROXY */
return;
}
@ -1470,6 +1473,8 @@ pxy_bev_eventcb(struct bufferevent *bev, short events, void *arg)
pxy_log_connect_nonhttp(ctx);
}
}
return;
}
if (events & BEV_EVENT_ERROR) {

Loading…
Cancel
Save