tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r479965 - /tomcat/connectors/trunk/jni/native/src/ssl.c
Date Tue, 28 Nov 2006 09:47:43 GMT
Author: mturk
Date: Tue Nov 28 01:47:42 2006
New Revision: 479965

URL: http://svn.apache.org/viewvc?view=rev&rev=479965
Log:
The AprLifecycleListener depend on the SSL.initialize
throwing exception. Make sure exception is thrown together
with error code returned.

Modified:
    tomcat/connectors/trunk/jni/native/src/ssl.c

Modified: tomcat/connectors/trunk/jni/native/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/src/ssl.c?view=diff&rev=479965&r1=479964&r2=479965
==============================================================================
--- tomcat/connectors/trunk/jni/native/src/ssl.c (original)
+++ tomcat/connectors/trunk/jni/native/src/ssl.c Tue Nov 28 01:47:42 2006
@@ -369,6 +369,7 @@
     UNREFERENCED(o);
     if (!tcn_global_pool) {
         TCN_FREE_CSTRING(engine);
+        tcn_ThrowAPRException(e, APR_EINVAL);
         return (jint)APR_EINVAL;
     }
     /* Check if already initialized */
@@ -378,6 +379,8 @@
     }
     if (SSLeay() < 0x0090700L) {
         TCN_FREE_CSTRING(engine);
+        tcn_ThrowAPRException(e, APR_EINVAL);
+        ssl_initialized = 0;
         return (jint)APR_EINVAL;
     }
     /* We must register the library in full, to ensure our configuration
@@ -418,6 +421,7 @@
         if (err != APR_SUCCESS) {
             TCN_FREE_CSTRING(engine);
             ssl_init_cleanup(NULL);
+            tcn_ThrowAPRException(e, err);
             return (jint)err;
         }
         tcn_ssl_engine = ee;
@@ -437,6 +441,7 @@
     if (r) {
         TCN_FREE_CSTRING(engine);
         ssl_init_cleanup(NULL);
+        tcn_ThrowAPRException(e, APR_ENOTIMPL);
         return APR_ENOTIMPL;
     }
     /*
@@ -820,8 +825,9 @@
 
 TCN_IMPLEMENT_CALL(jint, SSL, initialize)(TCN_STDARGS, jstring engine)
 {
-    UNREFERENCED_STDARGS;
+    UNREFERENCED(o);
     UNREFERENCED(engine);
+    tcn_ThrowAPRException(e, APR_ENOTIMPL);
     return (jint)APR_ENOTIMPL;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message