[Asterisk-cvs] asterisk/channels iax2-parser.c,1.14,1.14.2.1

markster at lists.digium.com markster at lists.digium.com
Thu Mar 18 01:08:30 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv28747/channels

Modified Files:
      Tag: v1-0_stable
	iax2-parser.c 
Log Message:
Fix longs to unsigneds where appropritae


Index: iax2-parser.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/iax2-parser.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- iax2-parser.c	22 Oct 2003 02:53:39 -0000	1.14
+++ iax2-parser.c	18 Mar 2004 06:03:24 -0000	1.14.2.1
@@ -64,7 +64,7 @@
 static void dump_int(char *output, int maxlen, void *value, int len)
 {
 	if (len == sizeof(unsigned int))
-		snprintf(output, maxlen, "%ld", (long)ntohl(*((unsigned int *)value)));
+		snprintf(output, maxlen, "%lu", (unsigned long)ntohl(*((unsigned int *)value)));
 	else
 		snprintf(output, maxlen, "Invalid INT");
 }
@@ -287,8 +287,8 @@
 	retries, fh->oseqno, fh->iseqno, class, subclass);
 	outputf(tmp);
 snprintf(tmp, sizeof(tmp), 
-"   Timestamp: %05ldms  SCall: %5.5d  DCall: %5.5d [%s:%d]\n",
-	(long)ntohl(fh->ts),
+"   Timestamp: %05lums  SCall: %5.5d  DCall: %5.5d [%s:%d]\n",
+	(unsigned long)ntohl(fh->ts),
 	ntohs(fh->scallno) & ~IAX_FLAG_FULL, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS,
 		inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
 	outputf(tmp);




More information about the svn-commits mailing list