Browse files

Bugfix to set c->ls before the inital poll completes.

  • Loading branch information...
1 parent 0c37f03 commit b5e6af9ad30a6d07e1594f7617c995a038e917c8 @jeremycx committed Jan 29, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/LDAP.cc
View
6 src/LDAP.cc
@@ -805,7 +805,7 @@ class LDAPConnection : public ObjectWrap
if (c->ls) {
// there is a weird timing problem where a sync entry gets
// missed. Calling poll twice seems to make it work.
- // rc = ldap_sync_poll(c->ls);
+ int rc = ldap_sync_poll(c->ls);
}
// now check for any other pending messages....
@@ -939,10 +939,10 @@ class LDAPConnection : public ObjectWrap
ls->ls_ld = c->ld;
ls->ls_cookie = *(ber_bvstrdup(*cookie));
- ldap_sync_init(ls, LDAP_SYNC_REFRESH_AND_PERSIST);
-
c->ls = ls;
+ ldap_sync_init(ls, LDAP_SYNC_REFRESH_AND_PERSIST);
+
RETURN_INT(0);
}

0 comments on commit b5e6af9

Please sign in to comment.