mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Clean up formatting: Disallow space-before-tab.
This commit is contained in:
parent
7515de91fe
commit
8fdf09c09d
@ -265,7 +265,7 @@ be_filter_process_input(struct bufferevent_filtered *bevf,
|
||||
} 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);
|
||||
|
@ -223,7 +223,7 @@ bufferevent_writecb(evutil_socket_t fd, short event, void *arg)
|
||||
} 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,
|
||||
|
4
event.c
4
event.c
@ -211,7 +211,7 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
|
||||
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); \
|
||||
} \
|
||||
@ -1537,7 +1537,7 @@ event_set(struct event *ev, evutil_socket_t fd, short events,
|
||||
{
|
||||
int r;
|
||||
r = event_assign(ev, current_base, fd, events, callback, arg);
|
||||
EVUTIL_ASSERT(r == 0);
|
||||
EVUTIL_ASSERT(r == 0);
|
||||
}
|
||||
|
||||
struct event *
|
||||
|
8
evport.c
8
evport.c
@ -100,9 +100,9 @@ struct fd_info {
|
||||
(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 */
|
||||
};
|
||||
@ -110,7 +110,7 @@ struct evport_data {
|
||||
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 = {
|
||||
|
4
http.c
4
http.c
@ -755,7 +755,7 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
|
||||
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);
|
||||
}
|
||||
@ -853,7 +853,7 @@ evhttp_read_body(struct evhttp_connection *evcon, struct evhttp_request *req)
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -55,7 +55,7 @@
|
||||
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
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* 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.
|
||||
|
@ -158,7 +158,7 @@ accept_cb(struct evconnlistener *listener, evutil_socket_t fd,
|
||||
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);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ http_readcb(struct bufferevent *bev, void *arg)
|
||||
{
|
||||
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) {
|
||||
@ -301,11 +301,11 @@ http_chunked_cb(struct evhttp_request *req, void *arg)
|
||||
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
|
||||
@ -2445,7 +2445,7 @@ static void
|
||||
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);
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ static void
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ long _evutil_weakrand(void);
|
||||
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", \
|
||||
|
Loading…
x
Reference in New Issue
Block a user