summaryrefslogtreecommitdiffstats
path: root/src/resolv
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-02-12 10:12:04 -0500
committerJakub Hrozek <jhrozek@redhat.com>2014-02-12 22:30:55 +0100
commita3c8390d19593b1e5277d95bfb4ab206d4785150 (patch)
tree2eb4e5432f4f79a75589c03b1513b656879ebf9c /src/resolv
parentcc026fd9ba386f2197e3217940d597dcad1a26fe (diff)
downloadsssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.gz
sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.tar.xz
sssd-a3c8390d19593b1e5277d95bfb4ab206d4785150.zip
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic macro, supplying format string and its arguments directly, instead of wrapping them in parens. This script was used to update the code: grep -rwl --include '*.[hc]' DEBUG . | while read f; do mv "$f"{,.orig} perl -e \ 'use strict; use File::Slurp; my $text=read_file(\*STDIN); $text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs; print $text;' < "$f.orig" > "$f" rm "$f.orig" done Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Stephen Gallagher <sgallagh@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/resolv')
-rw-r--r--src/resolv/async_resolv.c136
-rw-r--r--src/resolv/async_resolv_utils.c24
2 files changed, 80 insertions, 80 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index dda288575..7f039230d 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -140,7 +140,7 @@ fd_input_available(struct tevent_context *ev, struct tevent_fd *fde,
struct fd_watch *watch = talloc_get_type(data, struct fd_watch);
if (watch->ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
return;
}
@@ -182,7 +182,7 @@ add_timeout_timer(struct tevent_context *ev, struct resolv_ctx *ctx)
ctx->timeout_watcher = tevent_add_timer(ev, ctx, tv, check_fd_timeouts,
ctx);
if (ctx->timeout_watcher == NULL) {
- DEBUG(1, ("Out of memory\n"));
+ DEBUG(1, "Out of memory\n");
}
}
@@ -192,7 +192,7 @@ check_fd_timeouts(struct tevent_context *ev, struct tevent_timer *te,
{
struct resolv_ctx *ctx = talloc_get_type(private_data, struct resolv_ctx);
- DEBUG(9, ("Checking for DNS timeouts\n"));
+ DEBUG(9, "Checking for DNS timeouts\n");
/* NULLify the timeout_watcher so we don't
* free it in the _done() function if it
@@ -216,11 +216,11 @@ resolv_request_timeout(struct tevent_context *ev,
{
struct resolv_request *rreq;
- DEBUG(SSSDBG_MINOR_FAILURE, ("The resolve request timed out\n"));
+ DEBUG(SSSDBG_MINOR_FAILURE, "The resolve request timed out\n");
rreq = talloc_get_type(pvt, struct resolv_request);
if (rreq->rwatch == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("The request already completed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "The request already completed\n");
return;
}
@@ -231,7 +231,7 @@ resolv_request_timeout(struct tevent_context *ev,
static int
request_watch_destructor(struct request_watch *rwatch)
{
- DEBUG(SSSDBG_TRACE_FUNC, ("Deleting request watch\n"));
+ DEBUG(SSSDBG_TRACE_FUNC, "Deleting request watch\n");
if (rwatch->rr) rwatch->rr->rwatch = NULL;
return 0;
}
@@ -243,8 +243,8 @@ schedule_request_timeout(struct tevent_context *ev, struct resolv_ctx *ctx,
struct resolv_request *rreq;
struct timeval tv;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Scheduling a timeout of %d seconds\n",
- ctx->timeout));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Scheduling a timeout of %d seconds\n",
+ ctx->timeout);
tv = tevent_timeval_current_ofs(ctx->timeout, 0);
/* Intentionally allocating on ctx, because the request might go away
@@ -288,7 +288,7 @@ schedule_timeout_watcher(struct tevent_context *ev, struct resolv_ctx *ctx,
ctx->pending_requests++;
- DEBUG(SSSDBG_TRACE_INTERNAL, ("Scheduling DNS timeout watcher\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, "Scheduling DNS timeout watcher\n");
add_timeout_timer(ev, ctx);
return rreq;
}
@@ -303,13 +303,13 @@ unschedule_timeout_watcher(struct resolv_ctx *ctx, struct resolv_request *rreq)
talloc_free(rreq); /* Cancels the tevent timeout as well */
if (ctx->pending_requests <= 0) {
- DEBUG(1, ("Pending DNS requests mismatch\n"));
+ DEBUG(1, "Pending DNS requests mismatch\n");
return;
}
ctx->pending_requests--;
if (ctx->pending_requests == 0) {
- DEBUG(9, ("Unscheduling DNS timeout watcher\n"));
+ DEBUG(9, "Unscheduling DNS timeout watcher\n");
talloc_zfree(ctx->timeout_watcher);
}
}
@@ -360,7 +360,7 @@ fd_event_add(struct resolv_ctx *ctx, int s, int flags)
/* The file descriptor is new, register it with tevent. */
watch = talloc(ctx, struct fd_watch);
if (watch == NULL) {
- DEBUG(1, ("Out of memory allocating fd_watch structure\n"));
+ DEBUG(1, "Out of memory allocating fd_watch structure\n");
return;
}
talloc_set_destructor(watch, fd_watch_destructor);
@@ -371,7 +371,7 @@ fd_event_add(struct resolv_ctx *ctx, int s, int flags)
watch->fde = tevent_add_fd(ctx->ev_ctx, watch, s, flags,
fd_input_available, watch);
if (watch->fde == NULL) {
- DEBUG(1, ("tevent_add_fd() failed\n"));
+ DEBUG(1, "tevent_add_fd() failed\n");
talloc_free(watch);
return;
}
@@ -400,7 +400,7 @@ resolv_ctx_destructor(struct resolv_ctx *ctx)
ares_channel channel;
if (ctx->channel == NULL) {
- DEBUG(1, ("Ares channel already destroyed?\n"));
+ DEBUG(1, "Ares channel already destroyed?\n");
return -1;
}
@@ -421,7 +421,7 @@ recreate_ares_channel(struct resolv_ctx *ctx)
ares_channel old_channel;
struct ares_options options;
- DEBUG(4, ("Initializing new c-ares channel\n"));
+ DEBUG(4, "Initializing new c-ares channel\n");
/* FIXME: the options would contain
* the nameservers to contact, the domains
* to search... => get from confdb
@@ -438,15 +438,15 @@ recreate_ares_channel(struct resolv_ctx *ctx)
ARES_OPT_LOOKUPS |
ARES_OPT_TRIES);
if (ret != ARES_SUCCESS) {
- DEBUG(1, ("Failed to initialize ares channel: %s\n",
- resolv_strerror(ret)));
+ DEBUG(1, "Failed to initialize ares channel: %s\n",
+ resolv_strerror(ret));
return return_code(ret);
}
old_channel = ctx->channel;
ctx->channel = new_channel;
if (old_channel != NULL) {
- DEBUG(4, ("Destroying the old c-ares channel\n"));
+ DEBUG(4, "Destroying the old c-ares channel\n");
ares_destroy(old_channel);
}
@@ -462,8 +462,8 @@ resolv_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
if (timeout < 1) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("The timeout is too short, DNS operations are going to fail. "
- "This is a bug outside unit tests\n"));
+ "The timeout is too short, DNS operations are going to fail. "
+ "This is a bug outside unit tests\n");
}
ctx = talloc_zero(mem_ctx, struct resolv_ctx);
@@ -646,12 +646,12 @@ resolv_copy_hostent_ares(TALLOC_CTX *mem_ctx, struct hostent *src,
break;
default:
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unknown address family %d\n", family));
+ "Unknown address family %d\n", family);
goto fail;
}
if (cret != EOK) {
- DEBUG(1, ("Could not copy address\n"));
+ DEBUG(1, "Could not copy address\n");
goto fail;
}
}
@@ -706,8 +706,8 @@ resolv_gethostbyname_files_send(TALLOC_CTX *mem_ctx,
state->rhostent = NULL;
state->family = family;
- DEBUG(4, ("Trying to resolve %s record of '%s' in files\n",
- state->family == AF_INET ? "A" : "AAAA", state->name));
+ DEBUG(4, "Trying to resolve %s record of '%s' in files\n",
+ state->family == AF_INET ? "A" : "AAAA", state->name);
state->status = ares_gethostbyname_file(state->resolv_ctx->channel,
state->name, state->family,
@@ -798,7 +798,7 @@ resolv_gethostbyname_dns_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct timeval tv = { 0, 0 };
if (ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
return NULL;
}
@@ -821,7 +821,7 @@ resolv_gethostbyname_dns_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
* This would not let our caller to set a callback for req. */
subreq = tevent_wakeup_send(req, ev, tv);
if (subreq == NULL) {
- DEBUG(1, ("Failed to add critical timer to run next operation!\n"));
+ DEBUG(1, "Failed to add critical timer to run next operation!\n");
talloc_zfree(req);
return NULL;
}
@@ -845,7 +845,7 @@ resolv_gethostbyname_dns_wakeup(struct tevent_req *subreq)
talloc_zfree(subreq);
if (state->resolv_ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
tevent_req_error(req, EIO);
return;
}
@@ -859,8 +859,8 @@ resolv_gethostbyname_dns_query(struct tevent_req *req,
{
struct resolv_request *rreq;
- DEBUG(4, ("Trying to resolve %s record of '%s' in DNS\n",
- state->family == AF_INET ? "A" : "AAAA", state->name));
+ DEBUG(4, "Trying to resolve %s record of '%s' in DNS\n",
+ state->family == AF_INET ? "A" : "AAAA", state->name);
rreq = schedule_timeout_watcher(state->ev, state->resolv_ctx, req);
if (!rreq) {
@@ -951,7 +951,7 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state,
switch (state->family) {
case AF_INET:
- DEBUG(7, ("Parsing an A reply\n"));
+ DEBUG(7, "Parsing an A reply\n");
addr = talloc_array(state, struct ares_addrttl, naddrttls);
if (!addr) {
@@ -964,7 +964,7 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state,
&naddrttls);
break;
case AF_INET6:
- DEBUG(7, ("Parsing an AAAA reply\n"));
+ DEBUG(7, "Parsing an AAAA reply\n");
addr = talloc_array(state, struct ares_addr6ttl, naddrttls);
if (!addr) {
@@ -977,7 +977,7 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state,
&naddrttls);
break;
default:
- DEBUG(1, ("Unknown family %d\n", state->family));
+ DEBUG(1, "Unknown family %d\n", state->family);
ret = EAFNOSUPPORT;
goto fail;
}
@@ -1083,7 +1083,7 @@ resolv_gethostbyname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
errno_t ret;
if (ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
return NULL;
}
@@ -1096,7 +1096,7 @@ resolv_gethostbyname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
state->ev = ev;
state->name = talloc_strdup(state, name);
if (state->name == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("talloc_strdup() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "talloc_strdup() failed\n");
goto fail;
}
@@ -1114,7 +1114,7 @@ resolv_gethostbyname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
ret = resolv_gethostbyname_address(state, state->name,
&state->rhostent);
if (ret != EOK) {
- DEBUG(1, ("Canot create a fake hostent structure\n"));
+ DEBUG(1, "Canot create a fake hostent structure\n");
goto fail;
}
@@ -1125,7 +1125,7 @@ resolv_gethostbyname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
ret = resolv_gethostbyname_step(req);
if (ret != EOK) {
- DEBUG(1, ("Cannot start the resolving\n"));
+ DEBUG(1, "Cannot start the resolving\n");
goto fail;
}
@@ -1151,10 +1151,10 @@ resolv_is_address(const char *name)
freeaddrinfo(res);
if (ret != 0) {
if (ret == -2) {
- DEBUG(9, ("[%s] does not look like an IP address\n", name));
+ DEBUG(9, "[%s] does not look like an IP address\n", name);
} else {
- DEBUG(2, ("getaddrinfo failed [%d]: %s\n",
- ret, gai_strerror(ret)));
+ DEBUG(2, "getaddrinfo failed [%d]: %s\n",
+ ret, gai_strerror(ret));
}
}
@@ -1210,7 +1210,7 @@ resolv_gethostbyname_address(TALLOC_CTX *mem_ctx, const char *address,
ret = inet_pton(family, address,
rhostent->addr_list[0]->ipaddr);
if (ret != 1) {
- DEBUG(1, ("Could not parse address as neither v4 nor v6\n"));
+ DEBUG(1, "Could not parse address as neither v4 nor v6\n");
ret = EINVAL;
goto done;
}
@@ -1240,7 +1240,7 @@ resolv_gethostbyname_family_init(enum restrict_family family_order)
return AF_INET6;
}
- DEBUG(1, ("Unknown address family order %d\n", family_order));
+ DEBUG(1, "Unknown address family order %d\n", family_order);
return -1;
}
@@ -1258,7 +1258,7 @@ resolv_gethostbyname_next(struct gethostbyname_state *state)
} else {
/* No more address families for this DB, check if
* there is another DB to try */
- DEBUG(5, ("No more address families to retry\n"));
+ DEBUG(5, "No more address families to retry\n");
state->dbi++;
if (state->db[state->dbi] != DB_SENTINEL) {
state->family = resolv_gethostbyname_family_init(
@@ -1267,7 +1267,7 @@ resolv_gethostbyname_next(struct gethostbyname_state *state)
}
}
- DEBUG(4, ("No more hosts databases to retry\n"));
+ DEBUG(4, "No more hosts databases to retry\n");
return ENOENT;
}
@@ -1283,21 +1283,21 @@ resolv_gethostbyname_step(struct tevent_req *req)
switch(state->db[state->dbi]) {
case DB_FILES:
- DEBUG(8, ("Querying files\n"));
+ DEBUG(8, "Querying files\n");
subreq = resolv_gethostbyname_files_send(state, state->ev,
state->resolv_ctx,
state->name,
state->family);
break;
case DB_DNS:
- DEBUG(8, ("Querying DNS\n"));
+ DEBUG(8, "Querying DNS\n");
subreq = resolv_gethostbyname_dns_send(state, state->ev,
state->resolv_ctx,
state->name,
state->family);
break;
default:
- DEBUG(1, ("Invalid hosts database\n"));
+ DEBUG(1, "Invalid hosts database\n");
return EINVAL;
}
@@ -1332,7 +1332,7 @@ resolv_gethostbyname_done(struct tevent_req *subreq)
&state->rhostent);
break;
default:
- DEBUG(1, ("Invalid hosts database\n"));
+ DEBUG(1, "Invalid hosts database\n");
tevent_req_error(req, EINVAL);
return;
}
@@ -1358,8 +1358,8 @@ resolv_gethostbyname_done(struct tevent_req *subreq)
}
if (ret != EOK) {
- DEBUG(2, ("querying hosts database failed [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(2, "querying hosts database failed [%d]: %s\n",
+ ret, strerror(ret));
tevent_req_error(req, ret);
return;
}
@@ -1402,14 +1402,14 @@ resolv_get_string_address_index(TALLOC_CTX *mem_ctx,
address = talloc_zero_size(mem_ctx, 128);
if (address == NULL) {
- DEBUG(1, ("talloc_zero failed.\n"));
+ DEBUG(1, "talloc_zero failed.\n");
return NULL;
}
errno = 0;
if (inet_ntop(hostent->family, hostent->addr_list[addrindex]->ipaddr,
address, 128) == NULL) {
- DEBUG(1, ("inet_ntop failed [%d][%s].\n", errno, strerror(errno)));
+ DEBUG(1, "inet_ntop failed [%d][%s].\n", errno, strerror(errno));
talloc_free(address);
return NULL;
}
@@ -1446,7 +1446,7 @@ resolv_get_string_ptr_address(TALLOC_CTX *mem_ctx,
(address[1]),
(address[0]));
} else {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Unknown address family\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "Unknown address family\n");
return NULL;
}
@@ -1464,7 +1464,7 @@ resolv_get_sockaddr_address_index(TALLOC_CTX *mem_ctx,
sockaddr = talloc_zero(mem_ctx, struct sockaddr_storage);
if (sockaddr == NULL) {
- DEBUG(1, ("talloc_zero failed.\n"));
+ DEBUG(1, "talloc_zero failed.\n");
return NULL;
}
@@ -1486,7 +1486,7 @@ resolv_get_sockaddr_address_index(TALLOC_CTX *mem_ctx,
break;
default:
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unknown address family %d\n", hostent->family));
+ "Unknown address family %d\n", hostent->family);
return NULL;
}
@@ -1583,10 +1583,10 @@ resolv_getsrv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct getsrv_state *state;
struct timeval tv = { 0, 0 };
- DEBUG(4, ("Trying to resolve SRV record of '%s'\n", query));
+ DEBUG(4, "Trying to resolve SRV record of '%s'\n", query);
if (ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
return NULL;
}
@@ -1604,7 +1604,7 @@ resolv_getsrv_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
subreq = tevent_wakeup_send(req, ev, tv);
if (subreq == NULL) {
- DEBUG(1, ("Failed to add critical timer to run next operation!\n"));
+ DEBUG(1, "Failed to add critical timer to run next operation!\n");
talloc_zfree(req);
return NULL;
}
@@ -1650,7 +1650,7 @@ resolv_getsrv_done(void *arg, int status, int timeouts, unsigned char *abuf, int
ret = ares_parse_srv_reply(abuf, alen, &reply_list);
if (ret != ARES_SUCCESS) {
- DEBUG(2, ("SRV record parsing failed: %d: %s\n", ret, ares_strerror(ret)));
+ DEBUG(2, "SRV record parsing failed: %d: %s\n", ret, ares_strerror(ret));
ret = return_code(ret);
goto fail;
}
@@ -1700,7 +1700,7 @@ ares_getsrv_wakeup(struct tevent_req *subreq)
talloc_zfree(subreq);
if (state->resolv_ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
tevent_req_error(req, EIO);
return;
}
@@ -1819,10 +1819,10 @@ resolv_gettxt_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct gettxt_state *state;
struct timeval tv = { 0, 0 };
- DEBUG(4, ("Trying to resolve TXT record of '%s'\n", query));
+ DEBUG(4, "Trying to resolve TXT record of '%s'\n", query);
if (ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
return NULL;
}
@@ -1840,7 +1840,7 @@ resolv_gettxt_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
subreq = tevent_wakeup_send(req, ev, tv);
if (subreq == NULL) {
- DEBUG(1, ("Failed to add critical timer to run next operation!\n"));
+ DEBUG(1, "Failed to add critical timer to run next operation!\n");
talloc_zfree(req);
return NULL;
}
@@ -1887,7 +1887,7 @@ resolv_gettxt_done(void *arg, int status, int timeouts, unsigned char *abuf, int
ret = ares_parse_txt_reply(abuf, alen, &reply_list);
if (status != ARES_SUCCESS) {
- DEBUG(2, ("TXT record parsing failed: %d: %s\n", ret, ares_strerror(ret)));
+ DEBUG(2, "TXT record parsing failed: %d: %s\n", ret, ares_strerror(ret));
ret = return_code(ret);
goto fail;
}
@@ -1937,7 +1937,7 @@ ares_gettxt_wakeup(struct tevent_req *subreq)
talloc_zfree(subreq);
if (state->resolv_ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
+ DEBUG(1, "Invalid ares channel - this is likely a bug\n");
tevent_req_error(req, EIO);
return;
}
@@ -2121,7 +2121,7 @@ static int reply_weight_rearrange(int len,
}
if (r == NULL || totals[i] == -1) {
- DEBUG(1, ("Bug: did not select any server!\n"));
+ DEBUG(1, "Bug: did not select any server!\n");
ret = EIO;
goto done;
}
@@ -2165,7 +2165,7 @@ resolv_sort_srv_reply(struct ares_srv_reply **reply)
* (the root domain), abort.
*/
if (*reply && !(*reply)->next && strcmp((*reply)->host, ".") == 0) {
- DEBUG(1, ("DNS returned only the root domain, aborting\n"));
+ DEBUG(1, "DNS returned only the root domain, aborting\n");
return EIO;
}
@@ -2190,8 +2190,8 @@ resolv_sort_srv_reply(struct ares_srv_reply **reply)
pri_end->next = NULL;
ret = reply_weight_rearrange(len, &pri_start, &pri_end);
if (ret) {
- DEBUG(1, ("Error rearranging priority level [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(1, "Error rearranging priority level [%d]: %s\n",
+ ret, strerror(ret));
return ret;
}
diff --git a/src/resolv/async_resolv_utils.c b/src/resolv/async_resolv_utils.c
index dbc33d5d0..b24ae603f 100644
--- a/src/resolv/async_resolv_utils.c
+++ b/src/resolv/async_resolv_utils.c
@@ -50,7 +50,7 @@ resolv_get_domain_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state,
struct resolv_get_domain_state);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
return NULL;
}
@@ -59,8 +59,8 @@ resolv_get_domain_send(TALLOC_CTX *mem_ctx,
ret = gethostname(system_hostname, HOST_NAME_MAX);
if (ret) {
ret = errno;
- DEBUG(SSSDBG_CRIT_FAILURE, ("gethostname() failed: [%d]: %s\n",
- ret, strerror(ret)));
+ DEBUG(SSSDBG_CRIT_FAILURE, "gethostname() failed: [%d]: %s\n",
+ ret, strerror(ret));
goto immediately;
}
system_hostname[HOST_NAME_MAX-1] = '\0';
@@ -74,7 +74,7 @@ resolv_get_domain_send(TALLOC_CTX *mem_ctx,
goto immediately;
}
- DEBUG(SSSDBG_TRACE_LIBS, ("Host name is: %s\n", state->hostname));
+ DEBUG(SSSDBG_TRACE_LIBS, "Host name is: %s\n", state->hostname);
subreq = resolv_gethostbyname_send(state, ev, resolv_ctx, state->hostname,
family_order, host_dbs);
@@ -110,13 +110,13 @@ static void resolv_get_domain_done(struct tevent_req *subreq)
talloc_zfree(subreq);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could not get fully qualified name for host name %s "
+ "Could not get fully qualified name for host name %s "
"error [%d]: %s, resolver returned: [%d]: %s\n",
state->hostname, ret, strerror(ret), resolv_status,
- resolv_strerror(resolv_status)));
+ resolv_strerror(resolv_status));
state->fqdn = state->hostname;
} else {
- DEBUG(SSSDBG_TRACE_LIBS, ("The FQDN is: %s\n", rhostent->name));
+ DEBUG(SSSDBG_TRACE_LIBS, "The FQDN is: %s\n", rhostent->name);
state->fqdn = talloc_steal(state, rhostent->name);
talloc_zfree(rhostent);
}
@@ -181,7 +181,7 @@ struct tevent_req *resolv_discover_srv_send(TALLOC_CTX *mem_ctx,
req = tevent_req_create(mem_ctx, &state,
struct resolv_discover_srv_state);
if (req == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("tevent_req_create() failed\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
return NULL;
}
@@ -239,8 +239,8 @@ static errno_t resolv_discover_srv_next_domain(struct tevent_req *req)
goto done;
}
- DEBUG(SSSDBG_TRACE_FUNC, ("SRV resolution of service '%s'. Will use DNS "
- "discovery domain '%s'\n", state->service, domain));
+ DEBUG(SSSDBG_TRACE_FUNC, "SRV resolution of service '%s'. Will use DNS "
+ "discovery domain '%s'\n", state->service, domain);
subreq = resolv_getsrv_send(state, state->ev,
state->resolv_ctx, query);
@@ -275,8 +275,8 @@ static void resolv_discover_srv_done(struct tevent_req *subreq)
ret = resolv_getsrv_recv(state, subreq, &status, NULL, &state->reply_list);
talloc_zfree(subreq);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("SRV query failed [%d]: %s\n",
- status, resolv_strerror(status)));
+ DEBUG(SSSDBG_OP_FAILURE, "SRV query failed [%d]: %s\n",
+ status, resolv_strerror(status));
if (status == ARES_ENOTFOUND) {
/* continue with next discovery domain */