Author: costin
Date: Wed Dec  8 19:07:41 2010
New Revision: 1043611

URL: http://svn.apache.org/viewvc?rev=1043611&view=rev
Log:
Javadoc for Poll.create() describes ENOTIMPL error if THREADSAFE is requested 
but not supported. 
The old code was silently removing THREADSAFE flag, java side wouldn't have any 
way to know if it 
needs to wait or can modify the poll set from a different thread.



Modified:
    tomcat/native/trunk/native/src/poll.c

Modified: tomcat/native/trunk/native/src/poll.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1043611&r1=1043610&r2=1043611&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/poll.c (original)
+++ tomcat/native/trunk/native/src/poll.c Wed Dec  8 19:07:41 2010
@@ -120,9 +120,9 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)(
     if (f & APR_POLLSET_THREADSAFE) {
         apr_status_t rv = apr_pollset_create(&pollset, (apr_uint32_t)size,
                                              p, f);
-        if (rv == APR_ENOTIMPL)
-            f &= ~APR_POLLSET_THREADSAFE;
-        else if (rv != APR_SUCCESS) {
+        // Pass the ENOTIMPL to java, as described in javadocs. Java must 
clean the
+        // flag, will know it's not supported.
+        if (rv != APR_SUCCESS) {
             tcn_ThrowAPRException(e, rv);
             goto cleanup;
         }



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

Reply via email to