changeset 231:ebd37fdf7a99

Added some verbosity
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 06 Nov 2008 18:21:12 +0900
parents 7cbe3396b122
children 65efaa0c849b
files waaad/peer-in.c waaad/peer-psm.c
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/waaad/peer-in.c	Thu Nov 06 15:17:43 2008 +0900
+++ b/waaad/peer-in.c	Thu Nov 06 18:21:12 2008 +0900
@@ -46,6 +46,8 @@
 static void cleanup_buffer(void * buf)
 {
 	/* We have been canceled while the buffer was being parsed, so free it */
+	TRACE_DEBUG(INFO, "Thread cancelled, received data is lost -- does it happen?");
+	
 	free(buf);
 	
 	return;
@@ -178,6 +180,8 @@
 		
 		pthread_cleanup_pop(0); /* cleanup message */
 	
+		TRACE_DEBUG(FULL, "Received message queued in peer, sending MSGRCVD event");
+		
 		/* post an event "message received" */
 		CHECK_FCT_DO(  _peer_events_send(peer, PEVENT_MSGRCVD, NULL), goto error  );
 		
--- a/waaad/peer-psm.c	Thu Nov 06 15:17:43 2008 +0900
+++ b/waaad/peer-psm.c	Thu Nov 06 18:21:12 2008 +0900
@@ -532,12 +532,14 @@
 	/* Free the CEA */
 	pthread_cleanup_pop(1);
 	
+	TRACE_DEBUG(FULL, "Stopping in/out threads with default sec module");
 	CHECK_FCT( _peer_in_stop(peer) );
 	CHECK_FCT( _peer_out_stop(peer) );
 	
 	/* now activate the security module and start the in/out threads */
 	CHECK_FCT(  sec_getmodfromhdl(peer->p_sec_hdl, &peer->p_secmod)  );
 	
+	TRACE_DEBUG(FULL, "Starting in/out threads with correct sec module");
 	CHECK_FCT( _peer_in_start(peer) );
 	CHECK_FCT( _peer_out_start(peer) );
 	
@@ -551,6 +553,8 @@
 	return 0;
 	
 no_cea:
+	TRACE_DEBUG(INFO, "Did not receive a CEA on initiated connection, resetting");
+	
 	if (cea) {
 		CHECK_FCT_DO( msg_free(cea, 1), /* continue */ );
 	}
@@ -705,6 +709,8 @@
 				CHECK_FCT_DO( meq_post( peer->p_out_q, dwa ),
 					{ msg_free(dwa, 1); return 1; } );
 				
+				TRACE_DEBUG(FULL, "DWA sent back");
+				
 			} else {
 				/* If we received a DWA, clear PEERFL_DW_PENDING */
 				
"Welcome to our mercurial repository"