Lines Matching refs:bev
235 bufferevent_openssl_check_fd(struct bufferevent *bev, int filter) in bufferevent_openssl_check_fd() argument
237 tt_int_op(bufferevent_getfd(bev), !=, -1); in bufferevent_openssl_check_fd()
238 tt_int_op(bufferevent_setfd(bev, -1), ==, 0); in bufferevent_openssl_check_fd()
240 tt_int_op(bufferevent_getfd(bev), !=, -1); in bufferevent_openssl_check_fd()
242 tt_int_op(bufferevent_getfd(bev), ==, -1); in bufferevent_openssl_check_fd()
249 bufferevent_openssl_check_freed(struct bufferevent *bev) in bufferevent_openssl_check_freed() argument
251 tt_int_op(event_pending(&bev->ev_read, EVLIST_ALL, NULL), ==, 0); in bufferevent_openssl_check_freed()
252 tt_int_op(event_pending(&bev->ev_write, EVLIST_ALL, NULL), ==, 0); in bufferevent_openssl_check_freed()
259 respond_to_number(struct bufferevent *bev, void *ctx) in respond_to_number() argument
261 struct evbuffer *b = bufferevent_get_input(bev); in respond_to_number()
278 bufferevent_free(bev); /* Should trigger close on other side. */ in respond_to_number()
282 SSL_renegotiate(bufferevent_openssl_get_ssl(bev)); in respond_to_number()
285 evbuffer_add_printf(bufferevent_get_output(bev), in respond_to_number()
288 bufferevent_enable(bev, EV_WRITE); in respond_to_number()
289 bufferevent_disable(bev, EV_READ); in respond_to_number()
293 done_writing_cb(struct bufferevent *bev, void *ctx) in done_writing_cb() argument
295 struct evbuffer *b = bufferevent_get_output(bev); in done_writing_cb()
299 bufferevent_disable(bev, EV_WRITE); in done_writing_cb()
300 bufferevent_enable(bev, EV_READ); in done_writing_cb()
304 eventcb(struct bufferevent *bev, short what, void *ctx) in eventcb() argument
314 ssl = bufferevent_openssl_get_ssl(bev); in eventcb()
328 evbuffer_add_printf(bufferevent_get_output(bev), "1\n"); in eventcb()
333 bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER); in eventcb()
336 bufferevent_openssl_check_freed(bev); in eventcb()
338 bufferevent_free(bev); in eventcb()
343 bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER); in eventcb()
346 bufferevent_openssl_check_freed(bev); in eventcb()
348 bufferevent_free(bev); in eventcb()
353 bufferevent_openssl_check_fd(bev, type & REGRESS_OPENSSL_FILTER); in eventcb()
356 bufferevent_openssl_check_freed(bev); in eventcb()
358 bufferevent_free(bev); in eventcb()
515 struct bufferevent *bev = arg; in acceptcb_deferred() local
516 bufferevent_enable(bev, EV_READ|EV_WRITE); in acceptcb_deferred()
523 struct bufferevent *bev; in acceptcb() local
532 bev = bufferevent_openssl_socket_new( in acceptcb()
539 bufferevent_setcb(bev, respond_to_number, NULL, eventcb, in acceptcb()
545 acceptcb_deferred, bev, &when); in acceptcb()
546 bufferevent_disable(bev, EV_READ|EV_WRITE); in acceptcb()
548 bufferevent_enable(bev, EV_READ|EV_WRITE); in acceptcb()
670 struct bufferevent *bev; in regress_bufferevent_openssl_connect() local
700 bev = bufferevent_openssl_socket_new( in regress_bufferevent_openssl_connect()
704 tt_assert(bev); in regress_bufferevent_openssl_connect()
706 bufferevent_setcb(bev, respond_to_number, NULL, eventcb, in regress_bufferevent_openssl_connect()
715 bufferevent_socket_connect(bev, (struct sockaddr*)&ss, slen)); in regress_bufferevent_openssl_connect()
719 rw.fd = bufferevent_getfd(bev); in regress_bufferevent_openssl_connect()
725 evbuffer_add_printf(bufferevent_get_output(bev), "1\n"); in regress_bufferevent_openssl_connect()
726 bufferevent_enable(bev, EV_READ|EV_WRITE); in regress_bufferevent_openssl_connect()