Index: extensions/app_sip/app_sip.h
===================================================================
--- extensions/app_sip/app_sip.h	(revision 1088)
+++ extensions/app_sip/app_sip.h	(revision 1424)
@@ -110,6 +110,4 @@
 void DigestCalcResponse(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response);
 void DigestCalcResponseAuth(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response);
-
-int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp );
 
 //thread procedure
Index: extensions/app_sip/libapp_sip.c
===================================================================
--- extensions/app_sip/libapp_sip.c	(revision 433)
+++ extensions/app_sip/libapp_sip.c	(revision 1424)
@@ -67,52 +67,4 @@
 }
 
-
-/* Search a given AVP model in an AVP (extracted from libfreediameter/message.c ) */
-int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp )
-{
-	struct avp * nextavp;
-	struct avp_hdr * nextavphdr;
-	struct dict_avp_data 	dictdata;
-	
-	
-	TRACE_ENTRY("%p %p %p", groupedavp, what, avp);
-	
-	CHECK_FCT(  fd_dict_getval(what, &dictdata)  );
-	
-	// Loop only in the group AVP 
-	CHECK_FCT(  fd_msg_browse(groupedavp, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL)  );
-	CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr )  );
-	
-	while (nextavphdr) {
-		
-		if ( (nextavphdr->avp_code   == dictdata.avp_code) && (nextavphdr->avp_vendor == dictdata.avp_vendor) ) // always 0 if no Vendor flag
-		{
-			break;
-		}
-		
-		// Otherwise move to next AVP in the grouped AVP 
-		CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) );
-		
-		if(nextavp!=NULL)
-		{
-			CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr )  );
-		}
-		else
-			nextavphdr=NULL;
-	}
-	if (avp)
-		*avp = nextavp;
-	
-	if (avp && nextavp) {
-		struct dictionary * dict;
-		CHECK_FCT( fd_dict_getdict( what, &dict) );
-		CHECK_FCT_DO( fd_msg_parse_dict( nextavp, dict, NULL ),  );
-	}
-	
-	if (avp || nextavp)
-		return 0;
-	else
-		return ENOENT;
-}
 struct avp_hdr *walk_digest(struct avp *avp, int avp_code)
 {
Index: extensions/app_sip/multimediaauth.c
===================================================================
--- extensions/app_sip/multimediaauth.c	(revision 1405)
+++ extensions/app_sip/multimediaauth.c	(revision 1424)
@@ -321,5 +321,5 @@
 							
 							
-							CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 ));
+							CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_CNonce, &a2 ));
 							
 							if(a2!=NULL)
@@ -458,5 +458,5 @@
 									
 									
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Nonce, &a2 ));
 									if(a2!=NULL)
 									{
@@ -487,5 +487,5 @@
 											
 									}
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Response, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Response, &a2 ));
 									if(a2!=NULL)
 									{
@@ -501,5 +501,5 @@
 										
 									}
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Realm, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Realm, &a2 ));
 									if(a2!=NULL)
 									{
@@ -515,5 +515,5 @@
 									}
 									
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Method, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Method, &a2 ));
 									if(a2!=NULL)
 									{
@@ -531,5 +531,5 @@
 										digest_method="";
 									
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_URI, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_URI, &a2 ));
 									if(a2!=NULL)
 									{
@@ -545,5 +545,5 @@
 									}
 									
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_QOP, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_QOP, &a2 ));
 									if(a2!=NULL)
 									{
@@ -560,5 +560,5 @@
 									else
 										digest_qop=NULL;
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Algorithm, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Algorithm, &a2 ));
 									if(a2!=NULL)
 									{
@@ -575,5 +575,5 @@
 									else
 										digest_algorithm=NULL;
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_CNonce, &a2 ));
 									if(a2!=NULL)
 									{
@@ -590,5 +590,5 @@
 									else
 										digest_cnonce="";
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce_Count, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Nonce_Count, &a2 ));
 									if(a2!=NULL)
 									{
@@ -605,5 +605,5 @@
 									else
 										digest_noncecount="";
-									CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Username, &a2 ));
+									CHECK_FCT(fd_msg_search_avp (avp, sip_dict.Digest_Username, &a2 ));
 									if(a2!=NULL)
 									{
