mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
r12988@catbus: nickm | 2007-05-25 20:15:56 -0400
socklen_t is a silly type anyway. Just use int as the argument for evdns_server_request_get_requesting_addr. svn:r10347
This commit is contained in:
parent
8508347b93
commit
b0be93c8b0
@ -1812,10 +1812,10 @@ evdns_server_request_drop(struct evdns_server_request *_req)
|
||||
|
||||
// exported function
|
||||
int
|
||||
evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, socklen_t addr_len)
|
||||
evdns_server_request_get_requesting_addr(struct evdns_server_request *_req, struct sockaddr *sa, int addr_len)
|
||||
{
|
||||
struct server_request *req = TO_SERVER_REQUEST(_req);
|
||||
if (addr_len < req->addrlen)
|
||||
if (addr_len < (int)req->addrlen)
|
||||
return -1;
|
||||
memcpy(sa, &(req->addr), req->addrlen);
|
||||
return req->addrlen;
|
||||
|
@ -324,7 +324,7 @@ int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct
|
||||
int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);
|
||||
|
||||
struct sockaddr;
|
||||
int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, socklen_t addr_len);
|
||||
int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, int addr_len);
|
||||
|
||||
int evdns_server_request_respond(struct evdns_server_request *req, int err);
|
||||
int evdns_server_request_drop(struct evdns_server_request *req);
|
||||
|
Loading…
Reference in New Issue
Block a user