int async)
{
int rc, err;
- struct timeval tv = { 0 },
- *opt_tv = NULL;
+ struct timeval tv, *opt_tv = NULL;
#ifdef LDAP_CONNECTIONLESS
/* We could do a connect() but that would interfere with
return ( 0 );
}
#endif
- opt_tv = ld->ld_options.ldo_tm_net;
- if ( opt_tv != NULL ) {
- tv = *opt_tv;
+ if ( ld->ld_options.ldo_tm_net.tv_sec >= 0 ) {
+ tv = ld->ld_options.ldo_tm_net;
+ opt_tv = &tv;
}
osip_debug(ld, "ldap_pvt_connect: fd: %d tm: %ld async: %d\n",