Index: extensions/acl_wl/aw_tree.c
===================================================================
--- extensions/acl_wl/aw_tree.c	(revision 974)
+++ extensions/acl_wl/aw_tree.c	(revision 1027)
@@ -129,5 +129,5 @@
 	char * s = NULL;
 	
-	TRACE_ENTRY("%p %d %x", str, len, flags);
+	TRACE_ENTRY("%p %zd %x", str, len, flags);
 	
 	if (str) {
Index: extensions/app_diameap/diameap_eap.c
===================================================================
--- extensions/app_diameap/diameap_eap.c	(revision 610)
+++ extensions/app_diameap/diameap_eap.c	(revision 1027)
@@ -57,5 +57,5 @@
 
 static void diameap_ba_policyupdate(struct eap_state_machine * eap_sm,
-		struct eap_packet eapPacket)
+		struct eap_packet *eapPacket)
 {
 	TRACE_ENTRY("%p %p",eap_sm, eapPacket);
@@ -66,8 +66,8 @@
 		u32 vendor;
 		eap_type type;
-		u8 *data = (u8 *) eapPacket.data;
+		u8 *data = (u8 *) eapPacket->data;
 		data += 5;
 		id = 5;
-		while (id < eapPacket.length)
+		while (id < eapPacket->length)
 		{
 			vendor = VENDOR_IETF;
@@ -243,5 +243,5 @@
 static boolean diameap_ba_policydopickup(eap_type type)
 {
-	TRACE_ENTRY("%p",type);
+	TRACE_ENTRY("%d",type);
 	if (type == TYPE_IDENTITY)
 	{
@@ -331,5 +331,5 @@
 			TRACE_DEBUG(FULL+1,"%s[EAP Protocol] New EAP Response received",DIAMEAP_EXTENSION)
 			;
-			diameap_eap_dump(FULL + 1, eap_i->aaaEapRespData);
+			diameap_eap_dump(FULL + 1, &eap_i->aaaEapRespData);
 			if ((eap_sm->rxResp == TRUE) && (eap_sm->respId
 					== eap_sm->currentId) && ((eap_sm->respMethod
@@ -365,5 +365,5 @@
 			TRACE_DEBUG(FULL+1,"%s[EAP Protocol] New EAP packet request created.",DIAMEAP_EXTENSION)
 			;
-			diameap_eap_dump(FULL, eap_i->aaaEapReqData);
+			diameap_eap_dump(FULL, &eap_i->aaaEapReqData);
 			eap_i->aaaEapResp = FALSE;
 			eap_i->aaaEapReq = TRUE;
@@ -516,5 +516,5 @@
 				}
 			}
-			diameap_ba_policyupdate(eap_sm, eap_i->aaaEapRespData);
+			diameap_ba_policyupdate(eap_sm, &eap_i->aaaEapRespData);
 			eap_sm->eap_state = EAP_SELECT_ACTION;
 			break;
Index: extensions/app_diameap/diameap_eappacket.c
===================================================================
--- extensions/app_diameap/diameap_eappacket.c	(revision 974)
+++ extensions/app_diameap/diameap_eappacket.c	(revision 1027)
@@ -39,9 +39,9 @@
 #include "libdiameap.h"
 
-int diameap_eap_get_code(struct eap_packet eappacket, eap_code * eapcode)
+int diameap_eap_get_code(struct eap_packet *eappacket, eap_code * eapcode)
 {
 	TRACE_ENTRY("%p %p",eappacket,eapcode);
 
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		*eapcode = ERROR;
@@ -49,79 +49,79 @@
 		return EINVAL;
 	}
-	if (eappacket.length < 1)
+	if (eappacket->length < 1)
 	{
 		*eapcode = ERROR;
-		TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Code to return.",DIAMEAP_EXTENSION, eappacket.length);
-		return EINVAL;
-	}
-	*eapcode = G8(eappacket.data);
-	return 0;
-}
-
-int diameap_eap_get_identifier(struct eap_packet eappacket, u8 * identifier)
+		TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Code to return.",DIAMEAP_EXTENSION, eappacket->length);
+		return EINVAL;
+	}
+	*eapcode = G8(eappacket->data);
+	return 0;
+}
+
+int diameap_eap_get_identifier(struct eap_packet *eappacket, u8 * identifier)
 {
 	TRACE_ENTRY("%p %p",eappacket,identifier);
 	*identifier = 0;
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Identifier field to return.",DIAMEAP_EXTENSION);
 		return EINVAL;
 	}
-	if (eappacket.length < 2)
-	{
-		TRACE_DEBUG(INFO,"%sEAP packet length %d : no Identifier field to return.",DIAMEAP_EXTENSION, eappacket.length);
-		return EINVAL;
-	}
-	*identifier = G8(eappacket.data + 1);
-	return 0;
-}
-
-int diameap_eap_get_length(struct eap_packet eappacket, u16 *length)
+	if (eappacket->length < 2)
+	{
+		TRACE_DEBUG(INFO,"%sEAP packet length %d : no Identifier field to return.",DIAMEAP_EXTENSION, eappacket->length);
+		return EINVAL;
+	}
+	*identifier = G8(eappacket->data + 1);
+	return 0;
+}
+
+int diameap_eap_get_length(struct eap_packet *eappacket, u16 *length)
 {
 	TRACE_ENTRY("%p %p",eappacket,length);
 	*length = 0;
 
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Length field to return.",DIAMEAP_EXTENSION);
 		return EINVAL;
 	}
-	if (eappacket.ulength < 4)
-	{
-		TRACE_DEBUG(INFO,"%sEAP packet length %d : no Length field to return.",DIAMEAP_EXTENSION, eappacket.length);
-		return EINVAL;
-	}
-	*length = (u16) G16BIGE((eappacket.data + 2));
-	return 0;
-}
-
-int diameap_eap_get_packetlength(struct eap_packet eappacket, u16 *length)
+	if (eappacket->ulength < 4)
+	{
+		TRACE_DEBUG(INFO,"%sEAP packet length %d : no Length field to return.",DIAMEAP_EXTENSION, eappacket->length);
+		return EINVAL;
+	}
+	*length = (u16) G16BIGE((eappacket->data + 2));
+	return 0;
+}
+
+int diameap_eap_get_packetlength(struct eap_packet *eappacket, u16 *length)
 {
 	TRACE_ENTRY("%p %p",eappacket,length);
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Length field to return.",DIAMEAP_EXTENSION);
 		return EINVAL;
 	}
-	*length = eappacket.ulength;
-	return 0;
-}
-
-int diameap_eap_get_type(struct eap_packet eappacket, eap_type * eaptype)
+	*length = eappacket->ulength;
+	return 0;
+}
+
+int diameap_eap_get_type(struct eap_packet *eappacket, eap_type * eaptype)
 {
 	TRACE_ENTRY("%p %p",eappacket,eaptype);
 	*eaptype = 0;
 
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no EAP Type field to return.",DIAMEAP_EXTENSION);
 		return EINVAL;
 	}
-	if (eappacket.length < 5)
-	{
-		TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Type field to return.",DIAMEAP_EXTENSION, eappacket.length);
-		return EINVAL;
-	}
-	*eaptype = (u32) G8(eappacket.data + 4);
+	if (eappacket->length < 5)
+	{
+		TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Type field to return.",DIAMEAP_EXTENSION, eappacket->length);
+		return EINVAL;
+	}
+	*eaptype = (u32) G8(eappacket->data + 4);
 	return 0;
 }
@@ -129,5 +129,5 @@
 boolean diameap_eap_check_code(eap_code code)
 {
-	TRACE_ENTRY("%p",code);
+	TRACE_ENTRY("%d",code);
 	if (code != EAP_REQUEST && code != EAP_RESPONSE && code != EAP_SUCCESS
 			&& code != EAP_FAILURE)
@@ -139,16 +139,16 @@
 }
 
-int diameap_eap_get_packetdata(struct eap_packet eappacket, u8 ** data,
+int diameap_eap_get_packetdata(struct eap_packet *eappacket, u8 ** data,
 		int *len)
 {
 	TRACE_ENTRY("%p %p",eappacket,data);
-	if (eappacket.length > 0)
-	{
-		*data = malloc(sizeof(u8) * eappacket.length);
-		U8COPY(*data,0,eappacket.length,eappacket.data);
-		*len = eappacket.length;
+	if (eappacket->length > 0)
+	{
+		*data = malloc(sizeof(u8) * eappacket->length);
+		U8COPY(*data,0,eappacket->length,eappacket->data);
+		*len = eappacket->length;
 		return 0;
 	}
-	TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket.length);
+	TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket->length);
 	*data = NULL;
 	*len = 0;
@@ -156,15 +156,15 @@
 }
 
-int diameap_eap_get_data(struct eap_packet eappacket, u8 ** data, int * len)
+int diameap_eap_get_data(struct eap_packet *eappacket, u8 ** data, int * len)
 {
 	TRACE_ENTRY("%p %p",eappacket,data);
-	if (eappacket.length > 5)
-	{
-		*data = malloc(sizeof(u8) * (eappacket.length - 5));
-		U8COPY(*data,0,(eappacket.length-5),(eappacket.data+5));
-		*len = eappacket.length - 5;
+	if (eappacket->length > 5)
+	{
+		CHECK_MALLOC( *data = malloc(sizeof(u8) * (eappacket->length - 5)) );
+		U8COPY(*data,0,(eappacket->length-5),(eappacket->data+5));
+		*len = eappacket->length - 5;
 		return 0;
 	}
-	TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket.length);
+	TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket->length);
 	*data = NULL;
 	*len = 0;
@@ -173,15 +173,15 @@
 }
 
-void diameap_eap_dump(int level, struct eap_packet eappacket)
-{
-	TRACE_ENTRY("%p %p",level,eappacket);
+void diameap_eap_dump(int level, struct eap_packet *eappacket)
+{
+	TRACE_ENTRY("%d %p",level,eappacket);
 	if (!TRACE_BOOL(level))
 		return;
 
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 		return;
-	if (eappacket.length < 5)
+	if (eappacket->length < 5)
 		return;
-	if (eappacket.ulength < 5)
+	if (eappacket->ulength < 5)
 		return;
 
@@ -215,5 +215,5 @@
 	CHECK_FCT_DO(diameap_eap_get_length(eappacket,&length),return);
 	fd_log_debug("\t -Length     : %d ", (unsigned int)length);
-	if (eappacket.length > 4)
+	if (eappacket->length > 4)
 	{
 		eap_type type;
@@ -221,13 +221,13 @@
 		fd_log_debug("\t -Type       : %d ", type);
 	}
-	if (eappacket.length > 5)
+	if (eappacket->length > 5)
 	{
 		char buf[1024];
 		snprintf(buf, sizeof(buf), "\t -Data       : ");
-		for (i = 5; i < eappacket.length && i < 30; i++)
+		for (i = 5; i < eappacket->length && i < 30; i++)
 		{
-			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02x ", G8(eappacket.data + i));
+			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02x ", G8(eappacket->data + i));
 		}
-		if(i+1<eappacket.length)
+		if(i+1<eappacket->length)
 			snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "[...] (len=%d)",(unsigned int) length);
 		fd_log_debug("%s", buf);
@@ -240,5 +240,5 @@
 {
 
-	TRACE_ENTRY("%p %p %p %p %p %p", code, id, type, data, dataLength,eappacket);
+	TRACE_ENTRY("%d %hhu %d %p %hu %p", code, id, type, data, dataLength,eappacket);
 
 	int length = 0;
Index: extensions/app_diameap/diameap_eappacket.h
===================================================================
--- extensions/app_diameap/diameap_eappacket.h	(revision 425)
+++ extensions/app_diameap/diameap_eappacket.h	(revision 1027)
@@ -97,5 +97,5 @@
  */
 
-int diameap_eap_get_code(struct eap_packet eapPacket, eap_code * eapcode);
+int diameap_eap_get_code(struct eap_packet *eapPacket, eap_code * eapcode);
 
 
@@ -115,5 +115,5 @@
  */
 
-int diameap_eap_get_identifier(struct eap_packet eapPacket, u8 * identifier);
+int diameap_eap_get_identifier(struct eap_packet *eapPacket, u8 * identifier);
 
 
@@ -132,5 +132,5 @@
  */
 
-int diameap_eap_get_length(struct eap_packet eapPacket, u16 *length);
+int diameap_eap_get_length(struct eap_packet *eapPacket, u16 *length);
 
 
@@ -149,5 +149,5 @@
  */
 
-int diameap_eap_get_packetlength(struct eap_packet eapPacket, u16 *length);
+int diameap_eap_get_packetlength(struct eap_packet *eapPacket, u16 *length);
 
 
@@ -166,5 +166,5 @@
  */
 
-int diameap_eap_get_type(struct eap_packet eapPacket,eap_type * eaptype);
+int diameap_eap_get_type(struct eap_packet *eapPacket,eap_type * eaptype);
 
 
@@ -184,5 +184,5 @@
  */
 
-int diameap_eap_get_packetdata(struct eap_packet eapPacket, u8 ** data, int *len);
+int diameap_eap_get_packetdata(struct eap_packet *eapPacket, u8 ** data, int *len);
 
 
@@ -202,5 +202,5 @@
  */
 
-int diameap_eap_get_data(struct eap_packet eapPacket, u8 ** data, int * len);
+int diameap_eap_get_data(struct eap_packet *eapPacket, u8 ** data, int * len);
 
 
@@ -233,5 +233,5 @@
  */
 
-void diameap_eap_dump(int level, struct eap_packet eapPacket);
+void diameap_eap_dump(int level, struct eap_packet *eapPacket);
 
 
Index: extensions/app_diameap/diameap_mysql.c
===================================================================
--- extensions/app_diameap/diameap_mysql.c	(revision 577)
+++ extensions/app_diameap/diameap_mysql.c	(revision 1027)
@@ -108,5 +108,5 @@
 }
 
-int diameap_authentication_get_attribs(struct eap_user user,
+int diameap_authentication_get_attribs(struct eap_user *user,
 		struct fd_list * attribute_list)
 {
@@ -131,5 +131,5 @@
 			query,
 			"SELECT `authe`.`attribute` ,`authe`.`value` FROM `authe` WHERE `authe`.`grp` IN ( SELECT `user_grp`.`grp` FROM `user_grp` WHERE `user_grp`.`user` = %d ) ",
-			user.id);
+			user->id);
 
 	CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex ));
@@ -169,5 +169,5 @@
 }
 
-int diameap_authorization_get_attribs(struct eap_user user,
+int diameap_authorization_get_attribs(struct eap_user *user,
 		struct fd_list * attribute_list)
 {
@@ -192,5 +192,5 @@
 			query,
 			"SELECT `authz`.`attribute` , `authz`.`op` , `authz`.`value` FROM `authz` WHERE `authz`.`grp` IN ( SELECT `user_grp`.`grp` FROM `user_grp` WHERE `user_grp`.`user` = %d ) ",
-			user.id);
+			user->id);
 
 	CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex ));
Index: extensions/app_diameap/diameap_mysql.h
===================================================================
--- extensions/app_diameap/diameap_mysql.h	(revision 438)
+++ extensions/app_diameap/diameap_mysql.h	(revision 1027)
@@ -57,9 +57,9 @@
 
 /* */
-int diameap_authentication_get_attribs(struct eap_user user,
+int diameap_authentication_get_attribs(struct eap_user *user,
 			struct fd_list * attribute_list);
 
 /* */
-int diameap_authorization_get_attribs(struct eap_user user,
+int diameap_authorization_get_attribs(struct eap_user *user,
 			struct fd_list * attribute_list);
 
Index: extensions/app_diameap/diameap_plugins.c
===================================================================
--- extensions/app_diameap/diameap_plugins.c	(revision 974)
+++ extensions/app_diameap/diameap_plugins.c	(revision 1027)
@@ -46,5 +46,5 @@
 		char * filename, char * conffile)
 {
-	TRACE_ENTRY("%p %p %p %p %p", name, methodtype, vendor, filename, conffile);
+	TRACE_ENTRY("%p %d %d %p %p", name, methodtype, vendor, filename, conffile);
 
 	/* Check the filename is valid */
@@ -83,5 +83,5 @@
 int diameap_plugin_get(u32 vendor, eap_type type, struct plugin ** getplugin)
 {
-	TRACE_ENTRY("%p %p %p",vendor,type,getplugin);
+	TRACE_ENTRY("%d %d %p",vendor,type,getplugin);
 	struct fd_list * pl;
 
@@ -411,5 +411,5 @@
 {
 
-	TRACE_ENTRY("%p %p",vendor,type);
+	TRACE_ENTRY("%d %d",vendor,type);
 	struct fd_list * pl;
 
Index: extensions/app_diameap/diameap_server.c
===================================================================
--- extensions/app_diameap/diameap_server.c	(revision 639)
+++ extensions/app_diameap/diameap_server.c	(revision 1027)
@@ -342,5 +342,5 @@
 
 static int diameap_parse_eap_resp(struct eap_state_machine * eap_sm,
-		struct eap_packet eappacket)
+		struct eap_packet *eappacket)
 {
 	TRACE_ENTRY("%p %p",eap_sm, eappacket)
@@ -352,5 +352,5 @@
 	eap_sm->respVendorMethod = TYPE_NONE;
 
-	if (eappacket.data == NULL)
+	if (eappacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%s Empty EAP packet",DIAMEAP_EXTENSION);
@@ -414,5 +414,5 @@
 	if (eap_sm->respMethod == TYPE_EXPANDED_TYPES)
 	{
-		u8 *data = (u8 *) eappacket.data;
+		u8 *data = (u8 *) eappacket->data;
 		//int len = 0;
 		//u32 respVendor, respVendorMethod;
@@ -455,5 +455,5 @@
 	eappacket->ulength = (u16) avpdata->avp_value->os.len;
 	eappacket->data = (u8 *) avpdata->avp_value->os.data;
-	diameap_eap_get_packetlength(*eappacket, &eappacket->length);
+	diameap_eap_get_packetlength(eappacket, &eappacket->length);
 	return 0;
 }
@@ -477,9 +477,9 @@
 		eap_i->aaaEapResp = TRUE;
 		u16 length;
-		diameap_eap_get_length(eap_i->aaaEapRespData, &length);
+		diameap_eap_get_length(&eap_i->aaaEapRespData, &length);
 		if (length >= 4)
 		{
 			eap_code code;
-			CHECK_FCT(diameap_eap_get_code(eap_i->aaaEapRespData,&code));
+			CHECK_FCT(diameap_eap_get_code(&eap_i->aaaEapRespData,&code));
 
 			if (code != EAP_RESPONSE)
@@ -498,5 +498,5 @@
 			else
 			{
-				CHECK_FCT(diameap_parse_eap_resp(&diameap_sm->eap_sm,eap_i->aaaEapRespData));
+				CHECK_FCT(diameap_parse_eap_resp(&diameap_sm->eap_sm, &eap_i->aaaEapRespData));
 				if (diameap_sm->eap_sm.rxResp == FALSE)
 				{
@@ -1255,5 +1255,5 @@
 		int *ret)
 {
-	TRACE_ENTRY("%p %p %p %p %p", avp_attributes, attribute, avp_attrib, ret);
+	TRACE_ENTRY("%p %p %p %d %p", avp_attributes, attribute, avp_attrib, unlink, ret);
 	if (avp_attributes == NULL)
 	{
@@ -1289,5 +1289,5 @@
 {
 
-	TRACE_ENTRY("%p %p %p %p %p", auth_attributes, attribute, auth_attrib, ret);
+	TRACE_ENTRY("%p %p %p %d %p", auth_attributes, attribute, auth_attrib, unlink, ret);
 
 	if (auth_attributes == NULL)
@@ -1325,5 +1325,5 @@
 		int *ret)
 {
-	TRACE_ENTRY("%p %p %p %p %p", ans_attributes, attribute, ans_attrib, ret);
+	TRACE_ENTRY("%p %p %p %d %p", ans_attributes, attribute, ans_attrib, unlink, ret);
 	if (ans_attributes == NULL)
 	{
@@ -1638,5 +1638,5 @@
 boolean is_operator(int format_type, char * operator)
 {
-	TRACE_ENTRY("%p %p",format_type,operator);
+	TRACE_ENTRY("%d %p",format_type,operator);
 	if ((format_type == DIAMEAP_STR) && (strcmp(operator, "==") == 0 || strcmp(
 			operator, "~=") == 0 || strcmp(operator, "!=") == 0))
@@ -1653,5 +1653,5 @@
 union avp_value diameap_get_num(char * num, enum dict_avp_basetype datatype)
 {
-	TRACE_ENTRY("%p %p",num,datatype);
+	TRACE_ENTRY("%p %d",num,datatype);
 	union avp_value val;
 	switch (datatype)
@@ -1682,8 +1682,8 @@
 }
 
-boolean diameap_check(union avp_value A, char * B, char * operator,
+boolean diameap_check(union avp_value *A, char * B, char * operator,
 		enum dict_avp_basetype datatype)
 {
-	TRACE_ENTRY("%p %p %p %p",A,B,operator,datatype);
+	TRACE_ENTRY("%p %p %p %d",A,B,operator,datatype);
 	if (((datatype == AVP_TYPE_OCTETSTRING) && (is_operator(DIAMEAP_STR,
 			operator) == TRUE)) || ((datatype != AVP_TYPE_OCTETSTRING)
@@ -1697,5 +1697,5 @@
 					operator) == TRUE))
 			{
-				if (strcmp((char *)A.os.data, B) == 0)
+				if (strcmp((char *)A->os.data, B) == 0)
 					return TRUE;
 				else
@@ -1710,20 +1710,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return EQ(A.i32,diameap_get_num(B, datatype).i32);
+					return EQ(A->i32,diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return EQ(A.i64,diameap_get_num(B, datatype).i64);
+					return EQ(A->i64,diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return EQ(A.u32,diameap_get_num(B, datatype).u32);
+					return EQ(A->u32,diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return EQ(A.u64,diameap_get_num(B, datatype).u64);
+					return EQ(A->u64,diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return EQ(A.f32,diameap_get_num(B, datatype).f32);
+					return EQ(A->f32,diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return EQ(A.f64,diameap_get_num(B, datatype).f64);
+					return EQ(A->f64,diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1745,5 +1745,5 @@
 				regex_t rule_regexp;
 				regcomp(&rule_regexp, B, REG_EXTENDED | REG_NOSUB | REG_ICASE);
-				if (regexec(&rule_regexp, (char *)A.os.data, 0, NULL, 0) != 0)
+				if (regexec(&rule_regexp, (char *)A->os.data, 0, NULL, 0) != 0)
 				{
 					authorized = FALSE;
@@ -1766,20 +1766,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return GT(A.i32, diameap_get_num(B, datatype).i32);
+					return GT(A->i32, diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return GT(A.i64, diameap_get_num(B, datatype).i64);
+					return GT(A->i64, diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return GT(A.u32, diameap_get_num(B, datatype).u32);
+					return GT(A->u32, diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return GT(A.u64, diameap_get_num(B, datatype).u64);
+					return GT(A->u64, diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return GT(A.f32, diameap_get_num(B, datatype).f32);
+					return GT(A->f32, diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return GT(A.f64, diameap_get_num(B, datatype).f64);
+					return GT(A->f64, diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1800,20 +1800,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return GE(A.i32,diameap_get_num(B, datatype).i32);
+					return GE(A->i32,diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return GE(A.i64,diameap_get_num(B, datatype).i64);
+					return GE(A->i64,diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return GE(A.u32,diameap_get_num(B, datatype).u32);
+					return GE(A->u32,diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return GE(A.u64,diameap_get_num(B, datatype).u64);
+					return GE(A->u64,diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return GE(A.f32,diameap_get_num(B, datatype).f32);
+					return GE(A->f32,diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return GE(A.f64,diameap_get_num(B, datatype).f64);
+					return GE(A->f64,diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1834,20 +1834,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return LT(A.i32, diameap_get_num(B, datatype).i32);
+					return LT(A->i32, diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return LT(A.i64, diameap_get_num(B, datatype).i64);
+					return LT(A->i64, diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return LT(A.u32, diameap_get_num(B, datatype).u32);
+					return LT(A->u32, diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return LT(A.u64, diameap_get_num(B, datatype).u64);
+					return LT(A->u64, diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return LT(A.f32, diameap_get_num(B, datatype).f32);
+					return LT(A->f32, diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return LT(A.f64, diameap_get_num(B, datatype).f64);
+					return LT(A->f64, diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1868,20 +1868,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return LE(A.i32, diameap_get_num(B, datatype).i32);
+					return LE(A->i32, diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return LE(A.i64, diameap_get_num(B, datatype).i64);
+					return LE(A->i64, diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return LE(A.u32, diameap_get_num(B, datatype).u32);
+					return LE(A->u32, diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return LE(A.u64, diameap_get_num(B, datatype).u64);
+					return LE(A->u64, diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return LE(A.f32, diameap_get_num(B, datatype).f32);
+					return LE(A->f32, diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return LE(A.f64, diameap_get_num(B, datatype).f64);
+					return LE(A->f64, diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1898,5 +1898,5 @@
 					operator) == TRUE))
 			{
-				if (strcmp((char *)A.os.data, B) != 0)
+				if (strcmp((char *)A->os.data, B) != 0)
 					return TRUE;
 				else
@@ -1910,20 +1910,20 @@
 				{
 				case AVP_TYPE_INTEGER32://i32
-					return NE(A.i32, diameap_get_num(B, datatype).i32);
+					return NE(A->i32, diameap_get_num(B, datatype).i32);
 					break;
 				case AVP_TYPE_INTEGER64://i64
-					return NE(A.i64, diameap_get_num(B, datatype).i64);
+					return NE(A->i64, diameap_get_num(B, datatype).i64);
 					break;
 				case AVP_TYPE_UNSIGNED32://u32
-					return NE(A.u32, diameap_get_num(B, datatype).u32);
+					return NE(A->u32, diameap_get_num(B, datatype).u32);
 					break;
 				case AVP_TYPE_UNSIGNED64://u64
-					return NE(A.u64, diameap_get_num(B, datatype).u64);
+					return NE(A->u64, diameap_get_num(B, datatype).u64);
 					break;
 				case AVP_TYPE_FLOAT32://f32
-					return NE(A.f32, diameap_get_num(B, datatype).f32);
+					return NE(A->f32, diameap_get_num(B, datatype).f32);
 					break;
 				case AVP_TYPE_FLOAT64://f64
-					return NE(A.f64, diameap_get_num(B, datatype).f64);
+					return NE(A->f64, diameap_get_num(B, datatype).f64);
 					break;
 				default:
@@ -1992,18 +1992,18 @@
 }
 
-int diameap_answer_set_attribute_valueA(union avp_value A, int *tofree,
+int diameap_answer_set_attribute_valueA(union avp_value *A, int *tofree,
 		enum dict_avp_basetype datatype, union avp_value * rval)
 {
-	TRACE_ENTRY("%p %p %p %p",A,tofree,datatype,rval);
+	TRACE_ENTRY("%p %p %d %p",A,tofree,datatype,rval);
 	if (datatype == AVP_TYPE_OCTETSTRING)
 	{
-		CHECK_MALLOC(rval->os.data=malloc(A.os.len));
-		memcpy(rval->os.data,A.os.data,A.os.len);
-		rval->os.len = A.os.len;
+		CHECK_MALLOC(rval->os.data=malloc(A->os.len));
+		memcpy(rval->os.data,A->os.data,A->os.len);
+		rval->os.len = A->os.len;
 		*tofree = 1;
 	}
 	else
 	{
-		*rval = A;
+		*rval = *A;
 	}
 	return 0;
@@ -2012,5 +2012,5 @@
 		enum dict_avp_basetype datatype, union avp_value * rval)
 {
-	TRACE_ENTRY("%p %p %p %p",B,tofree,datatype,rval);
+	TRACE_ENTRY("%p %p %d %p",B,tofree,datatype,rval);
 	if (datatype == AVP_TYPE_OCTETSTRING)
 	{
@@ -2092,5 +2092,5 @@
 			if (ret == 0)
 			{
-				checked = diameap_check(avp_attrib->value, auth_attrib->value,
+				checked = diameap_check(&avp_attrib->value, auth_attrib->value,
 						op, avpdata.avp_basetype);
 			}
@@ -2119,5 +2119,5 @@
 						{
 							diameap_answer_set_attribute_valueA(
-									avp_attrib->value, &ans_attrib->tofree,
+									&avp_attrib->value, &ans_attrib->tofree,
 									avpdata.avp_basetype, &ans_attrib->value);
 						}
@@ -2146,5 +2146,5 @@
 					if (toadd == 1)
 					{
-						diameap_answer_set_attribute_valueA(avp_attrib->value,
+						diameap_answer_set_attribute_valueA(&avp_attrib->value,
 								&ans_attrib->tofree, avpdata.avp_basetype,
 								&ans_attrib->value);
@@ -2177,9 +2177,9 @@
 
 static int diameap_policy_decision(struct diameap_state_machine * diameap_sm,
-		struct diameap_eap_interface eap_i)
+		struct diameap_eap_interface *eap_i)
 {
 	TRACE_ENTRY("%p %p",diameap_sm,eap_i);
 
-	if ((eap_i.aaaFail == TRUE) && (eap_i.aaaSuccess == TRUE))
+	if ((eap_i->aaaFail == TRUE) && (eap_i->aaaSuccess == TRUE))
 	{
 		TRACE_DEBUG(INFO,"%s Incorrect EAP decision. EAP process should not return both success and failure for the same session.(please report this problem.)",DIAMEAP_EXTENSION);
@@ -2187,5 +2187,5 @@
 	}
 
-	if (eap_i.aaaFail == TRUE)
+	if (eap_i->aaaFail == TRUE)
 	{
 		diameap_sm->result_code = 4001; /* DIAMETER_AUTHENTICATION_REJECTED 4001 */
@@ -2195,5 +2195,5 @@
 	}
 
-	if (eap_i.aaaSuccess == FALSE)
+	if (eap_i->aaaSuccess == FALSE)
 	{
 		diameap_sm->result_code = 1001; /* DIAMETER_MULTI_ROUND_AUTH 1001 */
@@ -2201,5 +2201,5 @@
 	}
 
-	if (eap_i.aaaSuccess == TRUE)
+	if (eap_i->aaaSuccess == TRUE)
 	{
 		if (diameap_sm->auth_request_val == AUTHORIZE_AUTHENTICATE)
@@ -2874,5 +2874,5 @@
 
 static int diameap_add_eap_payload(struct diameap_state_machine * diameap_sm,
-		struct msg * ans, struct diameap_eap_interface eap_i)
+		struct msg * ans, struct diameap_eap_interface *eap_i)
 {
 	TRACE_ENTRY("%p %p",diameap_sm,ans);
@@ -2907,5 +2907,5 @@
 	EAP_Max_Length = Framed_MTU - NAS_Port_Type_HeaderLength;
 
-	if (eap_i.aaaEapReqData.length <= EAP_Max_Length)
+	if (eap_i->aaaEapReqData.length <= EAP_Max_Length)
 	{
 
@@ -2913,6 +2913,6 @@
 		{
 			CHECK_FCT(fd_msg_avp_new(dataobj_eap_payload, 0, &avp));
-			avp_val.os.data = eap_i.aaaEapReqData.data;
-			avp_val.os.len = eap_i.aaaEapReqData.length;
+			avp_val.os.data = eap_i->aaaEapReqData.data;
+			avp_val.os.len = eap_i->aaaEapReqData.length;
 			CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val));
 			CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) );
@@ -2925,6 +2925,6 @@
 
 			CHECK_FCT(fd_msg_avp_new(dataobj_eap_payload, 0, &diameap_sm->lastReqEAPavp));
-			avp_val.os.data = eap_i.aaaEapReqData.data;
-			avp_val.os.len = eap_i.aaaEapReqData.length;
+			avp_val.os.data = eap_i->aaaEapReqData.data;
+			avp_val.os.len = eap_i->aaaEapReqData.length;
 			CHECK_FCT(fd_msg_avp_setvalue(diameap_sm->lastReqEAPavp, &avp_val));
 
@@ -2947,5 +2947,5 @@
 static int diameap_add_eap_success_avps(
 		struct diameap_state_machine * diameap_sm, struct msg * ans,
-		struct diameap_eap_interface eap_i)
+		struct diameap_eap_interface *eap_i)
 {
 	TRACE_ENTRY("%p %p %p",diameap_sm,ans,eap_i);
@@ -2955,9 +2955,9 @@
 
 	/* EAP-Master-Session-Key AVP */
-	if (eap_i.aaaEapKeyAvailable == TRUE)
+	if (eap_i->aaaEapKeyAvailable == TRUE)
 	{
 		CHECK_FCT(fd_msg_avp_new(dataobj_eap_master_session_key, 0, &avp));
-		avp_val.os.data = eap_i.aaaEapMSKData;
-		avp_val.os.len = eap_i.aaaEapMSKLength;
+		avp_val.os.data = eap_i->aaaEapMSKData;
+		avp_val.os.len = eap_i->aaaEapMSKLength;
 		CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val));
 		CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) );
@@ -2989,5 +2989,5 @@
 	TRACE_ENTRY("%p",diameap_sm);
 
-	CHECK_FCT(diameap_authorization_get_attribs(diameap_sm->eap_sm.user, &diameap_sm->attributes));
+	CHECK_FCT(diameap_authorization_get_attribs(&diameap_sm->eap_sm.user, &diameap_sm->attributes));
 
 	diameap_sm->authorized = TRUE;
@@ -3178,5 +3178,5 @@
 		case DIAMEAP_SELECT_DECISION:
 
-			CHECK_FCT_DO( diameap_policy_decision(diameap_sm,eap_i),
+			CHECK_FCT_DO( diameap_policy_decision(diameap_sm,&eap_i),
 					goto s_end)
 			;
@@ -3222,9 +3222,9 @@
 				{
 					TRACE_DEBUG(FULL+1,"%sSelect authentication attributes.",DIAMEAP_EXTENSION);
-					CHECK_FCT_DO(diameap_authentication_get_attribs(diameap_sm->eap_sm.user, &diameap_sm->attributes),
+					CHECK_FCT_DO(diameap_authentication_get_attribs(&diameap_sm->eap_sm.user, &diameap_sm->attributes),
 							{	TRACE_DEBUG(INFO,"%s Unable to get user's session attributes.",DIAMEAP_EXTENSION); goto s_end;});
 					TRACE_DEBUG(FULL+1,"%sCreate answer authentication attributes.",DIAMEAP_EXTENSION);
 					CHECK_FCT_DO(diameap_answer_avp_attributes(diameap_sm),
-							{	TRACE_DEBUG(INFO,"% Unable to generate answer attributes.",DIAMEAP_EXTENSION); goto s_end;});
+							{	TRACE_DEBUG(INFO,"%s Unable to generate answer attributes.",DIAMEAP_EXTENSION); goto s_end;});
 				}
 
@@ -3253,5 +3253,5 @@
 			TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION)
 			;
-			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,eap_i),
+			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i),
 					{	TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;})
 			;
@@ -3282,5 +3282,5 @@
 			TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION)
 			;
-			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,eap_i),
+			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i),
 					{	TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;})
 			;
@@ -3312,10 +3312,10 @@
 			TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION)
 			;
-			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,eap_i),
+			CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i),
 					{	TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;})
 			;
 			TRACE_DEBUG(FULL+1,"%sAdding EAP success AVPs AVPs to Diameter-EAP-Answer.",DIAMEAP_EXTENSION)
 			;
-			CHECK_FCT_DO( diameap_add_eap_success_avps(diameap_sm, ans, eap_i),
+			CHECK_FCT_DO( diameap_add_eap_success_avps(diameap_sm, ans, &eap_i),
 					goto s_end)
 			;
Index: extensions/app_diameap/diameap_user.c
===================================================================
--- extensions/app_diameap/diameap_user.c	(revision 425)
+++ extensions/app_diameap/diameap_user.c	(revision 1027)
@@ -39,29 +39,29 @@
 #include "libdiameap.h"
 
-int diameap_user_get_userid(struct eap_user user, u8* userid)
+int diameap_user_get_userid(struct eap_user *user, u8* userid)
 {
 	TRACE_ENTRY("%p %p",user,userid);
-	if (user.userid == NULL)
+	if (user->userid == NULL)
 		return EINVAL;
-	userid = user.userid;
+	userid = user->userid;
 	return 0;
 }
 
-int diameap_user_get_password(struct eap_user user, u8* password,u16 * passwordlength)
+int diameap_user_get_password(struct eap_user *user, u8* password,u16 * passwordlength)
 {
 	TRACE_ENTRY("%p %p",user,password);
-	if (user.password == NULL)
+	if (user->password == NULL)
 		return EINVAL;
-	password = user.password;
-	*passwordlength = user.passwordLength;
+	password = user->password;
+	*passwordlength = user->passwordLength;
 	return 0;
 }
 
-int diameap_user_get_passwordlength(struct eap_user user, u16 * passwordlength)
+int diameap_user_get_passwordlength(struct eap_user *user, u16 * passwordlength)
 {
 	TRACE_ENTRY("%p %p",user,passwordlength);
-	if (user.password == NULL)
+	if (user->password == NULL)
 		return EINVAL;
-	*passwordlength = user.passwordLength;
+	*passwordlength = user->passwordLength;
 	return 0;
 }
@@ -70,5 +70,5 @@
 		u16 passwordLength)
 {
-	TRACE_ENTRY("%p %p %p",user,password,passwordLength);
+	TRACE_ENTRY("%p %p %hu",user,password,passwordLength);
 	if (password == NULL)
 		return EINVAL;
@@ -83,5 +83,5 @@
 		u16 useridLength)
 {
-	TRACE_ENTRY("%p %p %p",user,userid,useridLength);
+	TRACE_ENTRY("%p %p %hu",user,userid,useridLength);
 	if (userid == NULL)
 		return EINVAL;
@@ -93,10 +93,10 @@
 }
 
-int diameap_user_get_methodid(struct eap_user user, int * methodid)
+int diameap_user_get_methodid(struct eap_user *user, int * methodid)
 {
 	TRACE_ENTRY("%p %p",user,methodid);
-	if (user.password == NULL)
+	if (user->password == NULL)
 		return EINVAL;
-	*methodid = user.methodId;
+	*methodid = user->methodId;
 	return 0;
 }
@@ -104,5 +104,5 @@
 int diameap_user_set_methodid(struct eap_user * user, int methodId)
 {
-	TRACE_ENTRY("%p %p",user,methodId);
+	TRACE_ENTRY("%p %d",user,methodId);
 	if (user->password == NULL)
 		return EINVAL;
@@ -113,10 +113,10 @@
 }
 
-boolean diameap_user_issuccess(struct eap_user user)
+boolean diameap_user_issuccess(struct eap_user *user)
 {
 	TRACE_ENTRY("%p",user);
-	if (user.password == NULL)
+	if (user->password == NULL)
 		return FALSE;
-	return user.success;
+	return user->success;
 }
 
@@ -130,23 +130,23 @@
 }
 
-int diameap_user_get_eap_method(struct eap_user user, int id,
+int diameap_user_get_eap_method(struct eap_user *user, int id,
 		struct eap_method *method)
 {
-	TRACE_ENTRY("%p %p %p",user,id,method);
-	if (sizeof(user.methods) >= (id - 1))
-		*method = user.methods[id];
+	TRACE_ENTRY("%p %d %p",user,id,method);
+	if (sizeof(user->methods) >= (id - 1))
+		*method = user->methods[id];
 	return 0;
 }
 
 int diameap_user_set_eap_method(struct eap_user * user, int id,
-		struct eap_method method)
+		struct eap_method * method)
 {
-	TRACE_ENTRY("%p %p %p",user,id,method);
+	TRACE_ENTRY("%p %d %p",user,id,method);
 	if (user->password == NULL)
 		return EINVAL;
 	if (sizeof(user->methods) < (id - 1))
 		return EINVAL;
-	user->methods[id].vendor = method.vendor;
-	user->methods[id].method = method.method;
+	user->methods[id].vendor = method->vendor;
+	user->methods[id].method = method->method;
 	return 0;
 }
Index: extensions/app_diameap/diameap_user.h
===================================================================
--- extensions/app_diameap/diameap_user.h	(revision 565)
+++ extensions/app_diameap/diameap_user.h	(revision 1027)
@@ -76,7 +76,7 @@
 boolean check_user_identity;
 
-int diameap_user_get_password(struct eap_user user, u8 * password,u16 *length);
+int diameap_user_get_password(struct eap_user *user, u8 * password,u16 *length);
 
-int diameap_user_get_userid(struct eap_user user, u8 * userid);
+int diameap_user_get_userid(struct eap_user *user, u8 * userid);
 
 int diameap_user_set_password(struct eap_user * user, u8 * password, u16 Length);
@@ -84,15 +84,15 @@
 int diameap_user_set_userid(struct eap_user * user, u8 * userid, u16 Length);
 
-int diameap_user_get_methodid(struct eap_user user,int *methodId);
+int diameap_user_get_methodid(struct eap_user *user,int *methodId);
 
 int diameap_user_set_methodid(struct eap_user * user, int methodId);
 
-boolean diameap_user_issuccess(struct eap_user user);
+boolean diameap_user_issuccess(struct eap_user *user);
 
 int diameap_user_set_success(struct eap_user * user);
 
-int diameap_user_get_eap_method(struct eap_user user, int id, struct eap_method * eapmethod);
+int diameap_user_get_eap_method(struct eap_user *user, int id, struct eap_method * eapmethod);
 
-int diameap_user_set_eap_method(struct eap_user * user, int id, struct eap_method method);
+int diameap_user_set_eap_method(struct eap_user * user, int id, struct eap_method * method);
 
 #endif /* DIAMEAP_USER_H_ */
Index: extensions/app_diameap/plugins/eap_identity/eap_identity.c
===================================================================
--- extensions/app_diameap/plugins/eap_identity/eap_identity.c	(revision 577)
+++ extensions/app_diameap/plugins/eap_identity/eap_identity.c	(revision 1027)
@@ -49,6 +49,6 @@
 int identity_initPickUp(struct eap_state_machine *smd);
 int identity_buildReq(struct eap_state_machine *smd, u8 identity, struct eap_packet * eapPacket);
-boolean identity_check(struct eap_state_machine *smd, struct eap_packet eapRespData);
-int identity_process(struct eap_state_machine *smd, struct eap_packet eapRespData);
+boolean identity_check(struct eap_state_machine *smd, struct eap_packet *eapRespData);
+int identity_process(struct eap_state_machine *smd, struct eap_packet *eapRespData);
 boolean identity_isDone(struct eap_state_machine *smd);
 void identity_free(void * data);
@@ -87,8 +87,8 @@
 
 
-boolean identity_check(struct eap_state_machine *smd, struct eap_packet eapPacket)
+boolean identity_check(struct eap_state_machine *smd, struct eap_packet *eapPacket)
 {
 
-	if (eapPacket.data == NULL)
+	if (eapPacket->data == NULL)
 	{
 		TRACE_DEBUG(INFO,"%s[EAP Identity plugin] Empty EAP packet received.",DIAMEAP_EXTENSION);
@@ -118,5 +118,5 @@
 }
 
-int identity_process(struct eap_state_machine *smd, struct eap_packet eapRespData)
+int identity_process(struct eap_state_machine *smd, struct eap_packet *eapRespData)
 {
 	struct identity_data * data;
Index: extensions/app_diameap/plugins/eap_md5/eap_md5.c
===================================================================
--- extensions/app_diameap/plugins/eap_md5/eap_md5.c	(revision 959)
+++ extensions/app_diameap/plugins/eap_md5/eap_md5.c	(revision 1027)
@@ -58,6 +58,6 @@
 int eap_md5_buildReq(struct eap_state_machine *smd, u8 eap_md5,
 		struct eap_packet * eapPacket);
-boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet eapRespData);
-int eap_md5_process(struct eap_state_machine *smd, struct eap_packet eapRespData);
+boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet *eapRespData);
+int eap_md5_process(struct eap_state_machine *smd, struct eap_packet *eapRespData);
 boolean eap_md5_isDone(struct eap_state_machine *smd);
 void eap_md5_free(void * data);
@@ -115,5 +115,5 @@
 
 
-boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet eapRespData)
+boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet *eapRespData)
 {
 	eap_type type;
@@ -137,5 +137,5 @@
 
 
-int eap_md5_process(struct eap_state_machine *smd, struct eap_packet eapRespData)
+int eap_md5_process(struct eap_state_machine *smd, struct eap_packet *eapRespData)
 {
 
@@ -158,5 +158,5 @@
 	for (i = 0; i < CHALLENGE_LEN; i++)
 	{
-		if (G8(hash + i) != G8(eapRespData.data + 6 + i))
+		if (G8(hash + i) != G8(eapRespData->data + 6 + i))
 		{
 			data->state = EAP_MD5_FAILURE;
Index: extensions/app_diameap/plugins/eap_tls/eap_tls.c
===================================================================
--- extensions/app_diameap/plugins/eap_tls/eap_tls.c	(revision 825)
+++ extensions/app_diameap/plugins/eap_tls/eap_tls.c	(revision 1027)
@@ -46,7 +46,7 @@
 int eap_tls_getTimeout(struct eap_state_machine *smd, int * timeout);
 boolean eap_tls_check(struct eap_state_machine *smd,
-		struct eap_packet eapRespData);
+		struct eap_packet *eapRespData);
 int eap_tls_process(struct eap_state_machine *smd,
-		struct eap_packet eapRespData);
+		struct eap_packet *eapRespData);
 boolean eap_tls_isDone(struct eap_state_machine *smd);
 int eap_tls_getKey(struct eap_state_machine *smd, u8** msk, int * msklen, u8** emsk, int * emsklen);
@@ -149,5 +149,5 @@
 
 boolean eap_tls_check(struct eap_state_machine *smd,
-		struct eap_packet eapRespData)
+		struct eap_packet *eapRespData)
 {
 	eap_type type;
@@ -165,5 +165,5 @@
 
 int eap_tls_process(struct eap_state_machine *smd,
-		struct eap_packet eapRespData)
+		struct eap_packet *eapRespData)
 {
 	struct tls_data * data;
@@ -353,5 +353,5 @@
 
 // parse EAP TLS msg
-int diameap_eap_tls_parse(struct tls_msg * tlsmsg, struct eap_packet eapPacket)
+int diameap_eap_tls_parse(struct tls_msg * tlsmsg, struct eap_packet *eapPacket)
 {
 	u8 *datatls;
Index: extensions/app_diameap/plugins/eap_tls/eap_tls.h
===================================================================
--- extensions/app_diameap/plugins/eap_tls/eap_tls.h	(revision 438)
+++ extensions/app_diameap/plugins/eap_tls/eap_tls.h	(revision 1027)
@@ -46,5 +46,5 @@
 int diameap_eap_tls_buildReq_start(u8 id, struct eap_packet * eapPacket);
 int diameap_eap_tls_buildReq_data(struct tls_data * data,int id,struct eap_packet * eapPacket);
-int diameap_eap_tls_parse(struct tls_msg * eaptls,struct eap_packet eapPacket);
+int diameap_eap_tls_parse(struct tls_msg * eaptls,struct eap_packet *eapPacket);
 int eaptlsparse(struct tls_config * conf);
 
Index: extensions/app_radgw/radius.c
===================================================================
--- extensions/app_radgw/radius.c	(revision 996)
+++ extensions/app_radgw/radius.c	(revision 1027)
@@ -519,5 +519,5 @@
 	int ret = 0;
 	
-	TRACE_ENTRY("%p %g %p", buf, len, msg);
+	TRACE_ENTRY("%p %zd %p", buf, len, msg);
 	
 	CHECK_PARAMS( buf && len >= sizeof(*hdr) && msg );
Index: extensions/app_radgw/rgw_clients.c
===================================================================
--- extensions/app_radgw/rgw_clients.c	(revision 977)
+++ extensions/app_radgw/rgw_clients.c	(revision 1027)
@@ -163,5 +163,5 @@
 				if (now - r->received > DUPLICATE_CHECK_LIFETIME) {
 				
-					TRACE_DEBUG(ANNOYING + 1, "Purging RADIUS request (id: %02hhx, port: %hu, dup #%d, age %d secs)", r->id, ntohs(r->port), r->nbdup, now - r->received);
+					TRACE_DEBUG(ANNOYING + 1, "Purging RADIUS request (id: %02hhx, port: %hu, dup #%d, age %ld secs)", r->id, ntohs(r->port), r->nbdup, (long)(now - r->received));
 					
 					/* Remove this record */
@@ -459,6 +459,6 @@
 		time_t now = time(NULL);
 		r->nbdup += 1;
-		TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu, dup #%d, previously seen %d secs ago).", 
-				r->id, ntohs(r->port), r->nbdup, now - r->received);
+		TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu, dup #%d, previously seen %ld secs ago).", 
+				r->id, ntohs(r->port), r->nbdup, (long)(now - r->received));
 		
 		if (r->ans) {
@@ -780,5 +780,5 @@
 				if (cli->type == RGW_CLI_NAS) {
 					TRACE_DEBUG(INFO, "The NAS-Identifier value '%.*s' resolves to a different IP than the client's, discarding the message. Configure this client as a Proxy if this message should be valid.", 
-						nas_id_len, nas_id + 1);
+						(int)nas_id_len, (char *)(nas_id + 1));
 					return EINVAL;
 				} else {
@@ -813,5 +813,5 @@
 
 				cli->aliases_nb ++;
-				TRACE_DEBUG(FULL, "Saved valid alias for client: '%.*s' -> '%s'", nas_id_len, nas_id + 1, cli->fqdn);
+				TRACE_DEBUG(FULL, "Saved valid alias for client: '%.*s' -> '%s'", (int)nas_id_len, (char *)(nas_id + 1), cli->fqdn);
 				CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) );
 			}
Index: extensions/app_radgw/rgw_servers.c
===================================================================
--- extensions/app_radgw/rgw_servers.c	(revision 996)
+++ extensions/app_radgw/rgw_servers.c	(revision 1027)
@@ -279,5 +279,5 @@
 		char __buf[1024];
 		sSA_DUMP_NODE_SERV(__buf, sizeof(__buf), &sto, NI_NUMERICHOST | NI_NUMERICSERV );
-		TRACE_DEBUG(FULL, "Sending %d bytes to %s", buflen, __buf);
+		TRACE_DEBUG(FULL, "Sending %zd bytes to %s", buflen, __buf);
 	}
 		
Index: extensions/app_radgw/rgwx_acct.c
===================================================================
--- extensions/app_radgw/rgwx_acct.c	(revision 996)
+++ extensions/app_radgw/rgwx_acct.c	(revision 1027)
@@ -365,5 +365,5 @@
 					si = v + pref_len;
 					si_len = attr_len - pref_len;
-					TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), SI:'%.*s'.", prefix, idx, si_len, si);
+					TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), SI:'%.*s'.", prefix, idx, (int)si_len, si);
 					/* Remove from the message */
 					for (i = idx + 1; i < rad_req->attr_used; i++)
@@ -377,5 +377,5 @@
 					un = v;
 					un_len = attr_len;
-					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", un_len, un);
+					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)un_len, un);
 				}
 				break;
@@ -490,5 +490,5 @@
 		CHECK_FCT( fd_sess_fromsid_msg ( si, si_len, &sess, NULL) );
 		
-		TRACE_DEBUG(FULL, "[acct.rgwx] Translating new accounting message for session '%.*s'...", si_len, si);
+		TRACE_DEBUG(FULL, "[acct.rgwx] Translating new accounting message for session '%.*s'...", (int)si_len, si);
 		
 		/* Add the Session-Id AVP as first AVP */
@@ -1271,11 +1271,11 @@
 			fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response",
 					ahdr->avp_value->u32, 
-					oh->avp_value->os.len, oh->avp_value->os.data,
-					sidlen, sid);
+					(int)oh->avp_value->os.len, oh->avp_value->os.data,
+					(int)sidlen, sid);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp) );
 			if (avp) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
 				fd_log_debug("[acct.rgwx]   Error-Message content: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp) );
@@ -1283,5 +1283,5 @@
 				CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) );
 				fd_log_debug("[acct.rgwx]   Error-Reporting-Host: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp) );
Index: extensions/app_radgw/rgwx_auth.c
===================================================================
--- extensions/app_radgw/rgwx_auth.c	(revision 996)
+++ extensions/app_radgw/rgwx_auth.c	(revision 1027)
@@ -369,5 +369,5 @@
 					si_len = attr_len - i;
 
-					TRACE_DEBUG(ANNOYING, "Attribute parsed successfully: DH:'%.*s' DR:'%.*s' SI:'%.*s'.", dh_len, dh, dr_len, dr, si_len, si);
+					TRACE_DEBUG(ANNOYING, "Attribute parsed successfully: DH:'%.*s' DR:'%.*s' SI:'%.*s'.", (int)dh_len, dh, (int)dr_len, dr, (int)si_len, si);
 					/* Remove from the message */
 					for (i = idx + 1; i < rad_req->attr_used; i++)
@@ -379,5 +379,5 @@
 		
 			case RADIUS_ATTR_USER_NAME:
-				TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr_len, attr_len ? (char *)attr_val : "");
+				TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)attr_len, attr_len ? (char *)attr_val : "");
 				un = attr_val;
 				un_len = attr_len;
@@ -1242,11 +1242,11 @@
 			fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject",
 					ahdr->avp_value->u32, 
-					oh->avp_value->os.len, oh->avp_value->os.data,
-					sidlen, sid);
+					(int)oh->avp_value->os.len, oh->avp_value->os.data,
+					(int)sidlen, sid);
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp_x) );
 			if (avp_x) {
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
 				fd_log_debug("[auth.rgwx]   Error-Message content: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp_x) );
@@ -1254,5 +1254,5 @@
 				CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) );
 				fd_log_debug("[auth.rgwx]   Error-Reporting-Host: '%.*s'",
-						ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+						(int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 			}
 			CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp_x) );
@@ -1457,6 +1457,6 @@
 								(ahdr->avp_value->u32 == 1) ? "AUTHENTICATE_ONLY" :
 									((ahdr->avp_value->u32 == 2) ? "AUTHORIZE_ONLY" : "???"),
-								oh->avp_value->os.len, oh->avp_value->os.data, 
-								sidlen, sid);
+								(int)oh->avp_value->os.len, oh->avp_value->os.data, 
+								(int)sidlen, sid);
 					}
 					break;
@@ -1618,6 +1618,6 @@
 					/* This is not translatable to RADIUS */
 					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
-							oh->avp_value->os.len, oh->avp_value->os.data,
-							sidlen, sid);
+							(int)oh->avp_value->os.len, oh->avp_value->os.data,
+							(int)sidlen, sid);
 					handled = 0;
 					break;
@@ -1651,6 +1651,6 @@
 					/* This is not translatable to RADIUS */
 					fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.",
-							oh->avp_value->os.len, oh->avp_value->os.data,
-							sidlen, sid);
+							(int)oh->avp_value->os.len, oh->avp_value->os.data,
+							(int)sidlen, sid);
 					handled = 0;
 					break;
@@ -1859,5 +1859,5 @@
 						
 						if (ahdr->avp_value->os.len != 64) {
-							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64.", ahdr->avp_value->os.len)
+							TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %zd != 64.", ahdr->avp_value->os.len)
 						}
 						
Index: extensions/app_radgw/rgwx_sip.c
===================================================================
--- extensions/app_radgw/rgwx_sip.c	(revision 996)
+++ extensions/app_radgw/rgwx_sip.c	(revision 1027)
@@ -366,5 +366,5 @@
 				if (attr->length>sizeof(struct radius_attr_hdr)) 
 				{
-					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", attr->length- sizeof(struct radius_attr_hdr), (char *)(attr+1));
+					TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)(attr->length- sizeof(struct radius_attr_hdr)), (char *)(attr+1));
 					un = (os0_t)(attr + 1);
 					un_len =attr->length - sizeof(struct radius_attr_hdr);
@@ -802,5 +802,5 @@
 			(*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT;
 			fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject",
-					ahdr->avp_value->u32, sidlen, sid);
+					ahdr->avp_value->u32, (int)sidlen, sid);
 			return 0;
 	}
Index: extensions/app_sip/app_sip.c
===================================================================
--- extensions/app_sip/app_sip.c	(revision 972)
+++ extensions/app_sip/app_sip.c	(revision 1027)
@@ -76,5 +76,5 @@
 	TRACE_DEBUG(FULL,"# mysql_server: *%s*",as_conf->mysql_server);
 	TRACE_DEBUG(FULL,"# mysql_port: *%d*",as_conf->mysql_port);
-	TRACE_DEBUG(FULL,"# mysql_port: *%d*",as_conf->mysql_prefix);
+	TRACE_DEBUG(FULL,"# mysql_port: *%s*",as_conf->mysql_prefix);
 	TRACE_DEBUG(FULL,"***End of Diameter-SIP configuration extension***");
 }
Index: extensions/app_sip/app_sip.h
===================================================================
--- extensions/app_sip/app_sip.h	(revision 972)
+++ extensions/app_sip/app_sip.h	(revision 1027)
@@ -136,6 +136,6 @@
 };
 
-int app_sip_RTR_cb(struct rtrsipaor structure);
-int app_sip_PPR_cb(struct pprsipaor structure);
+int app_sip_RTR_cb(struct rtrsipaor *structure);
+int app_sip_PPR_cb(struct pprsipaor *structure);
 
 
Index: extensions/app_sip/pushprofile.c
===================================================================
--- extensions/app_sip/pushprofile.c	(revision 639)
+++ extensions/app_sip/pushprofile.c	(revision 1027)
@@ -77,5 +77,5 @@
 				{
 					//We received something, we can send an PPR
-					app_sip_PPR_cb(pprsip);
+					app_sip_PPR_cb(&pprsip);
 				}
 			}
@@ -92,5 +92,5 @@
 }
 //Called to send a PPR
-int app_sip_PPR_cb(struct pprsipaor structure)
+int app_sip_PPR_cb(struct pprsipaor *structure)
 {
 	/*
Index: extensions/app_sip/registrationtermination.c
===================================================================
--- extensions/app_sip/registrationtermination.c	(revision 924)
+++ extensions/app_sip/registrationtermination.c	(revision 1027)
@@ -75,5 +75,5 @@
 				{
 					//We received something, we can send an RTR
-					app_sip_RTR_cb(rtrsip);
+					app_sip_RTR_cb(&rtrsip);
 				}
 			}
@@ -88,5 +88,5 @@
 }
 //Called to send a RTR
-int app_sip_RTR_cb(struct rtrsipaor structure)
+int app_sip_RTR_cb(struct rtrsipaor *structure)
 {
 	TRACE_ENTRY("%p", structure);
@@ -102,19 +102,19 @@
 	
 	//We must check that we have all needed value in structure
-	if(structure.username[0]!='\0')
+	if(structure->username[0]!='\0')
 		got_username=1;
 	
-	if(structure.sip_aor1[0]!='\0')
+	if(structure->sip_aor1[0]!='\0')
 	{	
 		num_aor++;
-		if(structure.sip_aor2[0]!='\0')
+		if(structure->sip_aor2[0]!='\0')
 		{
 			num_aor++;
-			if(structure.sip_aor3[0]!='\0')
+			if(structure->sip_aor3[0]!='\0')
 				num_aor++;
 		}
 	}
 	
-	if(structure.strreason!='\0')
+	if(structure->strreason!='\0')
 		got_streason=1;
 	
@@ -128,5 +128,5 @@
 		return EINVAL;
 	}
-	if(structure.reason<0)
+	if(structure->reason<0)
 	{
 		//We must have a least a SIP_AOR or a Username
@@ -135,5 +135,5 @@
 	}
 	
-	if(structure.desthost[0]=='\0')
+	if(structure->desthost[0]=='\0')
 	{
 		//We must have a least a SIP_AOR or a Username
@@ -173,6 +173,6 @@
 	{
 		CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) );
-		value.os.data=(unsigned char *)structure.desthost;
-		value.os.len=(size_t)strlen(structure.desthost);
+		value.os.data=(unsigned char *)structure->desthost;
+		value.os.len=(size_t)strlen(structure->desthost);
 		CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 		CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
@@ -186,5 +186,5 @@
 		//Reason Code
 		CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Code, 0, &avp ) );
-		value.i32=structure.reason;
+		value.i32=structure->reason;
 		CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 		CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) );
@@ -194,6 +194,6 @@
 			//Reason Info
 			CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Info, 0, &avp ) );
-			value.os.data=(unsigned char *)structure.strreason;
-			value.os.len=(size_t)strlen(structure.strreason);
+			value.os.data=(unsigned char *)structure->strreason;
+			value.os.len=(size_t)strlen(structure->strreason);
 			CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 			CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) );
@@ -209,6 +209,6 @@
 		{
 			CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) );
-			value.os.data=(unsigned char *)structure.username;
-			value.os.len=(size_t)strlen(structure.username);
+			value.os.data=(unsigned char *)structure->username;
+			value.os.len=(size_t)strlen(structure->username);
 			CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 			CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
@@ -221,6 +221,6 @@
 		{
 			CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) );
-			value.os.data=(unsigned char *)structure.sip_aor1;
-			value.os.len=(size_t)strlen(structure.sip_aor1);
+			value.os.data=(unsigned char *)structure->sip_aor1;
+			value.os.len=(size_t)strlen(structure->sip_aor1);
 			CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 			CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
@@ -228,6 +228,6 @@
 			{
 				CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) );
-				value.os.data=(unsigned char *)structure.sip_aor2;
-				value.os.len=(size_t)strlen(structure.sip_aor2);
+				value.os.data=(unsigned char *)structure->sip_aor2;
+				value.os.len=(size_t)strlen(structure->sip_aor2);
 				CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 				CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
@@ -235,6 +235,6 @@
 				{
 					CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) );
-					value.os.data=(unsigned char *)structure.sip_aor3;
-					value.os.len=(size_t)strlen(structure.sip_aor3);
+					value.os.data=(unsigned char *)structure->sip_aor3;
+					value.os.len=(size_t)strlen(structure->sip_aor3);
 					CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) );
 					CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) );
Index: extensions/rt_ereg/rtereg.c
===================================================================
--- extensions/rt_ereg/rtereg.c	(revision 741)
+++ extensions/rt_ereg/rtereg.c	(revision 1027)
@@ -61,5 +61,5 @@
 		struct fd_list * c;
 		
-		TRACE_DEBUG(ANNOYING, "Attempt pattern matching of '%.*s' with rule '%s'", len, value, r->pattern);
+		TRACE_DEBUG(ANNOYING, "Attempt pattern matching of '%.*s' with rule '%s'", (int)len, value, r->pattern);
 		
 		#ifdef HAVE_REG_STARTEND
@@ -107,5 +107,5 @@
 		TRACE_DEBUG(FULL, "[rt_ereg] Match: '%s' to value '%.*s' => '%s' += %d",
 					r->pattern,
-					len,
+					(int)len,
 					value,
 					r->server,
Index: extensions/rt_redirect/redir_fwd.c
===================================================================
--- extensions/rt_redirect/redir_fwd.c	(revision 1019)
+++ extensions/rt_redirect/redir_fwd.c	(revision 1027)
@@ -122,5 +122,5 @@
 									&id, &len, &secure, &port, &l4, &proto),
 							{
-								TRACE_DEBUG(INFO, "Received an invalid Redirect-Host AVP value ('%.*s'), ignored", ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+								TRACE_DEBUG(INFO, "Received an invalid Redirect-Host AVP value ('%.*s'), ignored", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 								break;
 							} );
@@ -128,10 +128,10 @@
 						/* Now check if the transport & protocol are supported */
 						if (proto && (proto != 'd')) {
-							TRACE_DEBUG(FULL, "Ignored unsupported non-Diameter Redirect-Host AVP (%.*s)", ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+							TRACE_DEBUG(FULL, "Ignored unsupported non-Diameter Redirect-Host AVP (%.*s)", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 							free(id);
 							break;
 						}
 						if (l4 && (l4 == IPPROTO_UDP)) {
-							TRACE_DEBUG(FULL, "Ignored unsupported UDP Redirect-Host AVP (%.*s)", ahdr->avp_value->os.len, ahdr->avp_value->os.data);
+							TRACE_DEBUG(FULL, "Ignored unsupported UDP Redirect-Host AVP (%.*s)", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data);
 							free(id);
 							break;
Index: extensions/rt_redirect/redir_out.c
===================================================================
--- extensions/rt_redirect/redir_out.c	(revision 740)
+++ extensions/rt_redirect/redir_out.c	(revision 1027)
@@ -173,5 +173,5 @@
 			cmp = fd_os_almostcasesrch(cand->diamid, cand->diamidlen, e->data.host.s, e->data.host.l, NULL);
 			if (!cmp) {
-				TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous ALL_HOST Redirect originated from this peer)", msg, cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT);
+				TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous ALL_HOST Redirect originated from this peer)", msg, (int)cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT);
 				cand->score += FD_SCORE_SENT_REDIRECT;
 				c_oh = cand;
@@ -182,5 +182,5 @@
 		cmp = fd_os_cmp(cand->diamid, cand->diamidlen, e->from.s, e->from.l);
 		if (!cmp) {
-			TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous Redirect received from this peer)", msg, cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT);
+			TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous Redirect received from this peer)", msg, (int)cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT);
 			cand->score += FD_SCORE_SENT_REDIRECT;
 		}
@@ -206,5 +206,5 @@
 			
 			if (cmp == 0) {
-				TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (rule t:%d @%p)", msg, cand->diamidlen, cand->diamid, redirects_usages[e->type].score, e->type, e);
+				TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (rule t:%d @%p)", msg, (int)cand->diamidlen, cand->diamid, redirects_usages[e->type].score, e->type, e);
 				cand->score += redirects_usages[e->type].score;
 				break;
