cvs: /php4/ext/oci8 oci8.c php_oci8.h

From: Date: Mon, 06 Mar 2000 08:02:46 +0000
Subject: cvs: /php4/ext/oci8 oci8.c php_oci8.h
Groups: php.version4 
Request: Send a blank email to php-version4+get-11560@lists.php.net to get a copy of this message
thies Mon Mar 6 00:02:46 2000 EDT Modified files: /php4/ext/oci8 oci8.c php_oci8.h Log: @- OCINLogon() sessions are now closed again. (Thies) # happy hacking in hongkong! Index: php4/ext/oci8/oci8.c diff -u php4/ext/oci8/oci8.c:1.62 php4/ext/oci8/oci8.c:1.63 --- php4/ext/oci8/oci8.c:1.62 Thu Mar 2 17:28:27 2000 +++ php4/ext/oci8/oci8.c Mon Mar 6 00:02:15 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.62 2000/03/03 01:28:27 jymartin Exp $ */ +/* $Id: oci8.c,v 1.63 2000/03/06 08:02:15 thies Exp $ */ /* TODO list: * @@ -647,6 +647,12 @@ oci_debug("START _oci_conn_list_dtor: id=%d",connection->id); + if (connection->session->exclusive) { + /* exclusive connection created via OCINLogon() close their + associated session when destructed */ + zend_list_delete(connection->session->num); + } + if (connection->pServiceContext) { /* connection->error = @@ -1843,6 +1849,7 @@ session->persistent = persistent; session->hashed_details = hashed_details; session->server = server; + session->exclusive = exclusive; /* allocate temporary Service Context */ OCI(error) = @@ -1924,12 +1931,6 @@ if (exclusive) { psession = session; - /* - zend_hash_next_index_insert(OCI(user), - (void *)session, - sizeof(oci_session), - (void**)&psession); - */ } else { zend_hash_update(OCI(user), session->hashed_details, @@ -1944,7 +1945,7 @@ oci_debug("_oci_open_session new sess=%d user=%s",psession->num,username); - free(session); + if (! exclusive) free(session); return psession; Index: php4/ext/oci8/php_oci8.h diff -u php4/ext/oci8/php_oci8.h:1.7 php4/ext/oci8/php_oci8.h:1.8 --- php4/ext/oci8/php_oci8.h:1.7 Thu Mar 2 17:28:27 2000 +++ php4/ext/oci8/php_oci8.h Mon Mar 6 00:02:15 2000 @@ -70,6 +70,7 @@ int num; int persistent; int open; + int exclusive; char *hashed_details; oci_server *server; OCISession *pSession;

« previous php.version4 (#11560) next »