From: Russell Bryant Date: Sun, 1 Jul 2007 23:51:34 +0000 (+0000) Subject: When appending lines to call files to keep track of retries, write a leading X-Git-Tag: 1.2.21~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dfa0b47a710ea36dce3b552b5fdc5e7ea1a8ef6;p=thirdparty%2Fasterisk.git When appending lines to call files to keep track of retries, write a leading newline just in case the original call file did not have a newline at the end. This fix is in response to a problem I saw reported on the asterisk-users mailing list. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72805 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 0fac2b1a9b..1141b85a15 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -240,7 +240,7 @@ static void safe_append(struct outgoing *o, time_t now, char *s) if (fd > -1) { f = fdopen(fd, "a"); if (f) { - fprintf(f, "%s: %ld %d (%ld)\n", s, (long)ast_mainpid, o->retries, (long) now); + fprintf(f, "\n%s: %ld %d (%ld)\n", s, (long)ast_mainpid, o->retries, (long) now); fclose(f); } else close(fd);