diff options
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 35 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.i | 37 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Connectors.cpp | 26 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Connectors.i | 27 |
4 files changed, 63 insertions, 62 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 8e40994f0dc..3318a853898 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -348,42 +348,7 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, } } -int -TAO_GIOP_Message_Base::parse_magic_bytes (TAO_GIOP_Message_State *state) -{ - // Grab the read pointer - char *buf = state->cdr.rd_ptr (); - - // The values are hard-coded to support non-ASCII platforms. - if (!(buf [0] == 0x47 // 'G' - && buf [1] == 0x49 // 'I' - && buf [2] == 0x4f // 'O' - && buf [3] == 0x50)) // 'P' - { - // For the present... - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("TAO (%P|%t) bad header, magic word [%c%c%c%c]\n"), - buf[0], - buf[1], - buf[2], - buf[3])); - return -1; - } - if (this->validate_version (state) == -1) - { - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - ASYS_TEXT ("(%N|%l|%p|%t) Error in validating") - ASYS_TEXT ("revision \n"))); - return -1; - } - } - - return 0; -} int TAO_GIOP_Message_Base::parse_header (TAO_GIOP_Message_State *state) diff --git a/TAO/tao/GIOP_Message_Base.i b/TAO/tao/GIOP_Message_Base.i index 5707d87adcc..e437b2b6963 100644 --- a/TAO/tao/GIOP_Message_Base.i +++ b/TAO/tao/GIOP_Message_Base.i @@ -40,3 +40,40 @@ TAO_GIOP_Message_Base::message_type_offset (void) } +ACE_INLINE int +TAO_GIOP_Message_Base::parse_magic_bytes ( + TAO_GIOP_Message_State *state) +{ + // Grab the read pointer + char *buf = state->cdr.rd_ptr (); + + // The values are hard-coded to support non-ASCII platforms. + if (!(buf [0] == 0x47 // 'G' + && buf [1] == 0x49 // 'I' + && buf [2] == 0x4f // 'O' + && buf [3] == 0x50)) // 'P' + { + // For the present... + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("TAO (%P|%t) bad header, magic word [%c%c%c%c]\n"), + buf[0], + buf[1], + buf[2], + buf[3])); + return -1; + } + + if (this->validate_version (state) == -1) + { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("(%N|%l|%p|%t) Error in validating") + ASYS_TEXT ("revision \n"))); + return -1; + } + } + + return 0; +} diff --git a/TAO/tao/GIOP_Message_Connectors.cpp b/TAO/tao/GIOP_Message_Connectors.cpp index d9a9a28d72d..9cbeec4355d 100644 --- a/TAO/tao/GIOP_Message_Connectors.cpp +++ b/TAO/tao/GIOP_Message_Connectors.cpp @@ -261,3 +261,29 @@ TAO_GIOP_Message_Connector_11:: return 0; } + +CORBA::Octet +TAO_GIOP_Message_Connector_11:: major_version (void) +{ + // Any harm in hardcoding?? + return (CORBA::Octet) 1; +} + +CORBA::Octet +TAO_GIOP_Message_Connector_11:: minor_version (void) +{ + // Any harm in hardcoding?? + return (CORBA::Octet) 1; +} + + +/////////////////////////////////////////////////////////////////// +// Methods for TAO_GIOP_Message_Connector_10 +////////////////////////////////////////////////////////////////// + +CORBA::Octet +TAO_GIOP_Message_Connector_10:: minor_version (void) +{ + // Any harm in hardcoding?? + return (CORBA::Octet) 0; +} diff --git a/TAO/tao/GIOP_Message_Connectors.i b/TAO/tao/GIOP_Message_Connectors.i index 077951d971a..e2024633112 100644 --- a/TAO/tao/GIOP_Message_Connectors.i +++ b/TAO/tao/GIOP_Message_Connectors.i @@ -1,30 +1,3 @@ //$Id$ -/////////////////////////////////////////////////////////////////// -// Methods for TAO_GIOP_Message_Connector_11 -////////////////////////////////////////////////////////////////// -ACE_INLINE CORBA::Octet -TAO_GIOP_Message_Connector_11:: major_version (void) -{ - // Any harm in hardcoding?? - return (CORBA::Octet) 1; -} - -ACE_INLINE CORBA::Octet -TAO_GIOP_Message_Connector_11:: minor_version (void) -{ - // Any harm in hardcoding?? - return (CORBA::Octet) 1; -} - -/////////////////////////////////////////////////////////////////// -// Methods for TAO_GIOP_Message_Connector_10 -////////////////////////////////////////////////////////////////// - -ACE_INLINE CORBA::Octet -TAO_GIOP_Message_Connector_10:: minor_version (void) -{ - // Any harm in hardcoding?? - return (CORBA::Octet) 0; -} |