00001
00002
00003 #include "tao/Acceptor_Registry.h"
00004 #include "tao/Profile.h"
00005 #include "tao/Transport_Acceptor.h"
00006 #include "tao/Protocol_Factory.h"
00007 #include "tao/ORB_Core.h"
00008 #include "tao/params.h"
00009 #include "tao/MProfile.h"
00010 #include "tao/debug.h"
00011 #include "tao/Acceptor_Filter.h"
00012 #include "tao/Endpoint.h"
00013 #include "tao/ORB_Constants.h"
00014 #include "tao/SystemException.h"
00015 #if defined (ACE_WIN32) && defined (ACE_HAS_IPV6)
00016 # include "tao/IIOP_Acceptor.h"
00017 #endif
00018
00019 #include "ace/Auto_Ptr.h"
00020 #include "ace/OS_NS_string.h"
00021 #include "ace/OS_NS_ctype.h"
00022 #include "ace/CORBA_macros.h"
00023
00024 #if !defined(__ACE_INLINE__)
00025 #include "tao/Acceptor_Registry.inl"
00026 #endif
00027
00028 ACE_RCSID (tao,
00029 Acceptor_Registry,
00030 "$Id: Acceptor_Registry.cpp 86811 2009-09-28 06:32:45Z johnnyw $")
00031
00032
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034
00035 TAO_Acceptor_Registry::TAO_Acceptor_Registry (void)
00036 : acceptors_ (0),
00037 size_ (0)
00038 {
00039 }
00040
00041 TAO_Acceptor_Registry::~TAO_Acceptor_Registry (void)
00042 {
00043 this->close_all ();
00044
00045 delete [] this->acceptors_;
00046 }
00047
00048 size_t
00049 TAO_Acceptor_Registry::endpoint_count (void)
00050 {
00051 size_t count = 0;
00052 const TAO_AcceptorSetIterator end = this->end ();
00053
00054 for (TAO_AcceptorSetIterator i = this->begin (); i != end; ++i)
00055 {
00056 count += (*i)->endpoint_count ();
00057 }
00058
00059 return count;
00060 }
00061
00062 bool
00063 TAO_Acceptor_Registry::is_collocated (const TAO_MProfile &mprofile)
00064 {
00065 TAO_AcceptorSetIterator const end = this->end ();
00066 CORBA::ULong const count = mprofile.profile_count ();
00067
00068
00069
00070 for (TAO_AcceptorSetIterator i = this->begin (); i != end; ++i)
00071 {
00072 for (TAO_PHandle j = 0; j != count; ++j)
00073 {
00074 const TAO_Profile *profile = mprofile.get_profile (j);
00075
00076
00077
00078
00079 TAO_Profile *pf = const_cast<TAO_Profile *> (profile);
00080
00081
00082 if ((*i)->tag () == pf->tag ())
00083 {
00084
00085
00086
00087 for (TAO_Endpoint *endp = pf->endpoint ();
00088 endp != 0;
00089 endp = endp->next ())
00090 {
00091 if ((*i)->is_collocated (endp))
00092 {
00093 return true;
00094 }
00095 }
00096 }
00097 }
00098 }
00099
00100 return false;
00101 }
00102
00103 TAO_Acceptor*
00104 TAO_Acceptor_Registry::get_acceptor (CORBA::ULong tag)
00105 {
00106 TAO_AcceptorSetIterator const end = this->end ();
00107 TAO_AcceptorSetIterator acceptor = this->begin ();
00108
00109 for (; acceptor != end; ++acceptor)
00110 {
00111 if ((*acceptor)->tag () == tag)
00112 {
00113 return *acceptor;
00114 }
00115 }
00116
00117 return 0;
00118 }
00119
00120 int
00121 TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
00122 ACE_Reactor *reactor,
00123 const TAO_EndpointSet &endpoint_set,
00124 bool ignore_address)
00125 {
00126 if (endpoint_set.is_empty ()
00127
00128
00129
00130
00131
00132 && this->open_default (orb_core, reactor, 0) == -1)
00133 {
00134 throw ::CORBA::INTERNAL (
00135 CORBA::SystemException::_tao_minor_code (
00136 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00137 0),
00138 CORBA::COMPLETED_NO);
00139 }
00140
00141
00142
00143 size_t acceptor_count = 0;
00144 TAO_EndpointSetIterator endpts (endpoint_set);
00145
00146 for (ACE_CString *ep = 0;
00147 endpts.next (ep) != 0;
00148 endpts.advance ())
00149 {
00150 const ACE_CString &iop = (*ep);
00151
00152
00153
00154 ACE_CString::size_type const slot = iop.find ("://", 0);
00155
00156 if (slot == iop.npos)
00157 {
00158 if (TAO_debug_level > 0)
00159 {
00160 ACE_ERROR ((LM_ERROR,
00161 ACE_TEXT ("(%P|%t) Invalid endpoint ")
00162 ACE_TEXT ("specification: <%C>.\n"),
00163 iop.c_str ()));
00164 }
00165
00166 throw ::CORBA::BAD_PARAM (
00167 CORBA::SystemException::_tao_minor_code (
00168 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00169 EINVAL),
00170 CORBA::COMPLETED_NO);
00171 }
00172
00173 ++acceptor_count;
00174 #if defined (ACE_WIN32) && defined (ACE_HAS_IPV6)
00175
00176
00177
00178
00179
00180 const TAO_ProtocolFactorySetItor end =
00181 orb_core->protocol_factories ()->end ();
00182
00183
00184 const ACE_CString prefix (iop.substring (0, slot));
00185
00186 for (TAO_ProtocolFactorySetItor factory =
00187 orb_core->protocol_factories ()->begin ();
00188 factory != end;
00189 ++factory)
00190 {
00191 if ((*factory)->factory ()->match_prefix (prefix))
00192 {
00193 if ((*factory)->factory ()->tag () == IOP::TAG_INTERNET_IOP)
00194 {
00195
00196 ++acceptor_count;
00197 }
00198 break;
00199 }
00200 }
00201 #endif
00202
00203
00204
00205
00206 const char *ep_end =
00207 ep->c_str () + ACE_OS::strlen (ep->c_str ());
00208
00209 for (const char *e = ACE_OS::strchr (ep->c_str (), ',');
00210 e != 0 && e != ep_end;
00211 e = ACE_OS::strchr (e, ','))
00212 {
00213 ++acceptor_count;
00214 ++e;
00215 }
00216 }
00217
00218
00219
00220 if (this->acceptors_ == 0)
00221 {
00222 ACE_NEW_THROW_EX (this->acceptors_,
00223 TAO_Acceptor *[acceptor_count],
00224 CORBA::NO_MEMORY (
00225 CORBA::SystemException::_tao_minor_code (
00226 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00227 ENOMEM),
00228 CORBA::COMPLETED_NO));
00229 }
00230
00231 TAO_EndpointSetIterator endpoints (endpoint_set);
00232
00233 for (ACE_CString *endpoint = 0;
00234 endpoints.next (endpoint) != 0;
00235 endpoints.advance ())
00236 {
00237 const ACE_CString &iop = (*endpoint);
00238
00239
00240
00241 ACE_CString::size_type const slot = iop.find ("://", 0);
00242
00243 if (slot == iop.npos)
00244 {
00245 if (TAO_debug_level > 0)
00246 {
00247 ACE_ERROR ((LM_ERROR,
00248 ACE_TEXT ("(%P|%t) Invalid endpoint ")
00249 ACE_TEXT ("specification: <%C>.\n"),
00250 iop.c_str ()));
00251 }
00252
00253 throw ::CORBA::BAD_PARAM (
00254 CORBA::SystemException::_tao_minor_code (
00255 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00256 EINVAL),
00257 CORBA::COMPLETED_NO);
00258 }
00259
00260 const ACE_CString prefix (iop.substring (0, slot));
00261
00262
00263
00264
00265
00266
00267
00268 const TAO_ProtocolFactorySetItor end =
00269 orb_core->protocol_factories ()->end ();
00270
00271 bool found = false;
00272
00273
00274
00275 for (TAO_ProtocolFactorySetItor factory =
00276 orb_core->protocol_factories ()->begin ();
00277 factory != end;
00278 ++factory)
00279 {
00280 if ((*factory)->factory ()->match_prefix (prefix))
00281 {
00282
00283 ACE_CString addrs = iop.substring (slot + 3);
00284
00285 int const result = this->open_i (orb_core,
00286 reactor,
00287 addrs,
00288 factory,
00289 ignore_address);
00290
00291 if (result != 0)
00292 {
00293 return -1;
00294 }
00295
00296 found = true;
00297 }
00298 else
00299 {
00300 continue;
00301 }
00302 }
00303
00304 if (found == false)
00305 {
00306 ACE_ERROR ((LM_ERROR,
00307 ACE_TEXT ("TAO (%P|%t) ")
00308 ACE_TEXT ("no usable transport protocol ")
00309 ACE_TEXT ("was found.\n")));
00310
00311 throw ::CORBA::BAD_PARAM (
00312 CORBA::SystemException::_tao_minor_code (
00313 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00314 EINVAL),
00315 CORBA::COMPLETED_NO);
00316 }
00317 }
00318
00319 return 0;
00320 }
00321
00322
00323
00324 int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
00325 ACE_Reactor *reactor,
00326 const char *options)
00327 {
00328
00329
00330 bool opened_endpoint = false;
00331
00332 #if defined (ACE_WIN32) && defined (ACE_HAS_IPV6)
00333 if (!orb_core->orb_params ()->connect_ipv6_only () && this->acceptors_ == 0)
00334 {
00335
00336
00337
00338
00339 TAO_ProtocolFactorySet *pfs = orb_core->protocol_factories ();
00340
00341
00342 size_t acceptor_count = 0;
00343
00344 const TAO_ProtocolFactorySetItor end = pfs->end ();
00345
00346
00347 for (TAO_ProtocolFactorySetItor i = pfs->begin (); i != end; ++i)
00348 {
00349 if (!(*i)->factory ()->requires_explicit_endpoint ())
00350 {
00351 if ((*i)->factory ()->tag () == IOP::TAG_INTERNET_IOP)
00352 acceptor_count += 2;
00353 else
00354 acceptor_count += 1;
00355 }
00356 }
00357
00358
00359 ACE_NEW_RETURN (this->acceptors_,
00360 TAO_Acceptor *[acceptor_count],
00361 -1);
00362
00363
00364 for (TAO_ProtocolFactorySetItor i = pfs->begin (); i != end; ++i)
00365 {
00366
00367
00368
00369
00370
00371 if (!(*i)->factory ()->requires_explicit_endpoint ())
00372 {
00373
00374 TAO_Acceptor *acceptor =
00375 (*i)->factory ()->make_acceptor ();
00376
00377 if (acceptor == 0)
00378 {
00379 if (TAO_debug_level > 0)
00380 {
00381 ACE_ERROR ((
00382 LM_ERROR,
00383 ACE_TEXT ("TAO (%P|%t) unable to create ")
00384 ACE_TEXT ("an acceptor for <%C>\n"),
00385 (*i)->protocol_name ().c_str ()
00386 ));
00387 }
00388
00389 return -1;
00390 }
00391
00392 if ((*i)->factory ()->tag () == IOP::TAG_INTERNET_IOP)
00393 {
00394
00395 ACE_INET_Addr addr(static_cast<unsigned short> (0));
00396
00397 TAO_IIOP_Acceptor* iiop_acceptor =
00398 dynamic_cast<TAO_IIOP_Acceptor*> (acceptor);
00399
00400 if (!iiop_acceptor)
00401 return -1;
00402
00403 iiop_acceptor->set_default_address (addr);
00404
00405 if (this->open_default_i (orb_core,
00406 reactor,
00407 TAO_DEF_GIOP_MAJOR,
00408 TAO_DEF_GIOP_MINOR,
00409 i,
00410 acceptor,
00411 options) != 0)
00412 {
00413 return -1;
00414 }
00415
00416
00417 u_short port =
00418 iiop_acceptor->default_address ().get_port_number ();
00419
00420
00421 acceptor =
00422 (*i)->factory ()->make_acceptor ();
00423
00424 if (acceptor == 0)
00425 {
00426 if (TAO_debug_level > 0)
00427 {
00428 ACE_ERROR ((
00429 LM_ERROR,
00430 ACE_TEXT ("TAO (%P|%t) unable to create ")
00431 ACE_TEXT ("an acceptor for <%C>\n"),
00432 (*i)->protocol_name ().c_str ()
00433 ));
00434 }
00435
00436 return -1;
00437 }
00438
00439 if (ACE::ipv6_enabled() &&
00440 addr.set (port, ACE_IPV6_ANY, 1, AF_INET6) == 0)
00441 {
00442 iiop_acceptor =
00443 dynamic_cast<TAO_IIOP_Acceptor*> (acceptor);
00444
00445 if (!iiop_acceptor)
00446 return -1;
00447
00448 iiop_acceptor->set_default_address (addr);
00449
00450 if (this->open_default_i (orb_core,
00451 reactor,
00452 TAO_DEF_GIOP_MAJOR,
00453 TAO_DEF_GIOP_MINOR,
00454 i,
00455 acceptor,
00456 options) != 0)
00457 {
00458 return -1;
00459 }
00460 }
00461 }
00462 else
00463 {
00464 if (this->open_default_i (orb_core,
00465 reactor,
00466 TAO_DEF_GIOP_MAJOR,
00467 TAO_DEF_GIOP_MINOR,
00468 i,
00469 acceptor,
00470 options) != 0)
00471 {
00472 return -1;
00473 }
00474 }
00475
00476 opened_endpoint = true;
00477 }
00478 }
00479 }
00480 else
00481 {
00482 #endif
00483 TAO_ProtocolFactorySet *pfs = orb_core->protocol_factories ();
00484
00485
00486
00487
00488
00489 if (this->acceptors_ == 0)
00490 {
00491 ACE_NEW_RETURN (this->acceptors_,
00492 TAO_Acceptor *[pfs->size ()],
00493 -1);
00494 }
00495
00496 const TAO_ProtocolFactorySetItor end = pfs->end ();
00497
00498
00499 for (TAO_ProtocolFactorySetItor i = pfs->begin (); i != end; ++i)
00500 {
00501
00502
00503
00504
00505
00506 if (!(*i)->factory ()->requires_explicit_endpoint ())
00507 {
00508 if (this->open_default (orb_core,
00509 reactor,
00510 TAO_DEF_GIOP_MAJOR,
00511 TAO_DEF_GIOP_MINOR,
00512 i,
00513 options) != 0)
00514 {
00515 return -1;
00516 }
00517
00518 opened_endpoint = true;
00519 }
00520 }
00521 #if defined (ACE_WIN32) && defined (ACE_HAS_IPV6)
00522 }
00523 #endif
00524
00525 if (!opened_endpoint)
00526 {
00527 if (TAO_debug_level > 0)
00528 {
00529 ACE_ERROR ((LM_ERROR,
00530 ACE_TEXT ("TAO (%P|%t) No default endpoints ")
00531 ACE_TEXT ("opened.\n")
00532 ACE_TEXT ("Please specify one or more using ")
00533 ACE_TEXT ("the \"-ORBListenEndpoints\" ")
00534 ACE_TEXT ("option.\n")));
00535 }
00536
00537 return -1;
00538 }
00539
00540 return 0;
00541 }
00542
00543
00544
00545 int
00546 TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
00547 ACE_Reactor *reactor,
00548 int major,
00549 int minor,
00550 TAO_ProtocolFactorySetItor &factory,
00551 const char *options)
00552 {
00553
00554
00555
00556
00557 TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor ();
00558
00559 if (acceptor == 0)
00560 {
00561 if (TAO_debug_level > 0)
00562 {
00563 ACE_ERROR ((
00564 LM_ERROR,
00565 ACE_TEXT ("TAO (%P|%t) unable to create ")
00566 ACE_TEXT ("an acceptor for <%C>\n"),
00567 (*factory)->protocol_name ().c_str ()
00568 ));
00569 }
00570
00571 return -1;
00572 }
00573
00574 return this->open_default_i (orb_core,
00575 reactor,
00576 major,
00577 minor,
00578 factory,
00579 acceptor,
00580 options);
00581 }
00582
00583
00584 int
00585 TAO_Acceptor_Registry::open_default_i (TAO_ORB_Core *orb_core,
00586 ACE_Reactor *reactor,
00587 int major,
00588 int minor,
00589 TAO_ProtocolFactorySetItor &factory,
00590 TAO_Acceptor* acceptor,
00591 const char *options)
00592 {
00593
00594 if (acceptor->open_default (orb_core, reactor, major, minor, options) == -1)
00595 {
00596 delete acceptor;
00597
00598 if (TAO_debug_level > 0)
00599 {
00600 ACE_ERROR ((
00601 LM_ERROR,
00602 ACE_TEXT ("TAO (%P|%t) - Unable to open ")
00603 ACE_TEXT ("default acceptor for <%C>%p\n"),
00604 (*factory)->protocol_name ().c_str (),
00605 ACE_TEXT ("")
00606 ));
00607 }
00608
00609 return -1;
00610 }
00611
00612 this->acceptors_[this->size_++] = acceptor;
00613
00614 return 0;
00615 }
00616
00617 int
00618 TAO_Acceptor_Registry::close_all (void)
00619 {
00620 const TAO_AcceptorSetIterator end = this->end ();
00621
00622 for (TAO_AcceptorSetIterator i = this->begin (); i != end; ++i)
00623 {
00624 if (*i != 0)
00625 {
00626 (*i)->close ();
00627 delete *i;
00628 }
00629 }
00630
00631 this->size_ = 0;
00632 return 0;
00633 }
00634
00635 void
00636 TAO_Acceptor_Registry::extract_endpoint_options (ACE_CString &addrs,
00637 ACE_CString &options,
00638 TAO_Protocol_Factory *factory)
00639 {
00640 ACE_CString::size_type const options_index =
00641 addrs.find (factory->options_delimiter ());
00642
00643 if (options_index == addrs.length () - 1)
00644 {
00645
00646 addrs = addrs.substring (0, addrs.length () - 1);
00647 }
00648 else if (options_index != ACE_CString::npos)
00649 {
00650 options = addrs.substring (options_index + 1);
00651 addrs = addrs.substring (0, options_index);
00652 }
00653 }
00654
00655 void
00656 TAO_Acceptor_Registry::extract_endpoint_version (ACE_CString &address,
00657 int &major,
00658 int &minor)
00659 {
00660
00661
00662 major = TAO_DEF_GIOP_MAJOR;
00663 minor = TAO_DEF_GIOP_MINOR;
00664
00665 if (ACE_OS::ace_isdigit (address[0])
00666 && address[1] == '.'
00667 && ACE_OS::ace_isdigit (address[2])
00668 && address[3] == '@')
00669 {
00670 major = address[0] - '0';
00671 minor = address[2] - '0';
00672 address = address.substring (4);
00673 }
00674 }
00675
00676 int
00677 TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
00678 ACE_Reactor *reactor,
00679 ACE_CString &addrs,
00680 TAO_ProtocolFactorySetItor &factory,
00681 bool ignore_address)
00682 {
00683 ACE_CString options_tmp;
00684 this->extract_endpoint_options (addrs, options_tmp, (*factory)->factory ());
00685
00686 const char *options = 0;
00687
00688 if (options_tmp.length () > 0)
00689 {
00690 options = options_tmp.c_str ();
00691 }
00692
00693 char *last_addr = 0;
00694 ACE_Auto_Basic_Array_Ptr<char> addr_str (addrs.rep ());
00695
00696 const char *astr = ACE_OS::strtok_r (addr_str.get (), ",", &last_addr);
00697
00698
00699
00700 do
00701 {
00702
00703
00704
00705
00706 ACE_CString address (astr == 0 ? "" : astr);
00707
00708 TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor ();
00709
00710 if (acceptor != 0)
00711 {
00712
00713
00714 int major = TAO_DEF_GIOP_MAJOR;
00715 int minor = TAO_DEF_GIOP_MINOR;
00716 this->extract_endpoint_version (address, major, minor);
00717
00718
00719 if (ignore_address || address.length () == 0)
00720 {
00721
00722
00723
00724 #if defined (ACE_WIN32) && defined (ACE_HAS_IPV6)
00725 if ((*factory)->factory ()->tag () == IOP::TAG_INTERNET_IOP)
00726 {
00727
00728 ACE_INET_Addr addr(static_cast<unsigned short> (0));
00729
00730 TAO_IIOP_Acceptor* iiop_acceptor = dynamic_cast<TAO_IIOP_Acceptor*> (acceptor);
00731
00732 if (!iiop_acceptor)
00733 return -1;
00734
00735 iiop_acceptor->set_default_address (addr);
00736
00737 if (this->open_default_i (orb_core,
00738 reactor,
00739 major,
00740 minor,
00741 factory,
00742 acceptor,
00743 options) == 0)
00744 {
00745
00746 u_short port = iiop_acceptor->default_address ().get_port_number ();
00747
00748
00749 acceptor =
00750 (*factory)->factory ()->make_acceptor ();
00751
00752 if (acceptor == 0)
00753 {
00754 if (TAO_debug_level > 0)
00755 {
00756 ACE_ERROR ((
00757 LM_ERROR,
00758 ACE_TEXT ("TAO (%P|%t) unable to create ")
00759 ACE_TEXT ("an acceptor for <%C>\n"),
00760 (*factory)->protocol_name ().c_str ()
00761 ));
00762 }
00763
00764 throw ::CORBA::NO_MEMORY (
00765 CORBA::SystemException::_tao_minor_code (
00766 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00767 ENOMEM),
00768 CORBA::COMPLETED_NO);
00769 }
00770
00771 addr.set (port, ACE_IPV6_ANY, AF_INET6);
00772
00773 iiop_acceptor = dynamic_cast<TAO_IIOP_Acceptor*> (acceptor);
00774 if (!iiop_acceptor)
00775 return -1;
00776
00777 iiop_acceptor->set_default_address (addr);
00778
00779 if (this->open_default_i (orb_core,
00780 reactor,
00781 major,
00782 minor,
00783 factory,
00784 acceptor,
00785 options) == 0)
00786 {
00787 continue;
00788 }
00789 }
00790
00791 }
00792 else
00793 {
00794 if (this->open_default_i (orb_core,
00795 reactor,
00796 major,
00797 minor,
00798 factory,
00799 acceptor,
00800 options) == 0)
00801 {
00802 continue;
00803 }
00804 }
00805
00806
00807
00808 throw ::CORBA::INTERNAL (
00809 CORBA::SystemException::_tao_minor_code (
00810 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00811 0),
00812 CORBA::COMPLETED_NO);
00813 #else
00814 if (this->open_default_i (orb_core,
00815 reactor,
00816 major,
00817 minor,
00818 factory,
00819 acceptor,
00820 options) == 0)
00821 continue;
00822
00823
00824
00825 else
00826 {
00827 throw ::CORBA::INTERNAL (
00828 CORBA::SystemException::_tao_minor_code (
00829 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00830 0),
00831 CORBA::COMPLETED_NO);
00832 }
00833 #endif
00834 }
00835
00836 else if (acceptor->open (orb_core,
00837 reactor,
00838 major,
00839 minor,
00840 address.c_str (),
00841 options) == -1)
00842 {
00843
00844
00845 int const errno_value = errno;
00846 delete acceptor;
00847
00848 if (TAO_debug_level > 0)
00849 {
00850 ACE_ERROR ((LM_ERROR,
00851 ACE_TEXT ("TAO (%P|%t) - ")
00852 ACE_TEXT ("Unable to open acceptor ")
00853 ACE_TEXT ("for <%C>%p\n"),
00854 address.c_str (),
00855 ACE_TEXT ("")));
00856 }
00857
00858 throw ::CORBA::BAD_PARAM (
00859 CORBA::SystemException::_tao_minor_code (
00860 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00861 errno_value),
00862 CORBA::COMPLETED_NO);
00863 }
00864
00865
00866 this->acceptors_[this->size_++] = acceptor;
00867 }
00868 else
00869 {
00870 if (TAO_debug_level > 0)
00871 {
00872 ACE_ERROR ((LM_ERROR,
00873 ACE_TEXT ("TAO (%P|%t) unable to create ")
00874 ACE_TEXT ("an acceptor for <%C>.\n"),
00875 address.c_str ()));
00876 }
00877
00878 throw ::CORBA::NO_MEMORY (
00879 CORBA::SystemException::_tao_minor_code (
00880 TAO_ACCEPTOR_REGISTRY_OPEN_LOCATION_CODE,
00881 ENOMEM),
00882 CORBA::COMPLETED_NO);
00883 }
00884 }
00885 while (astr != 0 && (astr = ACE_OS::strtok_r (0, ",", &last_addr)) != 0);
00886
00887 return 0;
00888 }
00889
00890 TAO_END_VERSIONED_NAMESPACE_DECL