diff options
author | SVN Migration <svn@php.net> | 2004-07-15 19:41:24 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2004-07-15 19:41:24 +0000 |
commit | 2c1949d4e7fb4248c2a6b95b45094951c3607c8d (patch) | |
tree | c7de4f1a2b41f8bb9becab1b08ada0de6b6f75ba /ext/oci8/oci8.c | |
parent | 8091552925399dc7dbe4d5c47e1cc53f900bc670 (diff) | |
download | php-git-php-5.0.0.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_0_0'.php-5.0.0
Diffstat (limited to 'ext/oci8/oci8.c')
-rw-r--r-- | ext/oci8/oci8.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 597b177a49..04f697950e 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2673,13 +2673,13 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa smart_str_0(&hashed_details); if (!exclusive) { - mutex_lock(mx_lock); if (zend_ts_hash_find(persistent_sessions, hashed_details.c, hashed_details.len+1, (void **) &session_list) != SUCCESS) { zend_llist tmp; /* first session, set up a session list */ zend_llist_init(&tmp, sizeof(oci_session), (llist_dtor_func_t) _session_pcleanup, 1); zend_ts_hash_update(persistent_sessions, hashed_details.c, hashed_details.len+1, &tmp, sizeof(zend_llist), (void **) &session_list); } else { + mutex_lock(mx_lock); /* session list found, search for an idle session or an already opened session by the current thread */ session = zend_llist_get_first(session_list); @@ -2692,6 +2692,7 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa session->thread = thread_id(); } + mutex_unlock(mx_lock); } if (session) { @@ -2706,7 +2707,6 @@ static oci_session *_oci_open_session(oci_server* server,char *username,char *pa /* breakthru to open */ } } - mutex_unlock(mx_lock); } session = ecalloc(1,sizeof(oci_session)); |