Index: extensions/app_radgw/md5.c
===================================================================
--- extensions/app_radgw/md5.c	(revision 972)
+++ extensions/app_radgw/md5.c	(revision 1291)
@@ -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 972)
+++ extensions/app_sip/md5.c	(revision 1291)
@@ -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 1306)
+++ extensions/dbg_msg_dumps/dbg_msg_dumps.c	(revision 1307)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
+* Copyright (c) 2015, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -105,4 +105,8 @@
 		}
 		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);
@@ -117,4 +121,8 @@
 	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;
@@ -194,4 +202,7 @@
 		}
 		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);
@@ -204,4 +215,7 @@
 	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:
@@ -273,4 +287,7 @@
 		}
 		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);
@@ -283,4 +300,7 @@
 	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:
@@ -341,6 +361,6 @@
 	}
 	
-	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_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_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 1206)
+++ extensions/test_app/ta_bench.c	(revision 1294)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
+* Copyright (c) 2015, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -37,7 +37,57 @@
 
 #include "test_app.h"
-
+#include <stdio.h>
+
+#ifndef __APPLE__ /* they deprecated the semaphore there... */
 #include <semaphore.h>
-#include <stdio.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 {
@@ -46,5 +96,5 @@
 };
 
-static sem_t ta_sem; /* To handle the concurrency */
+static my_sem_t ta_sem; /* To handle the concurrency */
 
 /* Cb called when an answer is received */
@@ -110,5 +160,5 @@
 	
 	/* Post the semaphore */
-	CHECK_SYS_DO( sem_post(&ta_sem), );
+	CHECK_SYS_DO( my_sem_post(&ta_sem), );
 	
 	return;
@@ -214,5 +264,5 @@
 	do {
 		/* Do not create more that NB_CONCURRENT_MESSAGES in paralel */
-		int ret = sem_timedwait(&ta_sem, &end_time);
+		int ret = my_sem_timedwait(&ta_sem, &end_time);
 		if (ret == -1) {
 			ret = errno;
@@ -270,5 +320,5 @@
 int ta_bench_init(void)
 {
-	CHECK_SYS( sem_init( &ta_sem, 0, ta_conf->bench_concur) );
+	CHECK_SYS( my_sem_init( &ta_sem, 0, ta_conf->bench_concur) );
 
 	CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.bench", ta_bench_start ) );
@@ -281,5 +331,5 @@
 	// CHECK_FCT_DO( fd_sig_unregister(ta_conf->signal), /* continue */ );
 	
-	CHECK_SYS_DO( sem_destroy(&ta_sem), );
+	CHECK_SYS_DO( my_sem_destroy(&ta_sem), );
 	
 	return;
Index: extensions/test_app/ta_cli.c
===================================================================
--- extensions/test_app/ta_cli.c	(revision 1214)
+++ extensions/test_app/ta_cli.c	(revision 1305)
@@ -3,5 +3,5 @@
 * Author: Sebastien Decugis <sdecugis@freediameter.net>							 *
 *													 *
-* Copyright (c) 2013, WIDE Project and NICT								 *
+* Copyright (c) 2015, WIDE Project and NICT								 *
 * All rights reserved.											 *
 * 													 *
@@ -71,5 +71,4 @@
 		
 		CHECK_FCT_DO( fd_sess_state_retrieve( ta_cli_reg, sess, &mi ), return );
-		TRACE_DEBUG( INFO, "%p %p", mi, data);
 		ASSERT( (void *)mi == data );
 	}
