mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
Constify a couple of arguments to evdns_server_request_add_*_reply
This commit is contained in:
parent
e1c1167cbe
commit
cc2379d264
10
evdns.c
10
evdns.c
@ -1721,7 +1721,7 @@ done:
|
||||
|
||||
/* exported function */
|
||||
int
|
||||
evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
|
||||
evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
|
||||
{
|
||||
return evdns_server_request_add_reply(
|
||||
req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET,
|
||||
@ -1730,7 +1730,7 @@ evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *n
|
||||
|
||||
/* exported function */
|
||||
int
|
||||
evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl)
|
||||
evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl)
|
||||
{
|
||||
return evdns_server_request_add_reply(
|
||||
req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET,
|
||||
@ -1743,8 +1743,10 @@ evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_a
|
||||
{
|
||||
u32 a;
|
||||
char buf[32];
|
||||
EVUTIL_ASSERT(in || inaddr_name);
|
||||
EVUTIL_ASSERT(!(in && inaddr_name));
|
||||
if (in && inaddr_name)
|
||||
return -1;
|
||||
else if (!in && !inaddr_name)
|
||||
return -1;
|
||||
if (in) {
|
||||
a = ntohl(in->s_addr);
|
||||
evutil_snprintf(buf, sizeof(buf), "%d.%d.%d.%d.in-addr.arpa",
|
||||
|
@ -572,8 +572,8 @@ void evdns_server_request_set_flags(struct evdns_server_request *req, int flags)
|
||||
/* Functions to add an answer to an in-progress DNS reply.
|
||||
*/
|
||||
int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data);
|
||||
int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
|
||||
int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, void *addrs, int ttl);
|
||||
int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
|
||||
int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
|
||||
int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl);
|
||||
int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user