summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-17 15:34:11 +0000
committerharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-17 15:34:11 +0000
commit33a39c240156c51c6c4936f218d76f53d6b62ad5 (patch)
tree9f0e49af846f9e0a30a3fb56b1e96a9eb45b716a
parentb78bf9e46b414439316dc1d18c26c275675add9e (diff)
downloadATCD-33a39c240156c51c6c4936f218d76f53d6b62ad5.tar.gz
Thu Jan 17 15:32:12 UTC 2013 Byron Harris <harrisb@ociweb.com>
-rw-r--r--TAO/OCI_RE_ChangeLog8
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp29
2 files changed, 37 insertions, 0 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog
index 11864232b5d..6c771339687 100644
--- a/TAO/OCI_RE_ChangeLog
+++ b/TAO/OCI_RE_ChangeLog
@@ -1,3 +1,11 @@
+Thu Jan 17 15:32:12 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp:
+
+ Throw exception if trying to add a member whose first
+ profile is at IIOP version 1.0 since this version does
+ not support tagged components.
+
Thu Jan 17 14:36:29 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* bin/tao_orb_tests.lst:
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
index 534ecb114e9..c53cac7b1d3 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group.cpp
@@ -6,6 +6,9 @@
#include "orbsvcs/PortableGroup/PG_Operators.h" // Borrow operator== on CosNaming::Name
#include "orbsvcs/PortableGroup/PG_Utils.h"
+#include "tao/MProfile.h"
+#include "tao/Profile.h"
+#include "tao/Stub.h"
#include "tao/debug.h"
#include "ace/Get_Opt.h"
@@ -213,6 +216,32 @@ TAO::PG_Object_Group::add_member (const PortableGroup::Location & the_location,
// IORs, not IOGRs to send new IOGRs out
// to replicas.
+ // Verify that the member is not using V1.0 profiles
+ // since IIOP V1.0 does not support tagged components
+ const TAO_MProfile &member_profiles =
+ member->_stubobj ()->base_profiles ();
+ CORBA::ULong member_profile_count =
+ member_profiles.profile_count ();
+ if (member_profile_count > 0)
+ {
+ const TAO_GIOP_Message_Version & version =
+ member_profiles.get_profile (0)->version ();
+ if (version.major_version () == 1 &&
+ version.minor_version () == 0)
+ {
+ if (TAO_debug_level > 3)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%T %n (%P|%t) - ")
+ ACE_TEXT ("Can't add member because first profile ")
+ ACE_TEXT ("is IIOP version 1.0, which does not ")
+ ACE_TEXT ("support tagged components.\n")
+ ));
+ }
+ throw PortableGroup::ObjectNotAdded ();
+ }
+ }
+
CORBA::String_var member_ior_string =
orb_->object_to_string (member);