diff options
author | Chris Cleeland <chris.cleeland@gmail.com> | 2003-12-15 22:31:47 +0000 |
---|---|---|
committer | Chris Cleeland <chris.cleeland@gmail.com> | 2003-12-15 22:31:47 +0000 |
commit | 2e3048846ebd3aa81e90a4f2725b60f034e6da0f (patch) | |
tree | 11f6db827083dbb0379dcaf855f6908e1392ba4c | |
parent | 85ca431d56624675f8d05df596d12021eeb29fdf (diff) | |
download | ATCD-2e3048846ebd3aa81e90a4f2725b60f034e6da0f.tar.gz |
Tag: pmb_integration
Started work on performance enhancements for PMB.
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_Impl.inl | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_Impl.inl b/TAO/tao/GIOP_Message_Generator_Parser_Impl.inl index 18bb7936ffd..47e4730befb 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_Impl.inl +++ b/TAO/tao/GIOP_Message_Generator_Parser_Impl.inl @@ -5,9 +5,24 @@ TAO_GIOP_Message_Generator_Parser_Impl:: check_revision (CORBA::Octet incoming_major, CORBA::Octet incoming_minor) { - if (incoming_major > TAO_DEF_GIOP_MAJOR || - incoming_minor > TAO_DEF_GIOP_MINOR) + CORBA::UShort version_as_whole_num = incoming_major << 8 | incoming_minor; + CORBA::UShort max_allowable_version = TAO_DEF_GIOP_MAJOR << 8 | TAO_DEF_GIOP_MINOR; + + CORBA::Boolean ret = 0; + + // If it's greater than the max, we know it's not allowed. + if (version_as_whole_num > max_allowable_version) return 0; - - return 1; + + // If it's less than the max, though, we still have to check for + // each explicit version and only allow the ones we know work. + switch (version_as_whole_num) + { + case 0x0100: + case 0x0101: + case 0x0102: + ret = 1; + } + + return ret; } |