summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2000-08-05 10:07:39 +0000
committerThies C. Arntzen <thies@php.net>2000-08-05 10:07:39 +0000
commit34dfe582ff740c207da14afdc18c678a102e578e (patch)
tree55bd900ad3bd50f690a7253b4d617c4beb5f5945
parent282288efe42d82bd85cdbea60bd6cf524f6d991a (diff)
downloadphp-git-34dfe582ff740c207da14afdc18c678a102e578e.tar.gz
@- OCIError() would sometimes not report failed connections. (Thies)
-rw-r--r--ext/oci8/oci8.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 56b91fb717..739da224e7 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2163,14 +2163,16 @@ static void
_oci_close_server(oci_server *server)
{
char *dbname;
+ int oldopen;
OCILS_FETCH();
ELS_FETCH();
+ oldopen = server->open;
server->open = 2;
-
if (! OCI(shutdown)) {
zend_hash_apply(&EG(regular_list),_oci_session_cleanup);
}
+ server->open = oldopen;
oci_debug("START _oci_close_server: detaching conn=%d dbname=%s",server->num,server->dbname);
@@ -2178,19 +2180,11 @@ _oci_close_server(oci_server *server)
if (server->open) {
if (server->pServer && OCI(pError)) {
-#if 0 && APACHE
- void (*handler) (int);
- handler = signal(SIGCHLD, SIG_DFL);
-#endif
OCI(error) =
OCIServerDetach(server->pServer,
OCI(pError),
OCI_DEFAULT);
-#if 0 && APACHE
- signal(SIGCHLD,handler);
-#endif
-
if (OCI(error)) {
oci_error(OCI(pError), "oci_close_server OCIServerDetach", OCI(error));
}