diff --git a/protossl.c b/protossl.c index d87d6e4..14fb836 100644 --- a/protossl.c +++ b/protossl.c @@ -801,7 +801,7 @@ protossl_bufferevent_setup(pxy_conn_ctx_t *ctx, evutil_socket_t fd, SSL *ssl) #endif /* DEBUG_PROXY */ struct bufferevent *bev = bufferevent_openssl_socket_new(ctx->evbase, fd, ssl, - ((fd == -1) ? BUFFEREVENT_SSL_CONNECTING : BUFFEREVENT_SSL_ACCEPTING), BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + ((fd == -1) ? BUFFEREVENT_SSL_CONNECTING : BUFFEREVENT_SSL_ACCEPTING), BEV_OPT_DEFER_CALLBACKS); if (!bev) { log_err_level_printf(LOG_CRIT, "Error creating bufferevent socket\n"); return NULL; @@ -831,7 +831,7 @@ protossl_bufferevent_setup_child(pxy_conn_child_ctx_t *ctx, evutil_socket_t fd, #endif /* DEBUG_PROXY */ struct bufferevent *bev = bufferevent_openssl_socket_new(ctx->conn->evbase, fd, ssl, - ((fd == -1) ? BUFFEREVENT_SSL_CONNECTING : BUFFEREVENT_SSL_ACCEPTING), BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + ((fd == -1) ? BUFFEREVENT_SSL_CONNECTING : BUFFEREVENT_SSL_ACCEPTING), BEV_OPT_DEFER_CALLBACKS); if (!bev) { log_err_level_printf(LOG_CRIT, "Error creating bufferevent socket\n"); return NULL; @@ -1078,7 +1078,7 @@ int protossl_setup_srvdst_new_bev_ssl_connecting(pxy_conn_ctx_t *ctx) { ctx->srvdst.bev = bufferevent_openssl_filter_new(ctx->evbase, ctx->srvdst.bev, ctx->srvdst.ssl, - BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS); if (!ctx->srvdst.bev) { log_err_level_printf(LOG_CRIT, "Error creating srvdst bufferevent\n"); SSL_free(ctx->srvdst.ssl); @@ -1212,7 +1212,7 @@ int protossl_setup_src_new_bev_ssl_accepting(pxy_conn_ctx_t *ctx) { ctx->src.bev = bufferevent_openssl_filter_new(ctx->evbase, ctx->src.bev, ctx->src.ssl, - BUFFEREVENT_SSL_ACCEPTING, BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + BUFFEREVENT_SSL_ACCEPTING, BEV_OPT_DEFER_CALLBACKS); if (!ctx->src.bev) { log_err_level_printf(LOG_CRIT, "Error creating src bufferevent\n"); SSL_free(ctx->src.ssl); @@ -1228,7 +1228,7 @@ int protossl_setup_dst_new_bev_ssl_connecting_child(pxy_conn_child_ctx_t *ctx) { ctx->dst.bev = bufferevent_openssl_filter_new(ctx->conn->evbase, ctx->dst.bev, ctx->dst.ssl, - BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + BUFFEREVENT_SSL_CONNECTING, BEV_OPT_DEFER_CALLBACKS); if (!ctx->dst.bev) { log_err_level_printf(LOG_CRIT, "Error creating dst bufferevent\n"); SSL_free(ctx->dst.ssl); diff --git a/prototcp.c b/prototcp.c index b1e299a..0482d1d 100644 --- a/prototcp.c +++ b/prototcp.c @@ -52,7 +52,7 @@ prototcp_bufferevent_setup(pxy_conn_ctx_t *ctx, evutil_socket_t fd) #endif /* DEBUG_PROXY */ // @todo Do we really need to defer callbacks? BEV_OPT_DEFER_CALLBACKS seems responsible for the issue with srvdst: We get writecb sometimes, no eventcb for CONNECTED event - struct bufferevent *bev = bufferevent_socket_new(ctx->evbase, fd, BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + struct bufferevent *bev = bufferevent_socket_new(ctx->evbase, fd, BEV_OPT_DEFER_CALLBACKS); if (!bev) { log_err_level_printf(LOG_CRIT, "Error creating bufferevent socket\n"); #ifdef DEBUG_PROXY @@ -76,7 +76,7 @@ prototcp_bufferevent_setup_child(pxy_conn_child_ctx_t *ctx, evutil_socket_t fd) log_dbg_level_printf(LOG_DBG_MODE_FINEST, "prototcp_bufferevent_setup_child: ENTER, fd=%d\n", fd); #endif /* DEBUG_PROXY */ - struct bufferevent *bev = bufferevent_socket_new(ctx->conn->evbase, fd, BEV_OPT_DEFER_CALLBACKS|BEV_OPT_THREADSAFE); + struct bufferevent *bev = bufferevent_socket_new(ctx->conn->evbase, fd, BEV_OPT_DEFER_CALLBACKS); if (!bev) { log_err_level_printf(LOG_CRIT, "Error creating bufferevent socket\n"); #ifdef DEBUG_PROXY