summaryrefslogtreecommitdiff
path: root/ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch')
-rw-r--r--ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch b/ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch
new file mode 100644
index 00000000000..65433d35488
--- /dev/null
+++ b/ACE/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch
@@ -0,0 +1,70 @@
+Index: Transport.cpp
+===================================================================
+RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/tao/Transport.cpp,v
+retrieving revision 1.115
+diff -u -r1.115 Transport.cpp
+--- Transport.cpp 7 Feb 2005 19:27:20 -0000 1.115
++++ Transport.cpp 21 Feb 2005 14:23:10 -0000
+@@ -106,6 +106,29 @@
+ ACE_Log_Msg::instance ()->release ();
+ }
+
++#define TAO_DUMP_TRANSPORT_DATA
++
++#if defined (TAO_DUMP_TRANSPORT_DATA)
++static void
++dump_transport_data(size_t id,
++ const ACE_Message_Block* message_block)
++{
++ char dump_path[PATH_MAX];
++ ACE_OS::sprintf(dump_path, "transport_data_dump_%d.dat", id);
++
++ ACE_HANDLE dump_out = ACE_OS::open(dump_path, O_WRONLY|O_APPEND);
++ if (dump_out == ACE_INVALID_HANDLE) {
++ dump_out = ACE_OS::open(dump_path, O_WRONLY|O_CREAT,
++ ACE_DEFAULT_FILE_PERMS);
++ }
++ if (dump_out != ACE_INVALID_HANDLE) {
++ ACE_OS::write(dump_out,
++ message_block->rd_ptr (), message_block->length ());
++ ACE_OS::close(dump_out);
++ }
++}
++#endif /* TAO_DUMP_TRANSPORT_DATA */
++
+ TAO_Transport::TAO_Transport (CORBA::ULong tag,
+ TAO_ORB_Core *orb_core)
+ : tag_ (tag)
+@@ -1332,6 +1355,10 @@
+ // Set the write pointer in the stack buffer
+ message_block.wr_ptr (n);
+
++#if defined (TAO_DUMP_TRANSPORT_DATA)
++ dump_transport_data (this->id (), &message_block);
++#endif /* TAO_DUMP_TRANSPORT_DATA */
++
+ // Parse the message and try consolidating the message if
+ // needed.
+ retval = this->parse_consolidate_messages (message_block,
+@@ -1551,6 +1578,10 @@
+
+ incoming.wr_ptr (n);
+ missing_data -= n;
++
++#if defined (TAO_DUMP_TRANSPORT_DATA)
++ dump_transport_data (this->id (), &incoming);
++#endif /* TAO_DUMP_TRANSPORT_DATA */
+ }
+
+ // If we got an error..
+@@ -1981,6 +2012,10 @@
+ // Move the write pointer
+ qd->msg_block_->wr_ptr (n);
+
++#if defined (TAO_DUMP_TRANSPORT_DATA)
++ dump_transport_data (this->id (), qd->msg_block_);
++#endif /* TAO_DUMP_TRANSPORT_DATA */
++
+ // Decrement the missing data
+ qd->missing_data_ -= n;
+