Skip to content

Commit

Permalink
Moved var declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycx committed Jan 4, 2013
1 parent 27e4a9a commit cd34837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LDAP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,12 @@ class LDAPConnection : public ObjectWrap
THROW("Error init LDAP");
}

struct timeval ntimeout = { timeout, 0 };

if (timeout != -1) {
ntimeout.tv_sec = timeout;
}

struct timeval ntimeout = { timeout, 0 };
ldap_set_option(c->ld, LDAP_OPT_NETWORK_TIMEOUT, &ntimeout);

ldap_set_option(c->ld, LDAP_OPT_RESTART, LDAP_OPT_ON);
Expand Down

0 comments on commit cd34837

Please sign in to comment.