[asterisk-commits] russell: branch 1.4 r48944 - in /branches/1.4: ./ channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Dec 24 00:25:39 MST 2006


Author: russell
Date: Sun Dec 24 01:25:38 2006
New Revision: 48944

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48944
Log:
Merged revisions 48943 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48943 | russell | 2006-12-24 02:23:07 -0500 (Sun, 24 Dec 2006) | 3 lines

Check for the proper return value on an error in a call to mmap().
This was reported by Andy Wang on the asterisk-dev list.  Thanks!

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_iax2.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_iax2.c?view=diff&rev=48944&r1=48943&r2=48944
==============================================================================
--- branches/1.4/channels/chan_iax2.c (original)
+++ branches/1.4/channels/chan_iax2.c Sun Dec 24 01:25:38 2006
@@ -1411,7 +1411,7 @@
 		return -1;
 	}
 	fwh = mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 
-	if (!fwh) {
+	if (fwh == (void *) -1) {
 		ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
 		close(fd);
 		return -1;



More information about the asterisk-commits mailing list