diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 16 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 16 | ||||
-rw-r--r-- | ace/Malloc_T.cpp | 4 | ||||
-rw-r--r-- | ace/Process_Mutex.cpp | 1 | ||||
-rw-r--r-- | ace/SOCK_Dgram_Bcast.cpp | 3 | ||||
-rw-r--r-- | ace/Service_Object.cpp | 15 | ||||
-rw-r--r-- | ace/Service_Object.i | 9 | ||||
-rw-r--r-- | ace/TLI_Acceptor.cpp | 1 | ||||
-rw-r--r-- | ace/TLI_Connector.cpp | 33 | ||||
-rw-r--r-- | ace/TLI_Stream.cpp | 144 | ||||
-rw-r--r-- | ace/TLI_Stream.i | 127 |
12 files changed, 216 insertions, 169 deletions
diff --git a/ChangeLog b/ChangeLog index 8d5524ee35f..9d4f4470392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Thu May 2 00:29:34 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/TLI_Stream: Uninlined a methods that needed access to the + ACE class. + + * ace/Service_Object: Uninlined ACE_Service_Type::name(). + + * ace/Malloc_T.cpp: + * ace/Process_Mutex.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.cpp: + * ace/TLI_Stream.cpp: + + Added #include "ace/ACE.h". + Wed May 1 21:07:23 2002 Ossama Othman <ossama@uci.edu> * ace/config-win32-msvc-6.h: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 8d5524ee35f..9d4f4470392 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,19 @@ +Thu May 2 00:29:34 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/TLI_Stream: Uninlined a methods that needed access to the + ACE class. + + * ace/Service_Object: Uninlined ACE_Service_Type::name(). + + * ace/Malloc_T.cpp: + * ace/Process_Mutex.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.cpp: + * ace/TLI_Stream.cpp: + + Added #include "ace/ACE.h". + Wed May 1 21:07:23 2002 Ossama Othman <ossama@uci.edu> * ace/config-win32-msvc-6.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 8d5524ee35f..9d4f4470392 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,19 @@ +Thu May 2 00:29:34 2002 Irfan Pyarali <irfan@cs.wustl.edu> + + * ace/TLI_Stream: Uninlined a methods that needed access to the + ACE class. + + * ace/Service_Object: Uninlined ACE_Service_Type::name(). + + * ace/Malloc_T.cpp: + * ace/Process_Mutex.cpp: + * ace/SOCK_Dgram_Bcast.cpp: + * ace/TLI_Acceptor.cpp: + * ace/TLI_Connector.cpp: + * ace/TLI_Stream.cpp: + + Added #include "ace/ACE.h". + Wed May 1 21:07:23 2002 Ossama Othman <ossama@uci.edu> * ace/config-win32-msvc-6.h: diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index a5ce3677ea1..5af3b5c8ebc 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -14,6 +14,8 @@ #include "ace/Malloc_T.i" #endif /* __ACE_INLINE__ */ +#include "ace/ACE.h" + ACE_RCSID(ace, Malloc_T, "$Id$") template <class T, class ACE_LOCK> @@ -42,7 +44,7 @@ ACE_Cached_Allocator<T, ACE_LOCK>::~ACE_Cached_Allocator (void) } template <class ACE_LOCK> -ACE_Dynamic_Cached_Allocator<ACE_LOCK>::ACE_Dynamic_Cached_Allocator +ACE_Dynamic_Cached_Allocator<ACE_LOCK>::ACE_Dynamic_Cached_Allocator (size_t n_chunks, size_t chunk_size) : pool_ (0), free_list_ (ACE_PURE_FREE_LIST), diff --git a/ace/Process_Mutex.cpp b/ace/Process_Mutex.cpp index 3930903967c..b8dd17ed7a4 100644 --- a/ace/Process_Mutex.cpp +++ b/ace/Process_Mutex.cpp @@ -3,6 +3,7 @@ #include "ace/Process_Mutex.h" #include "ace/Synch.h" #include "ace/Log_Msg.h" +#include "ace/ACE.h" #if !defined (__ACE_INLINE__) #include "ace/Process_Mutex.inl" diff --git a/ace/SOCK_Dgram_Bcast.cpp b/ace/SOCK_Dgram_Bcast.cpp index e819e798555..dae2953bd35 100644 --- a/ace/SOCK_Dgram_Bcast.cpp +++ b/ace/SOCK_Dgram_Bcast.cpp @@ -2,6 +2,7 @@ #include "ace/SOCK_Dgram_Bcast.h" #include "ace/Log_Msg.h" +#include "ace/ACE.h" #if defined (ACE_LACKS_INLINE_FUNCTIONS) #include "ace/SOCK_Dgram_Bcast.i" @@ -159,7 +160,7 @@ ACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name) n--, ((ifr->ifr_addr.sa_len <= sizeof (struct sockaddr)) ? ifr++ : - ifr = (struct ifreq *) + ifr = (struct ifreq *) (ifr->ifr_addr.sa_len + (caddr_t) &ifr->ifr_addr))) #endif /* CHORUS_4 */ { diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp index c5dfa7ce240..63decf4e9b3 100644 --- a/ace/Service_Object.cpp +++ b/ace/Service_Object.cpp @@ -19,9 +19,9 @@ ACE_Service_Type::dump (void) const } ACE_Service_Type::ACE_Service_Type (const ACE_TCHAR *n, - ACE_Service_Type_Impl *t, - const ACE_SHLIB_HANDLE h, - int active) + ACE_Service_Type_Impl *t, + const ACE_SHLIB_HANDLE h, + int active) : name_ (0), type_ (t), handle_ (h), @@ -94,3 +94,12 @@ ACE_Service_Object::resume (void) ACE_TRACE ("ACE_Service_Object::resume"); return 0; } + +void +ACE_Service_Type::name (const ACE_TCHAR *n) +{ + ACE_TRACE ("ACE_Service_Type::name"); + + delete [] (ACE_TCHAR *) this->name_; + this->name_ = ACE::strnew (n); +} diff --git a/ace/Service_Object.i b/ace/Service_Object.i index 7b735cf6c1f..48f847d523b 100644 --- a/ace/Service_Object.i +++ b/ace/Service_Object.i @@ -42,15 +42,6 @@ ACE_Service_Type::handle (void) const } ACE_INLINE void -ACE_Service_Type::name (const ACE_TCHAR *n) -{ - ACE_TRACE ("ACE_Service_Type::name"); - - delete [] (ACE_TCHAR *) this->name_; - this->name_ = ACE::strnew (n); -} - -ACE_INLINE void ACE_Service_Type::type (const ACE_Service_Type_Impl *o, int enabled) { ACE_TRACE ("ACE_Service_Type::type"); diff --git a/ace/TLI_Acceptor.cpp b/ace/TLI_Acceptor.cpp index 29c1717e767..60b63359031 100644 --- a/ace/TLI_Acceptor.cpp +++ b/ace/TLI_Acceptor.cpp @@ -2,6 +2,7 @@ #include "ace/TLI_Acceptor.h" #include "ace/Log_Msg.h" +#include "ace/ACE.h" ACE_RCSID(ace, TLI_Acceptor, "$Id$") diff --git a/ace/TLI_Connector.cpp b/ace/TLI_Connector.cpp index cca3ff1d265..49af71eadcb 100644 --- a/ace/TLI_Connector.cpp +++ b/ace/TLI_Connector.cpp @@ -3,6 +3,7 @@ #include "ace/Handle_Set.h" #include "ace/TLI_Connector.h" +#include "ace/ACE.h" ACE_RCSID(ace, TLI_Connector, "$Id$") @@ -30,15 +31,15 @@ ACE_TLI_Connector::ACE_TLI_Connector (void) // complicated this is to do in TLI... int -ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, - const ACE_Addr &remote_sap, +ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, + const ACE_Addr &remote_sap, ACE_Time_Value *timeout, - const ACE_Addr &local_sap, + const ACE_Addr &local_sap, int reuse_addr, int flags, int /* perms */, - const char device[], - struct t_info *info, + const char device[], + struct t_info *info, int rwf, netbuf *udata, netbuf *opt) @@ -58,7 +59,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, struct t_bind *localaddr; - localaddr = (struct t_bind *) + localaddr = (struct t_bind *) ACE_OS::t_alloc (new_stream.get_handle (), T_BIND, T_ADDR); if (localaddr == 0) @@ -73,7 +74,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, // maybe options are configured differently for XTI than for // TLI (at least for FORE's implementation - XTI is supposed // to be a superset of TLI). - if (reuse_addr + if (reuse_addr && new_stream.set_option (SOL_SOCKET, SO_REUSEADDR, &one, @@ -110,7 +111,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, struct t_call *callptr = 0; - callptr = (struct t_call *) + callptr = (struct t_call *) ACE_OS::t_alloc (new_stream.get_handle (), T_CALL, T_ADDR); if (callptr == 0) @@ -142,19 +143,19 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, { if (new_stream.enable (ACE_NONBLOCK) == -1) result = -1; - + // Do a non-blocking connect. if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1) { result = -1; - + // Check to see if we simply haven't connected yet on a // non-blocking handle or whether there's really an error. - if (t_errno == TNODATA) + if (t_errno == TNODATA) { if (timeout->sec () == 0 && timeout->usec () == 0) errno = EWOULDBLOCK; - else + else result = this->complete (new_stream, 0, timeout); } else if (t_errno == TLOOK && new_stream.look () == T_DISCONNECT) @@ -165,7 +166,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, else if (ACE_OS::t_connect (new_stream.get_handle (), callptr, 0) == -1) result = -1; - if (result != -1) + if (result != -1) { new_stream.set_rwflag (rwf); #if defined (I_PUSH) && !defined (ACE_HAS_FORE_ATM_XTI) @@ -190,7 +191,7 @@ ACE_TLI_Connector::connect (ACE_TLI_Stream &new_stream, // Try to complete a non-blocking connection. int -ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, +ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, ACE_Addr *remote_sap, ACE_Time_Value *tv) { @@ -226,10 +227,10 @@ ACE_TLI_Connector::complete (ACE_TLI_Stream &new_stream, if (ACE_OS::ioctl (new_stream.get_handle (), TI_GETPEERNAME, - &name) == -1) + &name) == -1) #else /* SunOS4 */ if (0) -#endif /* ACE_HAS_SVR4_TLI */ +#endif /* ACE_HAS_SVR4_TLI */ { new_stream.close (); return -1; diff --git a/ace/TLI_Stream.cpp b/ace/TLI_Stream.cpp index a5533d40492..4a216137ea5 100644 --- a/ace/TLI_Stream.cpp +++ b/ace/TLI_Stream.cpp @@ -4,6 +4,7 @@ abstraction. */ #include "ace/TLI_Stream.h" +#include "ace/ACE.h" ACE_RCSID(ace, TLI_Stream, "$Id$") @@ -37,7 +38,7 @@ ACE_TLI_Stream::get_remote_addr (ACE_Addr &sa) const name.maxlen = sa.get_size (); name.buf = (char *) sa.get_addr (); - // if (ACE_OS::t_getname (this->get_handle (), &name, REMOTENAME) == -1) + // if (ACE_OS::t_getname (this->get_handle (), &name, REMOTENAME) == -1) if (ACE_OS::ioctl (this->get_handle (), TI_GETPEERNAME, &name) == -1) @@ -58,17 +59,17 @@ ACE_TLI_Stream::active_close (void) ACE_TRACE ("ACE_TLI_Stream::active_close"); char buf; - if (this->sndrel () == -1) - return -1; - else if (this->recv (&buf, sizeof buf) == -1) + if (this->sndrel () == -1) + return -1; + else if (this->recv (&buf, sizeof buf) == -1) { if (t_errno == TLOOK && this->look () == T_ORDREL) { - if (this->rcvrel () == -1) - return -1; + if (this->rcvrel () == -1) + return -1; } else - return -1; + return -1; } return this->close (); @@ -82,10 +83,10 @@ ACE_TLI_Stream::passive_close (void) { ACE_TRACE ("ACE_TLI_Stream::passive_close"); - if (this->rcvrel () == -1) - return -1; - else if (this->sndrel () == -1) - return -1; + if (this->rcvrel () == -1) + return -1; + else if (this->sndrel () == -1) + return -1; return this->close (); } @@ -95,7 +96,7 @@ ACE_TLI_Stream::close (void) { ACE_TRACE ("ACE_TLI_Stream::close"); - ACE_HANDLE fd = this->get_handle (); + ACE_HANDLE fd = this->get_handle (); this->set_handle (ACE_INVALID_HANDLE); @@ -107,4 +108,123 @@ ACE_TLI_Stream::close (void) return ACE_OS::t_close (fd); } +ssize_t +ACE_TLI_Stream::send (const void *buf, + size_t n, + const ACE_Time_Value *timeout) const +{ + ACE_TRACE ("ACE_TLI_Stream::send"); + return ACE::send (this->get_handle (), + buf, + n, + timeout); +} + +ssize_t +ACE_TLI_Stream::send (const void *buf, + size_t n, + int flags, + const ACE_Time_Value *timeout) const +{ + ACE_TRACE ("ACE_TLI_Stream::send"); + return ACE::t_snd (this->get_handle (), + buf, + n, + flags, + timeout); +} + +ssize_t +ACE_TLI_Stream::recv (void *buf, + size_t n, + const ACE_Time_Value *timeout) const +{ + ACE_TRACE ("ACE_TLI_Stream::recv"); + return ACE::recv (this->get_handle (), + buf, + n, + timeout); +} + +ssize_t +ACE_TLI_Stream::recv (void *buf, + size_t n, + int *flags, + const ACE_Time_Value *timeout) const +{ + ACE_TRACE ("ACE_TLI_Stream::recv"); + int f = 0; + + if (flags == 0) + flags = &f; + + return ACE::t_rcv (this->get_handle (), + buf, + n, + flags, + timeout); +} + +ssize_t +ACE_TLI_Stream::send_n (const void *buf, + size_t n, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_TLI_Stream::send_n"); + return ACE::send_n (this->get_handle (), + buf, + n, + timeout, + bytes_transferred); +} + +ssize_t +ACE_TLI_Stream::send_n (const void *buf, + size_t n, + int flags, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_TLI_Stream::send_n"); + + return ACE::t_snd_n (this->get_handle (), + buf, + n, + flags, + timeout, + bytes_transferred); +} + +ssize_t +ACE_TLI_Stream::recv_n (void *buf, + size_t n, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_TLI_Stream::recv_n"); + return ACE::recv_n (this->get_handle (), + buf, + n, + timeout, + bytes_transferred); +} + +ssize_t +ACE_TLI_Stream::recv_n (void *buf, + size_t n, + int *flags, + const ACE_Time_Value *timeout, + size_t *bytes_transferred) const +{ + ACE_TRACE ("ACE_TLI_Stream::recv_n"); + + return ACE::t_rcv_n (this->get_handle (), + buf, + n, + flags, + timeout, + bytes_transferred); +} + #endif /* ACE_HAS_TLI */ diff --git a/ace/TLI_Stream.i b/ace/TLI_Stream.i index 8452138cea1..89583e7fb8b 100644 --- a/ace/TLI_Stream.i +++ b/ace/TLI_Stream.i @@ -6,133 +6,6 @@ #include "ace/TLI_Stream.h" ACE_INLINE -ssize_t -ACE_TLI_Stream::send (const void *buf, - size_t n, - const ACE_Time_Value *timeout) const -{ - ACE_TRACE ("ACE_TLI_Stream::send"); - return ACE::send (this->get_handle (), - buf, - n, - timeout); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::send (const void *buf, - size_t n, - int flags, - const ACE_Time_Value *timeout) const -{ - ACE_TRACE ("ACE_TLI_Stream::send"); - return ACE::t_snd (this->get_handle (), - buf, - n, - flags, - timeout); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::recv (void *buf, - size_t n, - const ACE_Time_Value *timeout) const -{ - ACE_TRACE ("ACE_TLI_Stream::recv"); - return ACE::recv (this->get_handle (), - buf, - n, - timeout); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::recv (void *buf, - size_t n, - int *flags, - const ACE_Time_Value *timeout) const -{ - ACE_TRACE ("ACE_TLI_Stream::recv"); - int f = 0; - - if (flags == 0) - flags = &f; - - return ACE::t_rcv (this->get_handle (), - buf, - n, - flags, - timeout); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::send_n (const void *buf, - size_t n, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) const -{ - ACE_TRACE ("ACE_TLI_Stream::send_n"); - return ACE::send_n (this->get_handle (), - buf, - n, - timeout, - bytes_transferred); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::send_n (const void *buf, - size_t n, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) const -{ - ACE_TRACE ("ACE_TLI_Stream::send_n"); - - return ACE::t_snd_n (this->get_handle (), - buf, - n, - flags, - timeout, - bytes_transferred); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::recv_n (void *buf, - size_t n, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) const -{ - ACE_TRACE ("ACE_TLI_Stream::recv_n"); - return ACE::recv_n (this->get_handle (), - buf, - n, - timeout, - bytes_transferred); -} - -ACE_INLINE -ssize_t -ACE_TLI_Stream::recv_n (void *buf, - size_t n, - int *flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) const -{ - ACE_TRACE ("ACE_TLI_Stream::recv_n"); - - return ACE::t_rcv_n (this->get_handle (), - buf, - n, - flags, - timeout, - bytes_transferred); -} - -ACE_INLINE void ACE_TLI_Stream::set_rwflag (int value) { |