[asterisk-commits] mnicholson: trunk r264379 - /trunk/main/udptl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 19 15:26:30 CDT 2010


Author: mnicholson
Date: Wed May 19 15:26:27 2010
New Revision: 264379

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264379
Log:
Cast an unsigned int to a signed int when comparing it with 0.

(AST-377)

Modified:
    trunk/main/udptl.c

Modified: trunk/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/udptl.c?view=diff&rev=264379&r1=264378&r2=264379
==============================================================================
--- trunk/main/udptl.c (original)
+++ trunk/main/udptl.c Wed May 19 15:26:27 2010
@@ -1097,7 +1097,7 @@
 	/* Cook up the UDPTL packet, with the relevant EC info. */
 	len = udptl_build_packet(s, buf, sizeof(buf), f->data.ptr, len);
 
-	if (len > 0 && s->them.sin_port && s->them.sin_addr.s_addr) {
+	if ((signed int) len > 0 && s->them.sin_port && s->them.sin_addr.s_addr) {
 		if ((res = sendto(s->fd, buf, len, 0, (struct sockaddr *) &s->them, sizeof(s->them))) < 0)
 			ast_log(LOG_NOTICE, "(%s): UDPTL Transmission error to %s:%d: %s\n",
 				LOG_TAG(s), ast_inet_ntoa(s->them.sin_addr), ntohs(s->them.sin_port), strerror(errno));




More information about the asterisk-commits mailing list