[asterisk-commits] dbailey: branch 1.6.0 r189421 - in /branches/1.6.0: ./ channels/ main/ main/d...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 20 14:37:32 CDT 2009
Author: dbailey
Date: Mon Apr 20 14:37:29 2009
New Revision: 189421
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=189421
Log:
Merged revisions 189419 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r189419 | dbailey | 2009-04-20 14:28:16 -0500 (Mon, 20 Apr 2009) | 11 lines
Merged revisions 189391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r189391 | dbailey | 2009-04-20 14:10:56 -0500 (Mon, 20 Apr 2009) | 4 lines
Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
Got rid of shadowed variable used in processign the mmap results.
Change test of mmap results to compare against MAP_FAILED
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_iax2.c
branches/1.6.0/main/db1-ast/recno/rec_open.c
branches/1.6.0/main/manager.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/channels/chan_iax2.c?view=diff&rev=189421&r1=189420&r2=189421
==============================================================================
--- branches/1.6.0/channels/chan_iax2.c (original)
+++ branches/1.6.0/channels/chan_iax2.c Mon Apr 20 14:37:29 2009
@@ -2045,7 +2045,7 @@
return -1;
}
fwh = (struct ast_iax2_firmware_header*)mmap(NULL, stbuf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
- if (fwh == (void *) -1) {
+ if (fwh == MAP_FAILED) {
ast_log(LOG_WARNING, "mmap failed: %s\n", strerror(errno));
close(fd);
return -1;
Modified: branches/1.6.0/main/db1-ast/recno/rec_open.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/db1-ast/recno/rec_open.c?view=diff&rev=189421&r1=189420&r2=189421
==============================================================================
--- branches/1.6.0/main/db1-ast/recno/rec_open.c (original)
+++ branches/1.6.0/main/db1-ast/recno/rec_open.c Mon Apr 20 14:37:29 2009
@@ -169,7 +169,7 @@
t->bt_msize = sb.st_size;
if ((t->bt_smap = mmap(NULL, t->bt_msize,
PROT_READ, MAP_PRIVATE, rfd,
- (off_t)0)) == (caddr_t)-1)
+ (off_t)0)) == MAP_FAILED
goto slow;
t->bt_cmap = t->bt_smap;
t->bt_emap = t->bt_smap + sb.st_size;
Modified: branches/1.6.0/main/manager.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/manager.c?view=diff&rev=189421&r1=189420&r2=189421
==============================================================================
--- branches/1.6.0/main/manager.c (original)
+++ branches/1.6.0/main/manager.c Mon Apr 20 14:37:29 2009
@@ -3675,7 +3675,9 @@
size_t l = ftell(s.f);
if (l) {
- if ((buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_SHARED, s.fd, 0))) {
+ if (MAP_FAILED == (buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_PRIVATE, s.fd, 0))) {
+ ast_log(LOG_WARNING, "mmap failed. Manager output was not processed\n");
+ } else {
if (format == FORMAT_XML || format == FORMAT_HTML)
xml_translate(&out, buf, params, format);
else
More information about the asterisk-commits
mailing list