diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-08-03 07:20:47 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-08-03 07:20:47 +0000 |
commit | 6c05bf3ede7d1f2dc2542837bdb4eb865927a80a (patch) | |
tree | 645137d53d95f44af4da27eb5cb549234488eea9 /nslcd/ldap-nss.c | |
parent | 82bc06ff7f234f2a4720ccbb08a5d20eb362a105 (diff) |
remove --enable-paged-results configure option and now always do runtime configuration, remove nss_paged_results configfile option and use pagesize option to specify usage of paging or not
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@340 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/ldap-nss.c')
-rw-r--r-- | nslcd/ldap-nss.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/nslcd/ldap-nss.c b/nslcd/ldap-nss.c index 0c5e561..a9530a8 100644 --- a/nslcd/ldap-nss.c +++ b/nslcd/ldap-nss.c @@ -116,6 +116,29 @@ static int __sigaction_retval = -1; static void (*__sigpipe_handler) (int) = SIG_DFL; #endif /* HAVE_SIGACTION */ +enum ldap_session_state +{ + LS_UNINITIALIZED = -1, + LS_INITIALIZED, + LS_CONNECTED_TO_DSA +}; + +/* + * convenient wrapper around pointer into global config list, and a + * connection to an LDAP server. + */ +struct ldap_session +{ + /* the connection */ + LDAP *ls_conn; + /* timestamp of last activity */ + time_t ls_timestamp; + /* has session been connected? */ + enum ldap_session_state ls_state; + /* index into ldc_uris: currently connected DSA */ + int ls_current_uri; +}; + /* * Global LDAP session. */ @@ -1804,7 +1827,7 @@ do_search (const char *base, int scope, log_log(LOG_DEBUG,"==> do_search"); #ifdef HAVE_LDAP_SEARCH_EXT - if (_nss_ldap_test_config_flag (NSS_LDAP_FLAGS_PAGED_RESULTS)) + if (nslcd_cfg->ldc_pagesize>0) { rc = ldap_create_page_control (__session.ls_conn, nslcd_cfg->ldc_pagesize, |