Author: tabish
Date: Tue May 11 22:50:37 2010
New Revision: 943322
URL: http://svn.apache.org/viewvc?rev=943322&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQCPP-140
Work on the OpenSSLSocket class.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp?rev=943322&r1=943321&r2=943322&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp
(original)
+++
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/net/ssl/openssl/OpenSSLSocket.cpp
Tue May 11 22:50:37 2010
@@ -25,6 +25,7 @@
#include <decaf/io/IOException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
#include <decaf/lang/exceptions/IndexOutOfBoundsException.h>
+#include <decaf/internal/net/ssl/openssl/OpenSSLSocketException.h>
using namespace decaf;
using namespace decaf::lang;
@@ -194,9 +195,9 @@ int OpenSSLSocket::read( unsigned char*
}
// Read data from the socket.
- int result = SSL_read( ssl, buffer, bufferSize );
+ int result = SSL_read( this->data->ssl, buffer + offset, length );
- switch( SSL_get_error( ssl, result ) ) {
+ switch( SSL_get_error( this->data->ssl, result ) ) {
case SSL_ERROR_NONE:
return result;
case SSL_ERROR_ZERO_RETURN:
@@ -254,9 +255,9 @@ void OpenSSLSocket::write( const unsigne
while( remaining > 0 && !isClosed() ) {
- int written = SSL_write( ssl, buffer + offset, remaining );
+ int written = SSL_write( this->data->ssl, buffer + offset,
remaining );
- switch( SSL_get_error( ssl, written ) ) {
+ switch( SSL_get_error( this->data->ssl, written ) ) {
case SSL_ERROR_NONE:
offset += written;
remaining -= written;