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

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Oct 30 20:08:18 CDT 2012


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

Rusty Newton updated ASTERISK-20593:
------------------------------------

    Status: Open  (was: Triage)
    
> [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
>            Severity: Minor
>         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