mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 11:53:00 -04:00
Consistentize tabs
This commit is contained in:
parent
22f4af6580
commit
bb0d2b4e85
2
buffer.c
2
buffer.c
@ -2140,7 +2140,7 @@ evbuffer_readfile(struct evbuffer *buf, evutil_socket_t fd, ev_ssize_t howmuch)
|
||||
/* XXX we _will_ waste some space here if there is any space left
|
||||
* over on buf->last. */
|
||||
nchains = evbuffer_reserve_space(buf, howmuch, v, 2);
|
||||
if (nchains < 1 || nchains > 2) {
|
||||
if (nchains < 1 || nchains > 2) {
|
||||
result = -1;
|
||||
goto done;
|
||||
}
|
||||
|
8
evmap.c
8
evmap.c
@ -704,15 +704,15 @@ event_changelist_del(struct event_base *base, evutil_socket_t fd, short old, sho
|
||||
*/
|
||||
|
||||
if (events & (EV_READ|EV_SIGNAL)) {
|
||||
if (!(change->old_events & (EV_READ | EV_SIGNAL)) &&
|
||||
(change->read_change & EV_CHANGE_ADD))
|
||||
if (!(change->old_events & (EV_READ | EV_SIGNAL)) &&
|
||||
(change->read_change & EV_CHANGE_ADD))
|
||||
change->read_change = 0;
|
||||
else
|
||||
change->read_change = EV_CHANGE_DEL;
|
||||
}
|
||||
if (events & EV_WRITE) {
|
||||
if (!(change->old_events & EV_WRITE) &&
|
||||
(change->write_change & EV_CHANGE_ADD))
|
||||
if (!(change->old_events & EV_WRITE) &&
|
||||
(change->write_change & EV_CHANGE_ADD))
|
||||
change->write_change = 0;
|
||||
else
|
||||
change->write_change = EV_CHANGE_DEL;
|
||||
|
17
http.c
17
http.c
@ -1482,7 +1482,7 @@ evhttp_parse_request_line(struct evhttp_request *req, char *line)
|
||||
scheme = evhttp_uri_get_scheme(req->uri_elems);
|
||||
hostname = evhttp_uri_get_host(req->uri_elems);
|
||||
if (scheme && (!evutil_ascii_strcasecmp(scheme, "http") ||
|
||||
!evutil_ascii_strcasecmp(scheme, "https")) &&
|
||||
!evutil_ascii_strcasecmp(scheme, "https")) &&
|
||||
hostname &&
|
||||
!evhttp_find_vhost(req->evcon->http_server, NULL, hostname))
|
||||
req->flags |= EVHTTP_PROXY_REQUEST;
|
||||
@ -3074,11 +3074,12 @@ evhttp_new_object(void)
|
||||
http->timeout = -1;
|
||||
evhttp_set_max_headers_size(http, EV_SIZE_MAX);
|
||||
evhttp_set_max_body_size(http, EV_SIZE_MAX);
|
||||
evhttp_set_allowed_methods(http, EVHTTP_REQ_GET |
|
||||
EVHTTP_REQ_POST |
|
||||
EVHTTP_REQ_HEAD |
|
||||
EVHTTP_REQ_PUT |
|
||||
EVHTTP_REQ_DELETE);
|
||||
evhttp_set_allowed_methods(http,
|
||||
EVHTTP_REQ_GET |
|
||||
EVHTTP_REQ_POST |
|
||||
EVHTTP_REQ_HEAD |
|
||||
EVHTTP_REQ_PUT |
|
||||
EVHTTP_REQ_DELETE);
|
||||
|
||||
TAILQ_INIT(&http->sockets);
|
||||
TAILQ_INIT(&http->callbacks);
|
||||
@ -3468,7 +3469,7 @@ evhttp_request_get_host(struct evhttp_request *req)
|
||||
|
||||
host = evhttp_find_header(req->input_headers, "Host");
|
||||
/* The Host: header may include a port. Remove it here
|
||||
to be consistent with uri_elems case above. */
|
||||
to be consistent with uri_elems case above. */
|
||||
if (host) {
|
||||
p = host + strlen(host) - 1;
|
||||
while (p > host && EVUTIL_ISDIGIT(*p))
|
||||
@ -4029,7 +4030,7 @@ evhttp_uri_parse(const char *source_uri)
|
||||
|
||||
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
|
||||
|
||||
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
||||
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
||||
|
||||
*/
|
||||
|
||||
|
@ -271,10 +271,10 @@ int evdns_set_option(const char *option, const char *val, int flags);
|
||||
function is evdns_base_resolv_conf_parse().
|
||||
|
||||
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
|
||||
DNS_OPTIONS_ALL
|
||||
DNS_OPTIONS_ALL
|
||||
@param filename the path to the resolv.conf file
|
||||
@return 0 if successful, or various positive error codes if an error
|
||||
occurred (see above)
|
||||
occurred (see above)
|
||||
@see resolv.conf(3), evdns_config_windows_nameservers()
|
||||
*/
|
||||
int evdns_resolv_conf_parse(int flags, const char *const filename);
|
||||
|
@ -754,9 +754,10 @@ const struct timeval *event_base_init_common_timeout(struct event_base *base,
|
||||
@param realloc_fn A replacement for realloc
|
||||
@param free_fn A replacement for free.
|
||||
**/
|
||||
void event_set_mem_functions(void *(*malloc_fn)(size_t sz),
|
||||
void *(*realloc_fn)(void *ptr, size_t sz),
|
||||
void (*free_fn)(void *ptr));
|
||||
void event_set_mem_functions(
|
||||
void *(*malloc_fn)(size_t sz),
|
||||
void *(*realloc_fn)(void *ptr, size_t sz),
|
||||
void (*free_fn)(void *ptr));
|
||||
#define EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user