Skip to content

Commit

Permalink
Bugfix to set c->ls before the inital poll completes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycx committed Jan 29, 2013
1 parent 0c37f03 commit b5e6af9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LDAP.cc
Expand Up @@ -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....
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit b5e6af9

Please sign in to comment.