Skip to content

Instantly share code, notes, and snippets.

@kubo
Created June 18, 2011 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubo/1032764 to your computer and use it in GitHub Desktop.
Save kubo/1032764 to your computer and use it in GitHub Desktop.
Index: ext/oci8/oci8.c
===================================================================
--- ext/oci8/oci8.c (revision 428)
+++ ext/oci8/oci8.c (working copy)
@@ -219,7 +219,7 @@
VALUE vmode;
oci8_svcctx_t *svcctx = DATA_PTR(self);
sword rv;
- enum logon_type_t logon_type = T_IMPLICIT;
+ enum logon_type_t logon_type = T_EXPLICIT;
ub4 cred = OCI_CRED_RDBMS;
ub4 mode = OCI_DEFAULT;
OCISvcCtx *svchp = NULL;
@@ -303,7 +303,7 @@
/* begin session. */
rv = OCISessionBegin_nb(svcctx, svcctx->base.hp.ptr, oci8_errhp, svcctx->authhp, cred, mode);
- if (rv != OCI_SUCCESS)
+ if (IS_OCI_ERROR(rv))
oci8_raise(oci8_errhp, rv, NULL);
oci_lc(OCIAttrSet(svcctx->base.hp.ptr, OCI_HTYPE_SVCCTX, svcctx->authhp, 0, OCI_ATTR_SESSION, oci8_errhp));
svcctx->logon_type = T_EXPLICIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment