diff options
author | gokhale <asgokhale@users.noreply.github.com> | 1997-06-27 19:32:23 +0000 |
---|---|---|
committer | gokhale <asgokhale@users.noreply.github.com> | 1997-06-27 19:32:23 +0000 |
commit | 6b32acfdc1b9a4880572843933418998d62503eb (patch) | |
tree | c74744c2b9f2e0598ef0ed7605b27a312bd52cac /TAO | |
parent | 1068ab5b789aa8afe4b287f5af638dcc090922b2 (diff) | |
download | ATCD-6b32acfdc1b9a4880572843933418998d62503eb.tar.gz |
DEEP_FREE had some errors. Fixed.
Added dependency on the Makefile.
Constructor/destructor of Any was not using the optimizations. Error
is now fixed.
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/IIOP/lib/any.cpp | 11 | ||||
-rw-r--r-- | TAO/IIOP/lib/cdr.h | 2 | ||||
-rw-r--r-- | TAO/IIOP/lib/connect.cpp | 10 | ||||
-rw-r--r-- | TAO/IIOP/lib/deep_copy.cpp | 2 | ||||
-rw-r--r-- | TAO/IIOP/lib/deep_free.cpp | 16 | ||||
-rw-r--r-- | TAO/IIOP/lib/factories.cpp | 10 | ||||
-rw-r--r-- | TAO/IIOP/lib/marshal.h | 16 |
7 files changed, 49 insertions, 18 deletions
diff --git a/TAO/IIOP/lib/any.cpp b/TAO/IIOP/lib/any.cpp index 1c2c02eae12..23a61fefcf6 100644 --- a/TAO/IIOP/lib/any.cpp +++ b/TAO/IIOP/lib/any.cpp @@ -37,6 +37,7 @@ #include <string.h> #include "orb.h" +#include "cdr.h" #include <initguid.h> @@ -318,11 +319,15 @@ CORBA_Any::CORBA_Any (const CORBA_Any &src) size = _type->size (env); // XXX check error status _value = (char *) calloc (1, size); +#if 0 (void) _type->traverse (src._value, _value, (CORBA_TypeCode::VisitRoutine) deep_copy, 0, env); +#endif // replaced by our optimizations + + (void) DEEP_COPY(_type, src._value, _value, env); } // Helper routine for "Any" destructor. @@ -469,7 +474,8 @@ CORBA_Any::~CORBA_Any (void) if (_orb_owns_data) { - (void) deep_free (_type, _value, 0, 0, env); + // (void) deep_free (_type, _value, 0, 0, env); + DEEP_FREE(_type, _value, 0, env); delete _value; } @@ -487,7 +493,8 @@ CORBA_Any::replace (CORBA_TypeCode_ptr tc, { if (_orb_owns_data) { - (void) deep_free (_type, _value, 0, 0, env); + // (void) deep_free (_type, _value, 0, 0, env); + DEEP_FREE(_type, _value, 0, env); delete _value; } diff --git a/TAO/IIOP/lib/cdr.h b/TAO/IIOP/lib/cdr.h index 9072fcce750..1bd562aa988 100644 --- a/TAO/IIOP/lib/cdr.h +++ b/TAO/IIOP/lib/cdr.h @@ -262,6 +262,7 @@ struct ACE_Svc_Export CDR CORBA_Environment &env); // Unmarshaling interpreter ... <context> really points to a <CDR>. +#if 0 CORBA_TypeCode::traverse_status deep_copy (CORBA_TypeCode_ptr tc, const void *data, const void *data2, @@ -273,6 +274,7 @@ struct ACE_Svc_Export CDR const void *data2, CORBA_Environment &env); // Deallocates memory for hierarchical data structures +#endif CDR (u_char *buf = 0, u_int len = 0, diff --git a/TAO/IIOP/lib/connect.cpp b/TAO/IIOP/lib/connect.cpp index 613f25af9be..9d395f0cfd8 100644 --- a/TAO/IIOP/lib/connect.cpp +++ b/TAO/IIOP/lib/connect.cpp @@ -21,6 +21,16 @@ TAO_OA_Connection_Handler::open (void*) if (this->peer ().get_remote_addr (addr) == -1) return -1; + const int MAX_SOCK_BUF_SIZE = 65536; + if (this->peer ().set_option(SOL_SOCKET, SO_SNDBUF, (void + *)&MAX_SOCK_BUF_SIZE, + sizeof (MAX_SOCK_BUF_SIZE)) == -1) + return -1; + if (this->peer ().set_option(SOL_SOCKET, SO_RCVBUF, (void + *)&MAX_SOCK_BUF_SIZE, + sizeof(MAX_SOCK_BUF_SIZE)) == -1) + return -1; + ACE_DEBUG ((LM_DEBUG, " (%P|%t) %sconnection from client %s\n", params_->using_threads () ? "threaded " : "", diff --git a/TAO/IIOP/lib/deep_copy.cpp b/TAO/IIOP/lib/deep_copy.cpp index 4bd71c70eea..081c5da839f 100644 --- a/TAO/IIOP/lib/deep_copy.cpp +++ b/TAO/IIOP/lib/deep_copy.cpp @@ -53,7 +53,7 @@ extern CORBA_TypeCode TC_opaque; // -static CORBA_TypeCode::traverse_status +CORBA_TypeCode::traverse_status DEEP_COPY( CORBA_TypeCode_ptr param, const void *source, diff --git a/TAO/IIOP/lib/deep_free.cpp b/TAO/IIOP/lib/deep_free.cpp index f451154b821..2207f7fe2d9 100644 --- a/TAO/IIOP/lib/deep_free.cpp +++ b/TAO/IIOP/lib/deep_free.cpp @@ -55,7 +55,7 @@ extern CORBA_TypeCode TC_opaque; // -static CORBA_TypeCode::traverse_status +CORBA_TypeCode::traverse_status DEEP_FREE( CORBA_TypeCode_ptr param, const void *source, @@ -69,34 +69,20 @@ DEEP_FREE( { case tk_null: case tk_void: - break; case tk_short: case tk_ushort: - *(CORBA_Short *)dest = *(CORBA_Short *)source; - break; case tk_long: case tk_ulong: case tk_float: case tk_enum: - *(CORBA_Long *)dest = *(CORBA_Long *)source; - break; case tk_double: case tk_longlong: case tk_ulonglong: - *(CORBA_LongLong *)dest = *(CORBA_LongLong *)source; - break; case tk_boolean: - *(CORBA_Boolean *)dest = *(CORBA_Boolean *)source; - break; case tk_char: case tk_octet: - *(CORBA_Char *)dest = *(CORBA_Char *)source; - break; case tk_longdouble: - *(CORBA_LongDouble *)dest = *(CORBA_LongDouble *)source; - break; case tk_wchar: - *(CORBA_WChar *)dest = *(CORBA_WChar *)source; break; case tk_any: retval = TAO_Marshal_Any::deep_free(param, source, dest, env); diff --git a/TAO/IIOP/lib/factories.cpp b/TAO/IIOP/lib/factories.cpp index 93b46e84fe0..e193871cbfb 100644 --- a/TAO/IIOP/lib/factories.cpp +++ b/TAO/IIOP/lib/factories.cpp @@ -25,6 +25,16 @@ TAO_Client_Connection_Handler::open(void *) { // Here is where we could enable all sorts of things such as // nonblock I/O, sock buf sizes, TCP no-delay, etc. + + const int MAX_SOCK_BUF_SIZE = 65536; + if (this->peer ().set_option(SOL_SOCKET, SO_SNDBUF, (void + *)&MAX_SOCK_BUF_SIZE, + sizeof(MAX_SOCK_BUF_SIZE)) == -1) + return -1; + if (this->peer ().set_option(SOL_SOCKET, SO_RCVBUF, (void + *)&MAX_SOCK_BUF_SIZE, + sizeof (MAX_SOCK_BUF_SIZE)) == -1) + return -1; // For now, we just return success return 0; diff --git a/TAO/IIOP/lib/marshal.h b/TAO/IIOP/lib/marshal.h index 8c1714488eb..060285b61d5 100644 --- a/TAO/IIOP/lib/marshal.h +++ b/TAO/IIOP/lib/marshal.h @@ -22,6 +22,22 @@ #include "ace/Synch.h" #include "ace/Singleton.h" +CORBA_TypeCode::traverse_status +DEEP_COPY( + CORBA_TypeCode_ptr param, + const void *source, + const void *dest, + CORBA_Environment &env + ); + +CORBA_TypeCode::traverse_status +DEEP_FREE( + CORBA_TypeCode_ptr param, + const void *source, + const void *dest, + CORBA_Environment &env + ); + class TAO_MarshalObject; class TAO_Marshal_Primitive; class TAO_Marshal_Any; |