summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2010-01-13 17:03:53 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-01-14 09:09:44 -0500
commit995d26977acbb705e17ff9c01558d9d64208058d (patch)
tree7d86db25685b40c51c7862a66a47fdb7aa8afcdd /server
parent77abf4061b4374fabc88771058916443e49d5032 (diff)
downloadsssd-995d26977acbb705e17ff9c01558d9d64208058d.tar.gz
sssd-995d26977acbb705e17ff9c01558d9d64208058d.tar.xz
sssd-995d26977acbb705e17ff9c01558d9d64208058d.zip
Don't recursively call ares_process_fd() from fd_event()
Since ares_process_fd() might also cause fd_event() to be called again, calling ares_process_fd() is unwise. The bug will cause a crash if c-ares is using tcp connections. Fixes: #384
Diffstat (limited to 'server')
-rw-r--r--server/resolv/async_resolv.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/server/resolv/async_resolv.c b/server/resolv/async_resolv.c
index 5fd4084b0..ff84b386d 100644
--- a/server/resolv/async_resolv.c
+++ b/server/resolv/async_resolv.c
@@ -195,7 +195,6 @@ unschedule_timeout_watcher(struct resolv_ctx *ctx)
}
static void fd_event_add(struct resolv_ctx *ctx, int s);
-static void fd_event_write(struct resolv_ctx *ctx, int s);
static void fd_event_close(struct resolv_ctx *ctx, int s);
/*
@@ -216,11 +215,6 @@ fd_event(void *data, int s, int fd_read, int fd_write)
return;
}
- /* If ares needs to write to a descriptor */
- if (fd_write == 1) {
- fd_event_write(ctx, s);
- }
-
/* Are we already watching this file descriptor? */
watch = ctx->fds;
while (watch) {
@@ -260,17 +254,6 @@ fd_event_add(struct resolv_ctx *ctx, int s)
}
static void
-fd_event_write(struct resolv_ctx *ctx, int s)
-{
- if (ctx->channel == NULL) {
- DEBUG(1, ("Invalid ares channel - this is likely a bug\n"));
- return;
- }
- /* do not allow any read. */
- ares_process_fd(ctx->channel, ARES_SOCKET_BAD, s);
-}
-
-static void
fd_event_close(struct resolv_ctx *ctx, int s)
{
struct fd_watch *watch;