Author: rjung Date: Wed Dec 12 09:20:09 2007 New Revision: 603677 URL: http://svn.apache.org/viewvc?rev=603677&view=rev Log: Clarify behaviour of jk_tcp_socket_recvfull() and jk_tcp_socket_sendfull().
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/native/common/jk_connect.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=603677&r1=603676&r2=603677&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Wed Dec 12 09:20:09 2007 @@ -959,6 +959,8 @@ /* We will invalidate the endpoint connection. */ rc = jk_tcp_socket_recvfull(ae->sd, head, AJP_HEADER_LEN, l); + /* If the return code is not negative */ + /* then we always get back the correct number of bytes. */ if (rc < 0) { ae->last_errno = errno; if (rc == JK_SOCKET_EOF) { @@ -1047,6 +1049,8 @@ /* If recvfull gets an error, it implicitely closes the socket. */ /* We will invalidate the endpoint connection. */ rc = jk_tcp_socket_recvfull(ae->sd, msg->buf, msglen, l); + /* If the return code is not negative */ + /* then we always get back the correct number of bytes. */ if (rc < 0) { ae->last_errno = errno; if (rc == JK_SOCKET_EOF) { Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?rev=603677&r1=603676&r2=603677&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Wed Dec 12 09:20:09 2007 @@ -705,7 +705,7 @@ * @return negative errno: write returns a fatal -1 (!WIN32) * negative pseudo errno: send returns SOCKET_ERROR (WIN32) * JK_SOCKET_EOF: no bytes could be sent - * >0: success, total size send + * >0: success, provided number of bytes send * @remark Always closes socket in case of error * @remark Cares about errno * @bug this fails on Unixes if len is too big for the underlying @@ -756,7 +756,7 @@ * @return negative errno: read returns a fatal -1 (!WIN32) * negative pseudo errno: recv returns SOCKET_ERROR (WIN32) * JK_SOCKET_EOF: no bytes could be read - * >0: success, total size received + * >0: success, requested number of bytes received * @remark Always closes socket in case of error * @remark Cares about errno */ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]