diff freeDiameter/p_ce.c @ 403:26aafbbc1640

Cleanup all compilation warnings in base code for 32 bit arch
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 08 Jul 2010 14:24:19 +0900
parents 41e3c2a3721c
children f1484823cb4a
line wrap: on
line diff
--- a/freeDiameter/p_ce.c	Thu Jul 08 12:50:10 2010 +0900
+++ b/freeDiameter/p_ce.c	Thu Jul 08 14:24:19 2010 +0900
@@ -308,7 +308,8 @@
 				}
 				
 				/* We check that the value matches what we know, otherwise disconnect the peer */
-				if (strncasecmp(hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid, hdr->avp_value->os.len)) {
+				/* here also, using strcasecmp on (supposed) UTF8 data might be bad idea... to be improved */
+				if (strncasecmp((char *)hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid, hdr->avp_value->os.len)) {
 					TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'\n", 
 							hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid);
 					*error_code = "DIAMETER_UNKNOWN_PEER";
"Welcome to our mercurial repository"