]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 376233 via svnmerge from
authorAutomerge script <automerge@asterisk.org>
Wed, 14 Nov 2012 20:26:38 +0000 (20:26 +0000)
committerAutomerge script <automerge@asterisk.org>
Wed, 14 Nov 2012 20:26:38 +0000 (20:26 +0000)
file:///srv/subversion/repos/asterisk/branches/10

................
  r376233 | rmudgett | 2012-11-14 13:50:52 -0600 (Wed, 14 Nov 2012) | 19 lines

  Fix call files when astspooldir is relative.

  Future dated call files are ignored when astspooldir is relative to the
  current directory.  The queue_file() assumed that the qdir needed to be
  prepended if the given filename did not start with a '/'.  If astspooldir
  is relative it is not going to start from the root directory obviously so
  it will not start with a '/'.  The filename used in queue_file()
  ultimately results in qdir prepended multiple times.

  * Made queue_file() not prepend qdir if the filename contains a '/'.

  (closes issue ASTERISK-20593)
  Reported by: James Le Cuirot
  Patches:
        0004-Fix-future-call-files-from-relative-directories.patch (license #6439) patch uploaded by James Le Cuirot
  ........

  Merged revisions 376232 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376260 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_spool.c

index 7be1ee5c013f3e32ed4bbcd3dac39e0b6543c55f..e537d714cf034ac56e4d60798de16958781c5d20 100644 (file)
@@ -500,7 +500,7 @@ static void queue_file(const char *filename, time_t when)
        int res;
        time_t now = time(NULL);
 
-       if (filename[0] != '/') {
+       if (!strchr(filename, '/')) {
                char *fn = ast_alloca(strlen(qdir) + strlen(filename) + 2);
                sprintf(fn, "%s/%s", qdir, filename); /* SAFE */
                filename = fn;