Final internal symbols rename to _getdns prefix

This commit is contained in:
Willem Toorop 2015-08-19 16:33:19 +02:00
parent b9e8455e27
commit 015e387ea5
9 changed files with 26 additions and 26 deletions

View File

@ -457,7 +457,7 @@ create_default_root_servers()
* @returns GETDNS_FCHG_ERRORS if problems (see fchg->errors for details) * @returns GETDNS_FCHG_ERRORS if problems (see fchg->errors for details)
*/ */
int int
filechg_check(struct getdns_context *context, struct filechg *fchg) _getdns_filechg_check(struct getdns_context *context, struct filechg *fchg)
{ {
struct stat *finfo; struct stat *finfo;
@ -669,7 +669,7 @@ set_os_defaults(struct getdns_context *context)
context->fchg_resolvconf->changes = GETDNS_FCHG_NOCHANGES; context->fchg_resolvconf->changes = GETDNS_FCHG_NOCHANGES;
context->fchg_resolvconf->errors = GETDNS_FCHG_NOERROR; context->fchg_resolvconf->errors = GETDNS_FCHG_NOERROR;
} }
filechg_check(context, context->fchg_resolvconf); _getdns_filechg_check(context, context->fchg_resolvconf);
context->suffix = getdns_list_create_with_context(context); context->suffix = getdns_list_create_with_context(context);
context->upstreams = upstreams_create(context, upstreams_limit); context->upstreams = upstreams_create(context, upstreams_limit);
@ -1975,7 +1975,7 @@ _getdns_context_cancel_request(getdns_context *context,
NULL, dnsreq->user_pointer, transaction_id); NULL, dnsreq->user_pointer, transaction_id);
/* clean up */ /* clean up */
dns_req_free(dnsreq); _getdns_dns_req_free(dnsreq);
return GETDNS_RETURN_GOOD; return GETDNS_RETURN_GOOD;
} }
@ -2275,7 +2275,7 @@ _getdns_context_request_timed_out(struct getdns_dns_req *req)
getdns_transaction_t trans_id = req->trans_id; getdns_transaction_t trans_id = req->trans_id;
getdns_callback_t cb = req->user_callback; getdns_callback_t cb = req->user_callback;
void *user_arg = req->user_pointer; void *user_arg = req->user_pointer;
getdns_dict *response = create_getdns_response(req); getdns_dict *response = _getdns_create_getdns_response(req);
/* cancel the req - also clears it from outbound and cleans up*/ /* cancel the req - also clears it from outbound and cleans up*/
_getdns_context_cancel_request(context, trans_id, 0); _getdns_context_cancel_request(context, trans_id, 0);

View File

@ -246,7 +246,7 @@ void _getdns_bindata_destroy(
getdns_return_t _getdns_context_local_namespace_resolve( getdns_return_t _getdns_context_local_namespace_resolve(
getdns_dns_req* req, struct getdns_dict **response); getdns_dns_req* req, struct getdns_dict **response);
int filechg_check(struct getdns_context *context, struct filechg *fchg); int _getdns_filechg_check(struct getdns_context *context, struct filechg *fchg);
void _getdns_context_ub_read_cb(void *userarg); void _getdns_context_ub_read_cb(void *userarg);

View File

@ -2789,7 +2789,7 @@ static void check_chain_complete(chain_head *chain)
append_rrs2val_chain_list( append_rrs2val_chain_list(
context, val_chain_list, context, val_chain_list,
node->dnskey_req, node->dnskey_signer); node->dnskey_req, node->dnskey_signer);
dns_req_free(node->dnskey_req->owner); _getdns_dns_req_free(node->dnskey_req->owner);
} }
if (node->ds_req) { if (node->ds_req) {
append_rrs2val_chain_list( append_rrs2val_chain_list(
@ -2806,16 +2806,16 @@ static void check_chain_complete(chain_head *chain)
context, val_chain_list, context, val_chain_list,
&node->ds); &node->ds);
} }
dns_req_free(node->ds_req->owner); _getdns_dns_req_free(node->ds_req->owner);
} }
if (node->soa_req) { if (node->soa_req) {
dns_req_free(node->soa_req->owner); _getdns_dns_req_free(node->soa_req->owner);
} }
} }
GETDNS_FREE(head->my_mf, head); GETDNS_FREE(head->my_mf, head);
} }
response_dict = create_getdns_response(dnsreq); response_dict = _getdns_create_getdns_response(dnsreq);
if (val_chain_list) { if (val_chain_list) {
(void) getdns_dict_set_list( (void) getdns_dict_set_list(
response_dict, "validation_chain", val_chain_list); response_dict, "validation_chain", val_chain_list);
@ -2859,7 +2859,7 @@ void _getdns_get_validation_chain(getdns_dns_req *dnsreq)
check_chain_complete(chain); check_chain_complete(chain);
else else
_getdns_call_user_callback(dnsreq, _getdns_call_user_callback(dnsreq,
create_getdns_response(dnsreq)); _getdns_create_getdns_response(dnsreq));
} }

View File

@ -63,7 +63,7 @@ void _getdns_call_user_callback(getdns_dns_req *dns_req,
/* clean up */ /* clean up */
_getdns_context_clear_outbound_request(dns_req); _getdns_context_clear_outbound_request(dns_req);
dns_req_free(dns_req); _getdns_dns_req_free(dns_req);
cb(context, cb(context,
(response ? GETDNS_CALLBACK_COMPLETE : GETDNS_CALLBACK_ERROR), (response ? GETDNS_CALLBACK_COMPLETE : GETDNS_CALLBACK_ERROR),
@ -97,7 +97,7 @@ _getdns_check_dns_req_complete(getdns_dns_req *dns_req)
_getdns_get_validation_chain(dns_req); _getdns_get_validation_chain(dns_req);
else else
_getdns_call_user_callback( _getdns_call_user_callback(
dns_req, create_getdns_response(dns_req)); dns_req, _getdns_create_getdns_response(dns_req));
} }
#ifdef HAVE_LIBUNBOUND #ifdef HAVE_LIBUNBOUND
@ -198,7 +198,7 @@ getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
return r; return r;
/* create the request */ /* create the request */
if (!(req = dns_req_new(context, loop, name, request_type, extensions))) if (!(req = _getdns_dns_req_new(context, loop, name, request_type, extensions)))
return GETDNS_RETURN_MEMORY_ERROR; return GETDNS_RETURN_MEMORY_ERROR;
req->user_pointer = userarg; req->user_pointer = userarg;
@ -246,7 +246,7 @@ getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
if (r != 0) { if (r != 0) {
/* clean up the request */ /* clean up the request */
_getdns_context_clear_outbound_request(req); _getdns_context_clear_outbound_request(req);
dns_req_free(req); _getdns_dns_req_free(req);
return r; return r;
} }
return GETDNS_RETURN_GOOD; return GETDNS_RETURN_GOOD;

View File

@ -184,7 +184,7 @@ network_req_init(getdns_network_req *net_req, getdns_dns_req *owner,
} }
void void
dns_req_free(getdns_dns_req * req) _getdns_dns_req_free(getdns_dns_req * req)
{ {
getdns_network_req **net_req; getdns_network_req **net_req;
if (!req) { if (!req) {
@ -208,7 +208,7 @@ dns_req_free(getdns_dns_req * req)
/* create a new dns req to be submitted */ /* create a new dns req to be submitted */
getdns_dns_req * getdns_dns_req *
dns_req_new(getdns_context *context, getdns_eventloop *loop, _getdns_dns_req_new(getdns_context *context, getdns_eventloop *loop,
const char *name, uint16_t request_type, getdns_dict *extensions) const char *name, uint16_t request_type, getdns_dict *extensions)
{ {
int dnssec_return_status int dnssec_return_status

View File

@ -263,7 +263,7 @@ create_starttls_request(getdns_dns_req *dnsreq, getdns_upstream *upstream,
getdns_dict_destroy(extensions); getdns_dict_destroy(extensions);
return 0; return 0;
} }
upstream->starttls_req = dns_req_new(dnsreq->context, loop, upstream->starttls_req = _getdns_dns_req_new(dnsreq->context, loop,
"STARTTLS", GETDNS_RRTYPE_TXT, extensions); "STARTTLS", GETDNS_RRTYPE_TXT, extensions);
/*TODO[TLS]: TO BIT*/ /*TODO[TLS]: TO BIT*/
if (upstream->starttls_req == NULL) if (upstream->starttls_req == NULL)
@ -1418,7 +1418,7 @@ upstream_write_cb(void *userarg)
/* Delay the cleanup of the STARTTLS req until the write of the next /* Delay the cleanup of the STARTTLS req until the write of the next
* req in the queue since for sync req, the event on a request is * req in the queue since for sync req, the event on a request is
* used for the callback that writes the next req. */ * used for the callback that writes the next req. */
dns_req_free(upstream->starttls_req); _getdns_dns_req_free(upstream->starttls_req);
upstream->starttls_req = NULL; upstream->starttls_req = NULL;
} }
/* With synchonous lookups, schedule the read locally too */ /* With synchonous lookups, schedule the read locally too */

View File

@ -321,10 +321,10 @@ typedef struct getdns_dns_req {
extern getdns_dict *dnssec_ok_checking_disabled; extern getdns_dict *dnssec_ok_checking_disabled;
/* dns request utils */ /* dns request utils */
getdns_dns_req *dns_req_new(getdns_context *context, getdns_eventloop *loop, getdns_dns_req *_getdns_dns_req_new(getdns_context *context, getdns_eventloop *loop,
const char *name, uint16_t request_type, getdns_dict *extensions); const char *name, uint16_t request_type, getdns_dict *extensions);
void dns_req_free(getdns_dns_req * req); void _getdns_dns_req_free(getdns_dns_req * req);
#endif #endif
/* types-internal.h */ /* types-internal.h */

View File

@ -90,7 +90,7 @@ getdns_dict_util_get_string(struct getdns_dict * dict, char *name, char **result
} }
getdns_return_t getdns_return_t
dict_to_sockaddr(struct getdns_dict * ns, struct sockaddr_storage * output) _getdns_dict_to_sockaddr(struct getdns_dict * ns, struct sockaddr_storage * output)
{ {
char *address_type = NULL; char *address_type = NULL;
struct getdns_bindata *address_data = NULL; struct getdns_bindata *address_data = NULL;
@ -130,7 +130,7 @@ dict_to_sockaddr(struct getdns_dict * ns, struct sockaddr_storage * output)
} }
getdns_return_t getdns_return_t
sockaddr_to_dict(struct getdns_context *context, struct sockaddr_storage *address, _getdns_sockaddr_to_dict(struct getdns_context *context, struct sockaddr_storage *address,
struct getdns_dict ** output) struct getdns_dict ** output)
{ {
if (!output || !address) { if (!output || !address) {
@ -672,7 +672,7 @@ success:
} }
getdns_dict * getdns_dict *
create_getdns_response(getdns_dns_req *completed_request) _getdns_create_getdns_response(getdns_dns_req *completed_request)
{ {
getdns_dict *result; getdns_dict *result;
getdns_list *just_addrs = NULL; getdns_list *just_addrs = NULL;

View File

@ -117,16 +117,16 @@ _getdns_dict_copy(const struct getdns_dict *srcdict,
* @return GETDNS_RETURN_GOOD on success * @return GETDNS_RETURN_GOOD on success
* @return GETDNS_RETURN_GENERIC_ERROR if keys missing from dictionary * @return GETDNS_RETURN_GENERIC_ERROR if keys missing from dictionary
*/ */
getdns_return_t dict_to_sockaddr(struct getdns_dict * ns, getdns_return_t _getdns_dict_to_sockaddr(struct getdns_dict * ns,
struct sockaddr_storage *output); struct sockaddr_storage *output);
getdns_return_t sockaddr_to_dict(struct getdns_context *context, getdns_return_t _getdns_sockaddr_to_dict(struct getdns_context *context,
struct sockaddr_storage *sockaddr, struct getdns_dict ** output); struct sockaddr_storage *sockaddr, struct getdns_dict ** output);
getdns_dict * getdns_dict *
_getdns_rr_iter2rr_dict(struct mem_funcs *mf, _getdns_rr_iter *i); _getdns_rr_iter2rr_dict(struct mem_funcs *mf, _getdns_rr_iter *i);
struct getdns_dns_req; struct getdns_dns_req;
struct getdns_dict *create_getdns_response(struct getdns_dns_req *completed_request); struct getdns_dict *_getdns_create_getdns_response(struct getdns_dns_req *completed_request);
getdns_dict *_getdns_create_reply_dict(getdns_context *context, getdns_dict *_getdns_create_reply_dict(getdns_context *context,
getdns_network_req *req, getdns_list *just_addrs, int *rrsigs_in_answer); getdns_network_req *req, getdns_list *just_addrs, int *rrsigs_in_answer);