diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-03-25 02:28:45 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-03-25 02:28:45 +0000 |
commit | e34b9ef53e178e84279ec3cba147f9dd409b642f (patch) | |
tree | 0edee90c5db4ee2feeff8785b2f27109f4866289 /TAO | |
parent | 7cfa3a9d0a61a06ad9dea94ef87d52efe6b96d64 (diff) | |
download | ATCD-e34b9ef53e178e84279ec3cba147f9dd409b642f.tar.gz |
ChangeLogTag:Fri Mar 24 17:15:07 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/SHMIOP_Acceptor.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/UIOP_Acceptor.cpp | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 8aeb05d71b4..7f2e628ccce 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -124,6 +124,10 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Profile *pfile) ACE_dynamic_cast (const TAO_IIOP_Profile *, pfile); + // Make sure the dynamically cast pointer is valid. + if (profile == 0) + return 0; + for (size_t i = 0; i < this->num_hosts_; ++i) { // compare the port and sin_addr (numeric host address) diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp index 0a3dc351921..7fc649bb91a 100644 --- a/TAO/tao/SHMIOP_Acceptor.cpp +++ b/TAO/tao/SHMIOP_Acceptor.cpp @@ -121,6 +121,10 @@ TAO_SHMIOP_Acceptor::is_collocated (const TAO_Profile *pfile) ACE_dynamic_cast(const TAO_SHMIOP_Profile *, pfile); + // Make sure the dynamically cast pointer is valid. + if (profile == 0) + return 0; + // compare the port and sin_addr (numeric host address) return this->address_.same_host (profile->object_addr ()); } diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp index c7ea477dec9..94dbd9cd13b 100644 --- a/TAO/tao/UIOP_Acceptor.cpp +++ b/TAO/tao/UIOP_Acceptor.cpp @@ -129,6 +129,10 @@ TAO_UIOP_Acceptor::is_collocated (const TAO_Profile *pfile) ACE_dynamic_cast (const TAO_UIOP_Profile *, pfile); + // Make sure the dynamically cast pointer is valid. + if (profile == 0) + return 0; + // For UNIX Files this is relatively cheap. ACE_UNIX_Addr address; if (this->base_acceptor_.acceptor ().get_local_addr (address) == -1) |