diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:51:52 +0000 |
commit | 722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch) | |
tree | 25683963c5e51bdedd6211cd0ea92a85639505c3 /apps/app_festival.c | |
parent | 815b5b09da5e555add7bba3d8fca588e7611248a (diff) |
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_festival.c')
-rw-r--r-- | apps/app_festival.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c index c547cfc6b..ef8827adb 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -49,6 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/lock.h" #include "asterisk/app.h" +#include "asterisk/endian.h" #define FESTIVAL_CONFIG "festival.conf" #define MAXLEN 180 @@ -127,7 +128,7 @@ static char *socket_receive_file_to_buff(int fd, int *size) static int send_waveform_to_fd(char *waveform, int length, int fd) { int res; -#ifdef __PPC__ +#if __BYTE_ORDER == __BIG_ENDIAN int x; char c; #endif @@ -142,20 +143,20 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) ast_close_fds_above_n(0); if (ast_opt_high_priority) ast_set_priority(0); -#ifdef __PPC__ +#if __BYTE_ORDER == __BIG_ENDIAN for (x = 0; x < length; x += 2) { c = *(waveform + x + 1); *(waveform + x + 1) = *(waveform + x); *(waveform + x) = c; } #endif - - if (write(fd, waveform, length) < 0) { - ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno)); + + if (write(0, waveform, length) < 0) { + /* Cannot log -- all FDs are already closed */ } close(fd); - exit(0); + _exit(0); } static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, int length, char *intkeys) |