[asterisk-bugs] [JIRA] (ASTERISK-20593) [patch] Future-dated call files are ignored when astspooldir is relative

Matt Jordan (JIRA) noreply at issues.asterisk.org
Mon Jan 14 14:01:45 CST 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-20593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-20593:
-----------------------------------

    Target Release Version/s: 11.2.0
                              10.12.0-digiumphones
                              10.12.0
                              1.8.20.0
    
> [patch] Future-dated call files are ignored when astspooldir is relative
> ------------------------------------------------------------------------
>
>                 Key: ASTERISK-20593
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20593
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: PBX/pbx_spool
>    Affects Versions: 10.9.0
>         Environment: Fedora 17, Linux kernel 3.6.2-4.fc17.x86_64
>            Reporter: James Le Cuirot
>            Assignee: Richard Mudgett
>            Severity: Minor
>      Target Release: 1.8.20.0, 10.12.0, 10.12.0-digiumphones, 11.2.0
>
>         Attachments: 0004-Fix-future-call-files-from-relative-directories.patch
>
>
> I develop for a number of projects involving Asterisk and therefore find it easiest to configure it with relative directories. This also makes deployment to other development and production boxes simpler. Besides a couple of gotchas (such as astctl being relative to astrundir), this has been working well.
> However, I discovered today that it breaks call files dated in the future. They are simply ignored and no log messages are seen. This can easily be verified using touch.
> # touch foo (warning about invalid contents appears)
> # touch -d "10 seconds" foo (nothing appears)
> I had a look at pbx_spool.c and queue_file turned out to be the culprit. It checks whether filename starts with '/' and prepends qdir if it doesn't. Future-dated files are processed a second time and when a relative directory is involved, qdir will be prepended twice because it doesn't start with '/'. I tried checking for '.' as well, which worked, but it broke dot-files. These should probably be ignored anyway but that's a separate issue. In the end, I used strchr(filename, '/') instead, which does the trick. I don't believe that will cause anything else to break.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list