[svn-commits] tilghman: branch 1.8 r289581 - /branches/1.8/funcs/func_env.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Sep 30 15:23:14 CDT 2010
Author: tilghman
Date: Thu Sep 30 15:23:10 2010
New Revision: 289581
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=289581
Log:
Solaris fixes.
Modified:
branches/1.8/funcs/func_env.c
Modified: branches/1.8/funcs/func_env.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/funcs/func_env.c?view=diff&rev=289581&r1=289580&r2=289581
==============================================================================
--- branches/1.8/funcs/func_env.c (original)
+++ branches/1.8/funcs/func_env.c Thu Sep 30 15:23:10 2010
@@ -788,7 +788,7 @@
fseeko(ff, offset, SEEK_SET);
ast_debug(3, "offset=%s/%" PRId64 ", length=%s/%" PRId64 ", vlength=%" PRId64 ", flength=%" PRId64 "\n",
- args.offset, offset, args.length, length, vlength, flength);
+ S_OR(args.offset, "(null)"), offset, S_OR(args.length, "(null)"), length, vlength, flength);
if (length == vlength) {
/* Simplest case, a straight replace */
@@ -820,6 +820,11 @@
fseeko(ff, cur + vlength - length, SEEK_SET);
if (fwrite(fbuf, 1, sizeof(fbuf), ff) < sizeof(fbuf)) {
ast_log(LOG_ERROR, "Short write?!!\n");
+ }
+ /* Seek to where we stopped reading */
+ if (fseeko(ff, cur + sizeof(fbuf), SEEK_SET) < 0) {
+ /* Only reason for seek to fail is EOF */
+ break;
}
}
fclose(ff);
More information about the svn-commits
mailing list