[asterisk-bugs] [Asterisk 0012115]: MoH file playback is broken
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Mar 1 18:39:15 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=12115
======================================================================
Reported By: pj
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 12115
Category: Core-General
Reproducibility: always
Severity: major
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 105509
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 03-01-2008 15:50 CST
Last Modified: 03-01-2008 18:39 CST
======================================================================
Summary: MoH file playback is broken
Description:
this bug was introduced in commit r104594, last working revision is r104592
======================================================================
----------------------------------------------------------------------
dimas - 03-01-08 18:39
----------------------------------------------------------------------
Attached patch which fixes the issue. However kpflemming who commited patch
for 11831 which caused the problem needs to review it. For some reason I
cannot re-open 11831.
What patch does is:
1. It does not try ANY language prefixes if function is passed absolute
filename. This never worked for internal_timing=yes anyway. (It was trying
to open /LANG//var/lib/asterisk/moh/fpm-world-mix)
2. It now checks both "en" language and null language when cannot find
with specified language. Namely for langprefix="ru_ru" and
filename="test/hello" it checks for
ru_ru/test/hello
ru/test/hello
en/test/hello
test/hello
for languageprefix=yes and
test/ru_ru/hello
test/ru/hello
test/en/hello
test/hello
for languageprefix=no.
3. I personally dislike buffer maths (like strcpy(buff + offset1, ...),
strcpy(buf + offset1 + ofset2...)) so I redone these with snprintfs.
4. I removed dynamic buffer allocation when the buffer passed is not long
enough. This was wrong because function documentation says it puts final
filename into the passed buffer while nothing was passed back when dynamic
buffer was allocated. (After all it is not possible anyway - we allocate a
buffer when the passed one is too small and cannot fit the file name). This
should not be a problem because both two callers of fileexists_core
allocate buffer of proper size.
Issue History
Date Modified Username Field Change
======================================================================
03-01-08 18:39 dimas Note Added: 0083230
======================================================================
More information about the asterisk-bugs
mailing list