mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Fix a few types to use compatible versions
svn:r1501
This commit is contained in:
parent
47bad8abb7
commit
34f28e08b3
@ -359,7 +359,7 @@ put_error(struct bufferevent_openssl *bev_ssl, unsigned long err)
|
|||||||
than 32 bits of it, since it needs to report errors on systems
|
than 32 bits of it, since it needs to report errors on systems
|
||||||
where long is only 32 bits.
|
where long is only 32 bits.
|
||||||
*/
|
*/
|
||||||
bev_ssl->errors[bev_ssl->n_errors++] = (uint32_t) err;
|
bev_ssl->errors[bev_ssl->n_errors++] = (ev_uint32_t) err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Have the base communications channel (either the underlying bufferevent or
|
/* Have the base communications channel (either the underlying bufferevent or
|
||||||
|
@ -72,7 +72,7 @@ struct evhttp_connection {
|
|||||||
u_short port;
|
u_short port;
|
||||||
|
|
||||||
size_t max_headers_size;
|
size_t max_headers_size;
|
||||||
uint64_t max_body_size;
|
ev_uint64_t max_body_size;
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
|
#define EVHTTP_CON_INCOMING 0x0001 /* only one request on it ever */
|
||||||
@ -134,7 +134,7 @@ struct evhttp {
|
|||||||
int timeout;
|
int timeout;
|
||||||
|
|
||||||
size_t default_max_headers_size;
|
size_t default_max_headers_size;
|
||||||
size_t default_max_body_size;
|
ev_uint64_t default_max_body_size;
|
||||||
|
|
||||||
void (*gencb)(struct evhttp_request *req, void *);
|
void (*gencb)(struct evhttp_request *req, void *);
|
||||||
void *gencbarg;
|
void *gencbarg;
|
||||||
|
18
http.c
18
http.c
@ -2672,12 +2672,22 @@ evhttp_set_timeout(struct evhttp* http, int timeout_in_secs)
|
|||||||
http->timeout = timeout_in_secs;
|
http->timeout = timeout_in_secs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void evhttp_set_max_headers_size(struct evhttp* http, ssize_t max_headers_size) {
|
void
|
||||||
http->default_max_headers_size = max_headers_size;
|
evhttp_set_max_headers_size(struct evhttp* http, ev_ssize_t max_headers_size)
|
||||||
|
{
|
||||||
|
if (max_headers_size < 0)
|
||||||
|
http->default_max_headers_size = EV_SIZE_MAX;
|
||||||
|
else
|
||||||
|
http->default_max_headers_size = max_headers_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void evhttp_set_max_body_size(struct evhttp* http, ssize_t max_body_size) {
|
void
|
||||||
http->default_max_body_size = max_body_size;
|
evhttp_set_max_body_size(struct evhttp* http, ev_ssize_t max_body_size)
|
||||||
|
{
|
||||||
|
if (max_body_size < 0)
|
||||||
|
http->default_max_body_size = EV_UINT64_MAX;
|
||||||
|
else
|
||||||
|
http->default_max_body_size = max_body_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user