Author: rjung Date: Mon Nov 2 23:23:20 2009 New Revision: 832187 URL: http://svn.apache.org/viewvc?rev=832187&view=rev Log: Align tcnative native and Java method names.
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/File.java tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Registry.java tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Socket.java tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Stdlib.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Mon Nov 2 23:23:20 2009 @@ -229,35 +229,6 @@ 0: jim -1: -* Align native and Java method names. - Port/backport from trunk, TC5.5.x, tc4.1.x and tcnative (trunk and 1.1.x) - http://svn.apache.org/viewvc?rev=815748&view=rev - http://svn.apache.org/viewvc?rev=815768&view=rev - http://svn.apache.org/viewvc?rev=706574&view=rev - Plus the last hunk for Socket.java in - https://issues.apache.org/bugzilla/attachment.cgi?id=24276 - +1: rjung, markt, fhanik - -1: - +1: kkolinko:( - Should be applied when tc-native 1.1.17 is released, - because of native method names and argument types changes. - - We will need to update minimum required version - (in o.a.c.core.AprLifecycleListener, o.a.c.connector.Connector). - - Also, attachment.cgi?id=24276 looks like a wrong patch to vote. - It is a documentation patch. There is no need to vote for it. And it is - not for Socket.java. - ) - rjung: Note that java/org/apache/tomcat/jni/Buffer.java - is missing in TC 6. Don't know, whether we should add it. - It is in 5.5, trunk and tcnative 1.1. - markt: Happy either way with slight preference for adding it - kkolinko: Either way is OK, but, as I cannot find any usages of Buffer - methods neither in TC 5.5 nor in trunk, I would prefer to remove this - class at least from trunk, but better from both, and even from native - side. - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47267 http://svn.apache.org/viewvc?rev=817822&view=rev +1: markt Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/File.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/File.java?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/File.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/File.java Mon Nov 2 23:23:20 2009 @@ -693,6 +693,16 @@ public static native int stat(FileInfo finfo, String fname, int wanted, long pool); /** + * Get the specified file's stats. The file is specified by filename, + * instead of using a pre-opened file. + * @param fname The name of the file to stat. + * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values + * @param pool the pool to use to allocate the new file. + * @return FileInfo object. + */ + public static native FileInfo getStat(String fname, int wanted, long pool); + + /** * Get the specified file's stats. * @param finfo Where to store the information about the file. * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values @@ -700,4 +710,13 @@ */ public static native int infoGet(FileInfo finfo, int wanted, long thefile); + + /** + * Get the specified file's stats. + * @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values + * @param thefile The file to get information about. + * @return FileInfo object. + */ + public static native FileInfo getInfo(int wanted, long thefile); + } Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Registry.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Registry.java?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Registry.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Registry.java Mon Nov 2 23:23:20 2009 @@ -158,7 +158,7 @@ * @param val The the value to set * @return If the function succeeds, the return value is 0 */ - public static native int setValueJ(long key, String name, int val); + public static native int setValueJ(long key, String name, long val); /** * Set the Registry value for REG_SZ Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java Mon Nov 2 23:23:20 2009 @@ -226,6 +226,13 @@ throws Exception; /** + * Set file for randomness + * @param ctx Server or Client context to use. + * @param file random file. + */ + public static native void setRandom(long ctx, String file); + + /** * Set SSL connection shutdown type * <br /> * The following levels are available for level: @@ -237,7 +244,7 @@ * @param ctx Server or Client context to use. * @param type Shutdown type to use. */ - public static native void setShutdowType(long ctx, int type); + public static native void setShutdownType(long ctx, int type); /** * Set Type of Client Certificate verification and Maximum depth of CA Certificates Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Socket.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Socket.java?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Socket.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Socket.java Mon Nov 2 23:23:20 2009 @@ -170,6 +170,16 @@ * made the connection request. This is the socket which should * be used for all future communication. */ + public static native long acceptx(long sock, long pool) + throws Exception; + + /** + * Accept a new connection request + * @param sock The socket we are listening on. + * @return A copy of the socket that is connected to the socket that + * made the connection request. This is the socket which should + * be used for all future communication. + */ public static native long accept(long sock) throws Exception; @@ -387,7 +397,7 @@ * @param nbytes The number of bytes to read (-1) for full array. * @return the number of bytes received. */ - public static native int recvFrom(long from, long sock, int flags, + public static native int recvfrom(long from, long sock, int flags, byte[] buf, int offset, int nbytes); /** Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Stdlib.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Stdlib.java?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Stdlib.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/Stdlib.java Mon Nov 2 23:23:20 2009 @@ -67,7 +67,7 @@ * @param num Number of elements. * @param sz Length in bytes of each element. */ - public static native long calloc(long num, int sz); + public static native long calloc(int num, int sz); /** * Deallocates or frees a memory block. Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=832187&r1=832186&r2=832187&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Nov 2 23:23:20 2009 @@ -223,6 +223,9 @@ </subsection> <subsection name="Coyote"> <changelog> + <fix> + Align tcnative native and Java method names. (rjung) + </fix> <update>Dont report thread count from connector if an external executor is used.</update> <fix> <bug>39637</bug>: Enable the AJP connectors to correctly handle client --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org