[svn-commits] trunk r30242 - /trunk/channels/chan_iax2.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu May 25 08:42:12 MST 2006


Author: file
Date: Thu May 25 10:42:11 2006
New Revision: 30242

URL: http://svn.digium.com/view/asterisk?rev=30242&view=rev
Log:
Only get the low 16 bits if we actually have a message count

Modified:
    trunk/channels/chan_iax2.c

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=30242&r1=30241&r2=30242&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Thu May 25 10:42:11 2006
@@ -5380,7 +5380,7 @@
 	struct iax2_registry *reg;
 	/* Start pessimistic */
 	char peer[256] = "";
-	char msgstatus[40];
+	char msgstatus[60];
 	int refresh = 0;
 	char ourip[256] = "<Unspecified>";
 	struct sockaddr_in oldus;
@@ -5410,7 +5410,8 @@
 		return -1;
 	}
 	memcpy(&reg->us, &us, sizeof(reg->us));
-	reg->messages = ies->msgcount & 0xffff;		/* only low 16 bits are used in the transmission of the IE */
+	if (ies->msgcount >= 0)
+		reg->messages = ies->msgcount & 0xffff;		/* only low 16 bits are used in the transmission of the IE */
 	/* always refresh the registration at the interval requested by the server
 	   we are registering to
 	*/



More information about the svn-commits mailing list