00001 #include "tao/Transport_Descriptor_Interface.h" 00002 00003 #if !defined (__ACE_INLINE__) 00004 # include "tao/Transport_Descriptor_Interface.inl" 00005 #endif /* __ACE_INLINE__ */ 00006 00007 #include "tao/Endpoint.h" 00008 00009 ACE_RCSID (tao, 00010 Transport_Descriptor_Interface, 00011 "$Id: Transport_Descriptor_Interface.cpp 74385 2006-08-31 11:22:59Z johnnyw $") 00012 00013 00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface (void) 00017 { 00018 if (this->release_) 00019 { 00020 delete this->endpoint_; 00021 } 00022 } 00023 00024 CORBA::Boolean 00025 TAO_Transport_Descriptor_Interface::reset_endpoint (TAO_Endpoint *ep) 00026 { 00027 // calling on a dynamically allocation descriptor is not allowed. 00028 if (this->release_) 00029 return false; 00030 00031 for (TAO_Endpoint *ptr = this->endpoint_; ptr != 0; ptr = ptr->next()) 00032 00033 if (ptr == ep) 00034 { 00035 this->endpoint_ = ep; 00036 return true; 00037 } 00038 return false; 00039 } 00040 00041 00042 TAO_END_VERSIONED_NAMESPACE_DECL