[svn:dbd-oracle] r14179 - dbd-oracle/branches/DRCP_1.25

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Sun Jun 20 11:28:18 2010
New Revision: 14179

Modified:
   dbd-oracle/branches/DRCP_1.25/dbdimp.c
   dbd-oracle/branches/DRCP_1.25/oci8.c

Log:
now compiles on 10 box.

Modified: dbd-oracle/branches/DRCP_1.25/dbdimp.c
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/dbdimp.c	(original)
+++ dbd-oracle/branches/DRCP_1.25/dbdimp.c	Sun Jun 20 11:28:18 2010
@@ -774,8 +774,6 @@
 				OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 				return 0;
 			}
-			OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
-				(ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
 
 			{
 				SV **sess_mode_type_sv;
@@ -847,9 +845,16 @@
 
 					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
 					OCIServerAttach_log_stat(imp_dbh, dbname,OCI_DEFAULT, status);
+
+					OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
+									(ub4) 0, OCI_ATTR_SERVER, imp_dbh->errhp, status);
+
 					OCIHandleAlloc_ok(imp_dbh->envhp, &imp_dbh->seshp, OCI_HTYPE_SESSION, status);
+
 					cred_type = ora_parse_uid(imp_dbh, &uid, &pwd);
+
 					OCISessionBegin_log_stat( imp_dbh->svchp, imp_dbh->errhp, imp_dbh->seshp,cred_type, sess_mode_type, status);
+
 					if (status == OCI_SUCCESS_WITH_INFO) {
 						/* eg ORA-28011: the account will expire soon; change your password now */
 						oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
@@ -858,7 +863,7 @@
 					if (status != OCI_SUCCESS) {
 						oci_error(dbh, imp_dbh->errhp, status, "OCISessionBegin");
 						OCIServerDetach_log_stat(imp_dbh->srvhp, imp_dbh->errhp, OCI_DEFAULT, status);
-						OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
+						OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
 						OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
 						OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 						OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
@@ -866,7 +871,7 @@
 					}
 
 					OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
-								imp_dbh->authp, (ub4) 0,(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+								imp_dbh->seshp, (ub4) 0,(ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
 #ifdef ORA_OCI_112
 				}
 #endif
@@ -1052,16 +1057,20 @@
 #endif
 
 	if (refcnt == 1) {
-	if (DBIc_ACTIVE(imp_dbh))
-		dbd_db_disconnect(dbh, imp_dbh);
-	if (is_extproc)
-		goto dbd_db_destroy_out;
-	if (!imp_dbh->proc_handles)
-	{	sword status;
-		OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
-		OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
-		OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
-	}
+		if (DBIc_ACTIVE(imp_dbh))
+			dbd_db_disconnect(dbh, imp_dbh);
+		if (is_extproc)
+			goto dbd_db_destroy_out;
+		if (!imp_dbh->proc_handles)	{
+			sword status;
+#ifdef ORA_OCI_112
+			OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
+#else
+			OCIHandleFree_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,status);
+#endif
+			OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
+			OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
+		}
 	}
 	OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR,  status);
 dbd_db_destroy_out:

Modified: dbd-oracle/branches/DRCP_1.25/oci8.c
==============================================================================
--- dbd-oracle/branches/DRCP_1.25/oci8.c	(original)
+++ dbd-oracle/branches/DRCP_1.25/oci8.c	Sun Jun 20 11:28:18 2010
@@ -412,8 +412,9 @@
 	SV *sv;
 	switch (attr) {
 	/*=============================Attribute Types===============================*/
-
+#ifdef ORA_OCI_112
     case OCI_ATTR_PURITY:				return "OCI_ATTR_PURITY"; /* for DRCP session purity */
+#endif
 	case OCI_ATTR_FNCODE:				return "OCI_ATTR_FNCODE";		/* the OCI function code */
 	case OCI_ATTR_OBJECT:				return "OCI_ATTR_OBJECT"; /* is the environment initialized in object mode */
 	case OCI_ATTR_NONBLOCKING_MODE:		return "OCI_ATTR_NONBLOCKING_MODE";		/* non blocking mode */
@@ -3875,7 +3876,7 @@
 	if (**uidp == '\0' && **pwdp == '\0') {
 		return OCI_CRED_EXT;
 	}
-
+#ifdef ORA_OCI_112
     if (imp_dbh->using_drcp){
 		OCIAttrSet_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,
 			*uidp, strlen(*uidp),
@@ -3886,6 +3887,7 @@
 			(ub4) OCI_ATTR_PASSWORD, imp_dbh->errhp, status);
 	}
 	else {
+#endif
 		OCIAttrSet_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,
 				*uidp, strlen(*uidp),
 				(ub4) OCI_ATTR_USERNAME, imp_dbh->errhp, status);
@@ -3893,7 +3895,9 @@
 		OCIAttrSet_log_stat(imp_dbh->seshp, OCI_HTYPE_SESSION,
 				(strlen(*pwdp)) ? *pwdp : NULL, strlen(*pwdp),
 			(ub4) OCI_ATTR_PASSWORD, imp_dbh->errhp, status);
+#ifdef ORA_OCI_112
 	}
+#endif
 	return OCI_CRED_RDBMS;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.