diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-14 02:47:14 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-14 02:47:14 +0000 |
commit | e8b6f99bfb21d2758336bf4fa389a3273d79ee80 (patch) | |
tree | bd26f0810e0f2414a2dae9126746192002b475cb | |
parent | 37db7b13c573bfd04ce789289a2a57a81546de43 (diff) | |
download | ATCD-e8b6f99bfb21d2758336bf4fa389a3273d79ee80.tar.gz |
ChangeLogTag : Tue Jul 13 16:15:43 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r-- | TAO/tao/GIOP.cpp | 46 | ||||
-rw-r--r-- | TAO/tao/Wait_Strategy.cpp | 25 |
2 files changed, 35 insertions, 36 deletions
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp index a4d944796fe..ff8995e5190 100644 --- a/TAO/tao/GIOP.cpp +++ b/TAO/tao/GIOP.cpp @@ -227,43 +227,37 @@ TAO_GIOP::dump_msg (const char *label, { if (TAO_debug_level >= 5) { + // Message name. const char *message_name = "UNKNOWN MESSAGE"; u_long slot = ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET]; if (slot < sizeof (names)/sizeof(names[0])) message_name = names [slot]; + + // Byte order. int byte_order = ptr[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & 0x01; + + // request/reply id. + CORBA::ULong tmp = 0; + CORBA::ULong *id = &tmp; + if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Request || + ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Reply) + { + // @@ Only works if ServiceContextList is empty.... + id = ACE_reinterpret_cast (CORBA::ULong *, + (char * ) (ptr + TAO_GIOP_HEADER_LEN + 4)); + } + + // Print. ACE_DEBUG ((LM_DEBUG, - "(%P | %t):%s GIOP v%c.%c msg, %d data bytes, %s endian, %s", + "(%P | %t):%s GIOP v%c.%c msg, %d data bytes, %s endian, %s = %d\n", label, digits[ptr[TAO_GIOP_VERSION_MAJOR_OFFSET]], digits[ptr[TAO_GIOP_VERSION_MINOR_OFFSET]], len - TAO_GIOP_HEADER_LEN, (byte_order == TAO_ENCAP_BYTE_ORDER) ? "my" : "other", - message_name)); - - if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Request) - { - // @@ Only works if ServiceContextList is empty.... - const CORBA::ULong *request_id = - ACE_reinterpret_cast (const CORBA::ULong *, - ptr + TAO_GIOP_HEADER_LEN + 4); - ACE_DEBUG ((LM_DEBUG, - " = %d\n", - *request_id)); - } - else if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Reply) - { - const CORBA::ULong *request_id = - ACE_reinterpret_cast (const CORBA::ULong *, - ptr + TAO_GIOP_HEADER_LEN + 4); - ACE_DEBUG ((LM_DEBUG, - " = %d\n", - *request_id)); - } - else - ACE_DEBUG ((LM_DEBUG, - "\n")); - + message_name, + *id)); + if (TAO_debug_level >= 10) ACE_HEX_DUMP ((LM_DEBUG, (const char *) ptr, diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index 476c1163de3..cc9c649ec37 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -539,8 +539,9 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, { // = Wait as a follower. - // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - wait (follower) on <%x>\n", - // this->transport_)); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - wait (follower) on <%x>\n", + this->transport_)); // Grab the condtion variable. ACE_SYNCH_CONDITION* cond = @@ -578,8 +579,9 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, "TAO (%P|%t) TAO_Muxed_Wait_On_Leader_Follower::wait - " "remove_follower failed for <%x>\n", cond)); - // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - done (follower:%d) on <%x>\n", - // this->reply_received_, this->transport_)); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - done (follower) on <%x>, reply_received %d\n", + reply_received, this->transport_)); // Now somebody woke us up to become a leader or to handle // our input. We are already removed from the follower queue. @@ -615,14 +617,16 @@ TAO_Muxed_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, // Run the reactor event loop. - // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - wait (leader) on <%x>\n", - // this->transport_)); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - wait (leader):to enter reactor event loop on <%x>\n", + this->transport_)); while (result > 0 && reply_received == 0) result = orb_core->reactor ()->handle_events (max_wait_time); - // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - done (leader) on <%x>\n", - // this->transport_)); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - wait : (leader) : done with reactor event loop on <%x>\n", + this->transport_)); } // Wake up the next leader, we cannot do that in handle_input, @@ -683,8 +687,9 @@ TAO_Muxed_Wait_On_Leader_Follower::handle_input (void) orb_core->leader_follower ().lock (), -1); - // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - reading reply <%x>\n", - // this->transport_)); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - reading reply on <%x>\n", + this->transport_)); // Receive any data that is available, without blocking... int result = this->transport_->handle_client_input (0); |