#include <ac/signal.h>
#include <ac/string.h>
#include <ac/time.h>
+#include <ac/unistd.h>
#include "ldap_pvt.h"
#include "lutil.h"
assert( c->c_conn_state != SLAP_C_INVALID );
assert( sd != AC_SOCKET_INVALID );
- c->c_activitytime = slap_get_time();
+#ifdef SLAPD_MONITOR
+ c->c_activitytime = slap_get_time();
+#else
+ if( global_idletimeout > 0 ) {
+ c->c_activitytime = slap_get_time();
+ }
+#endif
}
return c;
c->c_authmech = NULL;
c->c_dn = NULL;
c->c_cdn = NULL;
+ c->c_groups = NULL;
c->c_listener_url = NULL;
c->c_peer_domain = NULL;
assert( c->c_authmech == NULL );
assert( c->c_dn == NULL );
assert( c->c_cdn == NULL );
+ assert( c->c_groups == NULL );
assert( c->c_listener_url == NULL );
assert( c->c_peer_domain == NULL );
assert( c->c_peer_name == NULL );
/* set to zero until bind, implies LDAP_VERSION3 */
c->c_protocol = 0;
- c->c_activitytime = c->c_starttime = slap_get_time();
+#ifdef SLAPD_MONITOR
+ c->c_activitytime = c->c_starttime = slap_get_time();
+#else
+ if( global_idletimeout > 0 ) {
+ c->c_activitytime = c->c_starttime = slap_get_time();
+ }
+#endif
#ifdef LDAP_CONNECTIONLESS
c->c_is_udp = 0;
c->c_authc_backend = NULL;
c->c_authz_backend = NULL;
+
+ {
+ GroupAssertion *g, *n;
+ for (g = c->c_groups; g; g=n)
+ {
+ n = g->next;
+ free(g);
+ }
+ c->c_groups = NULL;
+ }
+
}
static void
if ( c->c_is_tls && c->c_needs_tls_accept ) {
rc = ldap_pvt_tls_accept( c->c_sb, NULL );
if ( rc < 0 ) {
+#if 0 /* required by next #if 0 */
struct timeval tv;
fd_set rfd;
+#endif
#ifdef NEW_LOGGING
LDAP_LOG(( "connection", LDAP_LEVEL_ERR,