summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2010-10-04 16:35:50 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-10-08 12:55:29 -0400
commit215951647b655b0aec12c1e1361071b03c57d09f (patch)
treeda7819fc4bb1fc4896071b285d9277f57ca9e3a1 /src
parent82c45575cf7b89814c362c66f4718065c4a8a213 (diff)
downloadsssd-215951647b655b0aec12c1e1361071b03c57d09f.tar.gz
sssd-215951647b655b0aec12c1e1361071b03c57d09f.tar.xz
sssd-215951647b655b0aec12c1e1361071b03c57d09f.zip
Disable events on ldap fd when offline.
Erase events on LDAP socket when backend is offline and an event appears on the socket. Normally this would lead to infinite loop, because event is present on the fd, but instead of being processed, an error log is written and the program continues to wait for the event. Ticket: #599
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_fd_events.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_fd_events.c b/src/providers/ldap/sdap_fd_events.c
index 347cf8b81..c3f9e118b 100644
--- a/src/providers/ldap/sdap_fd_events.c
+++ b/src/providers/ldap/sdap_fd_events.c
@@ -49,14 +49,16 @@ int get_fd_from_ldap(LDAP *ldap, int *fd)
int remove_ldap_connection_callbacks(struct sdap_handle *sh)
{
-#ifdef HAVE_LDAP_CONNCB
/* sdap_fd_events might be NULL here if sdap_mark_offline()
* was called before a connection was established.
*/
if (sh->sdap_fd_events) {
+#ifdef HAVE_LDAP_CONNCB
talloc_zfree(sh->sdap_fd_events->conncb);
- }
+#else
+ talloc_zfree(sh->sdap_fd_events->fde);
#endif
+ }
return EOK;
}