diff options
author | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-08 19:27:27 +0000 |
---|---|---|
committer | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-08 19:27:27 +0000 |
commit | 54fc7e4a68772ecd2dc64b8a4eff344c6929a40b (patch) | |
tree | 5e58f3a52eafc96ba8921b352af4ab93312b6e81 /TAO/orbsvcs/orbsvcs/PortableGroup | |
parent | 30c14a6d30f594cd6197e7ab51d54af4c8189995 (diff) | |
download | ATCD-54fc7e4a68772ecd2dc64b8a4eff344c6929a40b.tar.gz |
Fri Feb 8 19:25:49 UTC 2013 Byron Harris <harrisb@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/PortableGroup')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index 312b951d873..0680c1acb6a 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -265,9 +265,21 @@ int TAO::PG_Group_Factory::destroy_group (PortableGroup::ObjectGroupId group_id) { PG_Object_Group_Storable *og = dynamic_cast<PG_Object_Group_Storable *> (group); - og->set_destroyed (true); - result = (this->list_store_->remove (group->get_object_group_id ()) - == 0); + if (!og) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%T %n (%P|%t) - PG_Group_Factory ") + ACE_TEXT ("In destroying group could not cast ") + ACE_TEXT ("to PG_Object_Group_Storable\n"))); + result = 0; + } + else + { + og->set_destroyed (true); + result = (this->list_store_->remove (group->get_object_group_id ()) + == 0); + } + } if (result) delete group; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp index ddc7a6811f3..4c5a9cf0413 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp @@ -263,7 +263,8 @@ TAO::PG_Group_List_Store::list_obsolete () ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r")); if (!stream->exists ()) throw CORBA::INTERNAL (); - stream->open (); + if (stream->open () != 0) + throw CORBA::INTERNAL (); return this->is_obsolete (stream->last_changed ()); } |