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:22 -0400
commit3662413d65e9ba2a899e8ce98ec9c3a549be20c8 (patch)
treeec2e3400ebded371669e9b73c710c9b11b35b9c1 /src
parentab45f99d35fdcf952ba56014a433bc814c56df8c (diff)
downloadsssd-3662413d65e9ba2a899e8ce98ec9c3a549be20c8.tar.gz
sssd-3662413d65e9ba2a899e8ce98ec9c3a549be20c8.tar.xz
sssd-3662413d65e9ba2a899e8ce98ec9c3a549be20c8.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;
}