} while (res == BEV_OK &&
(bev->enabled & EV_READ) &&
evbuffer_get_length(bevf->underlying->input) &&
- !be_readbuf_full(bevf, state));
+ !be_readbuf_full(bevf, state));
if (*processed_out)
BEV_RESET_GENERIC_READ_TIMEOUT(bev);
} else {
connected = 1;
#ifdef WIN32
- if (BEV_IS_ASYNC(bufev)) {
+ if (BEV_IS_ASYNC(bufev)) {
event_del(&bufev->ev_write);
bufferevent_async_set_connected(bufev);
_bufferevent_run_eventcb(bufev,
find.ptr = (ev); \
EVLOCK_LOCK(_event_debug_map_lock, 0); \
dent = HT_REMOVE(event_debug_map, &global_debug_map, &find); \
- if (dent) \
+ if (dent) \
mm_free(dent); \
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
} \
{
int r;
r = event_assign(ev, current_base, fd, events, callback, arg);
- EVUTIL_ASSERT(r == 0);
+ EVUTIL_ASSERT(r == 0);
}
struct event *
(FDI_HAS_WRITE(fdi) ? POLLOUT : 0)
struct evport_data {
- int ed_port; /* event port for system events */
- int ed_nevents; /* number of allocated fdi's */
- struct fd_info *ed_fds; /* allocated fdi table */
+ int ed_port; /* event port for system events */
+ int ed_nevents; /* number of allocated fdi's */
+ struct fd_info *ed_fds; /* allocated fdi table */
/* fdi's that we need to reassoc */
int ed_pending[EVENTS_PER_GETN]; /* fd's with pending events */
};
static void* evport_init (struct event_base *);
static int evport_add(struct event_base *, int fd, short old, short events, void *);
static int evport_del(struct event_base *, int fd, short old, short events, void *);
-static int evport_dispatch (struct event_base *, struct timeval *);
+static int evport_dispatch (struct event_base *, struct timeval *);
static void evport_dealloc (struct event_base *);
const struct eventop evportops = {
return (DATA_CORRUPTED);
}
if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) {
- /* failed body length test */
+ /* failed body length test */
event_debug(("Request body is too long"));
return (DATA_TOO_LONG);
}
}
if (req->body_size > req->evcon->max_body_size) {
- /* failed body length test */
+ /* failed body length test */
event_debug(("Request body is too long"));
evhttp_connection_fail(evcon,
EVCON_HTTP_INVALID_HEADER);
enabling the bufferevent for the first time.
@param fd the file descriptor from which data is read and written to.
- This file descriptor is not allowed to be a pipe(2).
+ This file descriptor is not allowed to be a pipe(2).
@param readcb callback to invoke when there is data to be read, or NULL if
no callback is desired
@param writecb callback to invoke when the file descriptor is ready for
*
* I ask and expect, but do not require, that all derivative works contain an
* attribution similar to:
- * Parts developed by Adam Langley <agl@imperialviolet.org>
+ * Parts developed by Adam Langley <agl@imperialviolet.org>
*
* You may wish to replace the word "Parts" with something else depending on
* the amount of original code.
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
else {
SSL *ssl = SSL_new(ssl_ctx);
- b_out = bufferevent_openssl_socket_new(base, -1, ssl,
+ b_out = bufferevent_openssl_socket_new(base, -1, ssl,
BUFFEREVENT_SSL_CONNECTING,
BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS);
}
{
const char *what = BASIC_REQUEST_BODY;
- event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bufferevent_get_input(bev))));
+ event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bufferevent_get_input(bev))));
if (evbuffer_find(bufferevent_get_input(bev),
(const unsigned char*) what, strlen(what)) != NULL) {
memset(state, 0, sizeof(struct chunk_req_state));
state->req = req;
- if (strcmp(evhttp_request_uri(req), "/streamed") == 0) {
- evhttp_add_header(req->output_headers, "Content-Length", "39");
- }
+ if (strcmp(evhttp_request_uri(req), "/streamed") == 0) {
+ evhttp_add_header(req->output_headers, "Content-Length", "39");
+ }
- /* generate a chunked/streamed reply */
+ /* generate a chunked/streamed reply */
evhttp_send_reply_start(req, HTTP_OK, "Everything is fine");
/* but trickle it across several iterations to ensure we're not
http_data_length_constraints_test_done(struct evhttp_request *req, void *arg)
{
tt_assert(req);
- tt_int_op(req->response_code, ==, HTTP_BADREQUEST);
+ tt_int_op(req->response_code, ==, HTTP_BADREQUEST);
end:
event_loopexit(NULL);
}
rpc_hook_pause_cb(int fd, short what, void *arg)
{
struct _rpc_hook_ctx *ctx = arg;
- ++hook_pause_cb_called;
+ ++hook_pause_cb_called;
evrpc_resume_request(ctx->vbase, ctx->ctx, EVRPC_CONTINUE);
}
event_errx(_EVENT_ERR_ABORT, \
"%s:%d: Assertion %s failed in %s", \
__FILE__,__LINE__,#cond,__func__); \
- /* In case a user-supplied handler tries to */ \
+ /* In case a user-supplied handler tries to */ \
/* return control to us, log and abort here. */ \
(void)fprintf(stderr, \
"%s:%d: Assertion %s failed in %s", \