diff options
Diffstat (limited to 'TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp')
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp index 2d0bd749394..c1ba6c7089b 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/Cubit_Client.cpp @@ -806,7 +806,23 @@ Cubit_Client::cube_octet_sequence (int, ACE_Message_Block mb (l); mb.wr_ptr (l); +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) Cubit::octet_seq input (l, &mb); +#else + // If the form of the constructor is not available, we will need + // to do the copy manually. First, set the octet sequence length. + Cubit::octet_seq input; + CORBA::ULong length = mb.length (); + input.length (length); + + // Now copy over each byte. + char* base = mb.data_block ()->base (); + for(CORBA::ULong i = 0; i < length; i++) + { + input[i] = base[i]; + } +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ + // Just set the first item, otherwise it is hard to compare the // results for longer sequences, i.e. more than just marshalling |