Index: extensions/app_radgw/md5.c
===================================================================
--- extensions/app_radgw/md5.c	(revision 1291)
+++ extensions/app_radgw/md5.c	(revision 972)
@@ -293,5 +293,5 @@
     byteReverse((unsigned char *) ctx->buf, 4);
     os_memcpy(digest, ctx->buf, 16);
-    os_memset(ctx, 0, sizeof(*ctx));	/* In case it's sensitive */
+    os_memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
 }
 
Index: extensions/app_sip/md5.c
===================================================================
--- extensions/app_sip/md5.c	(revision 1291)
+++ extensions/app_sip/md5.c	(revision 972)
@@ -316,5 +316,5 @@
     byteReverse((unsigned char *) ctx->buf, 4);
     os_memcpy(digest, ctx->buf, 16);
-    os_memset(ctx, 0, sizeof(*ctx));	/* In case it's sensitive */
+    os_memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
 }
 
Index: extensions/dbg_msg_dumps/dbg_msg_dumps.c
===================================================================
--- extensions/dbg_msg_dumps/dbg_msg_dumps.c	(revision 1305)
+++ extensions/dbg_msg_dumps/dbg_msg_dumps.c	(revision 1306)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2015, WIDE Project and NICT								 *
+* Copyright (c) 2013, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -93,5 +93,5 @@
 		if (msg) {
 			DiamId_t id = NULL;
-			if (!fd_msg_source_get( msg, &id, NULL ))
+			if (fd_msg_source_get( msg, &id, NULL ))
 				id = (DiamId_t)"<error getting source>";
 			if (!id)
@@ -105,8 +105,4 @@
 		}
 		break;
-	case HOOK_MESSAGE_PARSING_ERROR2:
-		LOG_E("PARSING ERROR, returning:");
-		LOG_SPLIT(FD_LOG_ERROR, "     ", buf, NULL);
-		break;
 	case HOOK_MESSAGE_ROUTING_ERROR:
 		LOG_E("ROUTING ERROR '%s' for: ", (char *)other);
@@ -121,8 +117,4 @@
 	case HOOK_MESSAGE_RECEIVED:
 		LOG_N("RCV from '%s':", peer_name);
-		LOG_SPLIT(FD_LOG_NOTICE, "     ", buf, NULL);
-		break;
-	case HOOK_MESSAGE_SENDING:
-		LOG_N("SNDING to '%s':", peer_name);
 		LOG_SPLIT(FD_LOG_NOTICE, "     ", buf, NULL);
 		break;
@@ -191,5 +183,5 @@
 		if (msg) {
 			DiamId_t id = NULL;
-			if (!fd_msg_source_get( msg, &id, NULL ))
+			if (fd_msg_source_get( msg, &id, NULL ))
 				id = (DiamId_t)"<error getting source>";
 			if (!id)
@@ -202,7 +194,4 @@
 		}
 		break;
-	case HOOK_MESSAGE_PARSING_ERROR2:
-		LOG_E("PARSING ERROR, returning: %s", buf);
-		break;
 	case HOOK_MESSAGE_ROUTING_ERROR:
 		LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf);
@@ -215,7 +204,4 @@
 	case HOOK_MESSAGE_RECEIVED:
 		LOG_N("RCV from '%s': %s", peer_name, buf);
-		break;
-	case HOOK_MESSAGE_SENDING:
-		LOG_N("SNDING to '%s': %s", peer_name, buf);
 		break;
 	case HOOK_MESSAGE_SENT:
@@ -276,5 +262,5 @@
 		if (msg) {
 			DiamId_t id = NULL;
-			if (!fd_msg_source_get( msg, &id, NULL ))
+			if (fd_msg_source_get( msg, &id, NULL ))
 				id = (DiamId_t)"<error getting source>";
 			if (!id)
@@ -287,7 +273,4 @@
 		}
 		break;
-	case HOOK_MESSAGE_PARSING_ERROR2:
-		LOG_E("PARSING ERROR, returning: %s", buf);
-		break;
 	case HOOK_MESSAGE_ROUTING_ERROR:
 		LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf);
@@ -300,7 +283,4 @@
 	case HOOK_MESSAGE_RECEIVED:
 		LOG_N("RCV from '%s': %s", peer_name, buf);
-		break;
-	case HOOK_MESSAGE_SENDING:
-		LOG_N("SNDING to '%s': %s", peer_name, buf);
 		break;
 	case HOOK_MESSAGE_SENT:
@@ -361,6 +341,6 @@
 	}
 	
-	mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_PARSING_ERROR2, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED  );
-	mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ); /* We don t access SENDING hook here */
+	mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED  );
+	mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT );
 	mask_routing= HOOK_MASK( HOOK_MESSAGE_LOCAL, HOOK_MESSAGE_ROUTING_FORWARD, HOOK_MESSAGE_ROUTING_LOCAL );
 	mask_peers  = HOOK_MASK( HOOK_PEER_CONNECT_FAILED, HOOK_PEER_CONNECT_SUCCESS );
Index: extensions/test_app/ta_bench.c
===================================================================
--- extensions/test_app/ta_bench.c	(revision 1294)
+++ extensions/test_app/ta_bench.c	(revision 1206)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2015, WIDE Project and NICT								 *
+* Copyright (c) 2013, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -37,57 +37,7 @@
 
 #include "test_app.h"
+
+#include <semaphore.h>
 #include <stdio.h>
-
-#ifndef __APPLE__ /* they deprecated the semaphore there... */
-#include <semaphore.h>
-
-#define my_sem_t sem_t
-#define my_sem_init sem_init
-#define my_sem_destroy sem_destroy
-#define my_sem_timedwait sem_timedwait
-#define my_sem_post sem_post
-
-#else // on APPLE
-#include <sched.h>
-#include <dispatch/dispatch.h>
-
-#define my_sem_t dispatch_semaphore_t
-
-static int my_sem_init(my_sem_t * s, int pshared, unsigned int value ) {
-	*s = dispatch_semaphore_create(value);
-	if (*s == NULL)
-		return ENOMEM;
-	return 0;
-}
-
-static int my_sem_destroy(my_sem_t *s) {
-	dispatch_release(*s);
-	*s = NULL;
-	return 0;
-}
-
-static int my_sem_timedwait(my_sem_t * s, struct timespec *ts) {
-	struct timespec tsn;
-	int64_t nsec;
-	dispatch_time_t when;
-	
-	CHECK_SYS( clock_gettime(CLOCK_REALTIME, &tsn) );
-	
-	nsec = (ts->tv_sec * 1000000000) + ts->tv_nsec
-		- (tsn.tv_sec * 1000000000) - tsn.tv_nsec;
-	
-	when = dispatch_time (  DISPATCH_TIME_NOW, nsec );
-	
-	return dispatch_semaphore_wait ( *s, when ) ? ETIMEDOUT : 0;
-}
-
-static int my_sem_post(my_sem_t *s) {
-	dispatch_semaphore_signal(*s);
-	return 0;
-}
-
-#endif // APPLE
-
-
 
 struct ta_mess_info {
@@ -96,5 +46,5 @@
 };
 
-static my_sem_t ta_sem; /* To handle the concurrency */
+static sem_t ta_sem; /* To handle the concurrency */
 
 /* Cb called when an answer is received */
@@ -160,5 +110,5 @@
 	
 	/* Post the semaphore */
-	CHECK_SYS_DO( my_sem_post(&ta_sem), );
+	CHECK_SYS_DO( sem_post(&ta_sem), );
 	
 	return;
@@ -264,5 +214,5 @@
 	do {
 		/* Do not create more that NB_CONCURRENT_MESSAGES in paralel */
-		int ret = my_sem_timedwait(&ta_sem, &end_time);
+		int ret = sem_timedwait(&ta_sem, &end_time);
 		if (ret == -1) {
 			ret = errno;
@@ -320,5 +270,5 @@
 int ta_bench_init(void)
 {
-	CHECK_SYS( my_sem_init( &ta_sem, 0, ta_conf->bench_concur) );
+	CHECK_SYS( sem_init( &ta_sem, 0, ta_conf->bench_concur) );
 
 	CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.bench", ta_bench_start ) );
@@ -331,5 +281,5 @@
 	// CHECK_FCT_DO( fd_sig_unregister(ta_conf->signal), /* continue */ );
 	
-	CHECK_SYS_DO( my_sem_destroy(&ta_sem), );
+	CHECK_SYS_DO( sem_destroy(&ta_sem), );
 	
 	return;
Index: extensions/test_app/ta_cli.c
===================================================================
--- extensions/test_app/ta_cli.c	(revision 1305)
+++ extensions/test_app/ta_cli.c	(revision 1214)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2015, WIDE Project and NICT								 *
+* Copyright (c) 2013, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -71,4 +71,5 @@
 		
 		CHECK_FCT_DO( fd_sess_state_retrieve( ta_cli_reg, sess, &mi ), return );
+		TRACE_DEBUG( INFO, "%p %p", mi, data);
 		ASSERT( (void *)mi == data );
 	}
