diff options
| author | Sreedhar Chalamalasetti - Sun Microsystems - Bangalore India <Sreedhar.Chalamalasetti@Sun.COM> | 2009-06-22 17:48:42 -0700 |
|---|---|---|
| committer | Sreedhar Chalamalasetti - Sun Microsystems - Bangalore India <Sreedhar.Chalamalasetti@Sun.COM> | 2009-06-22 17:48:42 -0700 |
| commit | ead6eed0d0425a9cbdc1926b8310c21d6db6478d (patch) | |
| tree | 5252ebe9caed72ef81488e57a60d18b5c18a8600 /usr/src/lib/libsldap | |
| parent | 7c9e7ed05a9e15467029d9a41f891a25e989426d (diff) | |
| download | illumos-joyent-ead6eed0d0425a9cbdc1926b8310c21d6db6478d.tar.gz | |
6836462 nscd spinlock seen when authenticating via ldap
Diffstat (limited to 'usr/src/lib/libsldap')
| -rw-r--r-- | usr/src/lib/libsldap/common/ns_reads.c | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/usr/src/lib/libsldap/common/ns_reads.c b/usr/src/lib/libsldap/common/ns_reads.c index 7b65cd986b..103bf9ce2c 100644 --- a/usr/src/lib/libsldap/common/ns_reads.c +++ b/usr/src/lib/libsldap/common/ns_reads.c @@ -2392,17 +2392,33 @@ search_state_machine(ns_ldap_cookie_t *cookie, ns_state_t state, int cycle) } } else if ((rc == LDAP_CONNECT_ERROR || rc == LDAP_SERVER_DOWN) && - cookie->conn_user != NULL && - cookie->reinit_on_retriable_err) { - /* - * MT connection not usable, - * close it before REINIT. - * rc has already been saved - * in cookie->err_rc above. - */ - __s_api_conn_mt_close( - cookie->conn_user, - rc, &cookie->errorp); + cookie->conn_user != NULL) { + if (cookie-> + reinit_on_retriable_err) { + /* + * MT connection not + * usable, close it + * before REINIT. + * rc has already + * been saved in + * cookie->err_rc above. + */ + __s_api_conn_mt_close( + cookie->conn_user, + rc, + &cookie->errorp); + } else { + /* + * MT connection not + * usable, close it in + * the LDAP_ERROR state. + * A retry will be done + * next if allowed. + */ + cookie->err_rc = rc; + cookie->new_state = + LDAP_ERROR; + } } break; } |
