summaryrefslogtreecommitdiff
path: root/server/resolv
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-12-08 19:26:50 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-12-09 10:05:18 -0500
commit95fbf9f5cbc93e4cc9b2ef02ef167f7b7ed8afea (patch)
treebfec20fd93401692a755d4cbf2c6741ae8b60ec5 /server/resolv
parent46e73b48bea5529e731998a823fe42aa13657f45 (diff)
downloadsssd-95fbf9f5cbc93e4cc9b2ef02ef167f7b7ed8afea.tar.gz
sssd-95fbf9f5cbc93e4cc9b2ef02ef167f7b7ed8afea.tar.bz2
sssd-95fbf9f5cbc93e4cc9b2ef02ef167f7b7ed8afea.zip
Add some debugging statements to fail_over and resolver
These were very useful for debugging and hopefully still will be in the future.
Diffstat (limited to 'server/resolv')
-rw-r--r--server/resolv/async_resolv.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/server/resolv/async_resolv.c b/server/resolv/async_resolv.c
index f778d1f4..14e9f0c8 100644
--- a/server/resolv/async_resolv.c
+++ b/server/resolv/async_resolv.c
@@ -160,7 +160,7 @@ fd_event_add(struct resolv_ctx *ctx, int s)
/* 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"));
+ DEBUG(1, ("Out of memory allocating fd_watch structure\n"));
return;
}
talloc_set_destructor(watch, fd_watch_destructor);
@@ -170,7 +170,7 @@ fd_event_add(struct resolv_ctx *ctx, int s)
fde = tevent_add_fd(ctx->ev_ctx, watch, s, TEVENT_FD_READ, fd_input_available, watch);
if (fde == NULL) {
- DEBUG(1, ("tevent_add_fd() failed"));
+ DEBUG(1, ("tevent_add_fd() failed\n"));
talloc_free(watch);
return;
}
@@ -240,7 +240,7 @@ resolv_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx,
options.sock_state_cb_data = ctx;
ret = ares_init_options(&ctx->channel, &options, ARES_OPT_SOCK_STATE_CB);
if (ret != ARES_SUCCESS) {
- DEBUG(1, ("Failed to initialize ares channel: %s",
+ DEBUG(1, ("Failed to initialize ares channel: %s\n",
resolv_strerror(ret)));
ret = return_code(ret);
goto done;
@@ -341,6 +341,8 @@ resolv_gethostbyname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct gethostbyname_state *state;
struct timeval tv = { 0, 0 };
+ DEBUG(4, ("Trying to resolve A record of '%s'\n", name));
+
if (ctx->channel == NULL) {
DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
return NULL;
@@ -532,6 +534,8 @@ 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));
+
if (ctx->channel == NULL) {
DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
return NULL;
@@ -721,6 +725,8 @@ 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));
+
if (ctx->channel == NULL) {
DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
return NULL;