diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
commit | 12ad49e444d6108b7312a46b389090d51b670a7f (patch) | |
tree | fe20338149990fed28e3936bbbd7162e69d1f938 /apps | |
parent | f8d0dcac122feafe9ebd0aba502263f829c77667 (diff) |
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.6.2@285710 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 2 | ||||
-rw-r--r-- | apps/app_dial.c | 3 | ||||
-rw-r--r-- | apps/app_festival.c | 13 | ||||
-rw-r--r-- | apps/app_meetme.c | 6 | ||||
-rw-r--r-- | apps/app_queue.c | 2 | ||||
-rw-r--r-- | apps/app_readexten.c | 2 | ||||
-rw-r--r-- | apps/app_voicemail.c | 9 |
7 files changed, 23 insertions, 14 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 2ce2e0ae2..031c82998 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -962,7 +962,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags, } if (!ast_test_flag(flags, OPTION_NAME) || res < 0) { if (!ast_test_flag(flags, OPTION_NOTECH)) { - if (ast_fileexists(peer_name, NULL, NULL) != -1) { + if (ast_fileexists(peer_name, NULL, NULL) > 0) { res = ast_streamfile(chan, peer_name, chan->language); if (!res) { res = ast_waitstream(chan, ""); diff --git a/apps/app_dial.c b/apps/app_dial.c index f5309f5ed..f2735a63e 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -2247,8 +2247,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags sentringing = 0; ast_indicate(chan, -1); } - /* Be sure no generators are left on it */ + /* Be sure no generators are left on it and reset the visible indication */ ast_deactivate_generator(chan); + chan->visible_indication = 0; /* Make sure channels are compatible */ res = ast_channel_make_compatible(chan, peer); if (res < 0) { diff --git a/apps/app_festival.c b/apps/app_festival.c index 37d765a6e..278ed8e17 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) diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 3cbc664e3..4ef16189d 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2622,6 +2622,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c ast_say_digits(chan, (conf->endtime - now.tv_sec) / 60, "", chan->language); if (!ast_streamfile(chan, "minutes", chan->language)) ast_waitstream(chan, ""); + if (musiconhold) { + conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]); + } announcement_played = 1; } } @@ -2693,6 +2696,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c res = ast_streamfile(chan, user->warning_sound, chan->language); res = ast_waitstream(chan, ""); } + if (musiconhold) { + conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]); + } } } if (user->warning_freq) { diff --git a/apps/app_queue.c b/apps/app_queue.c index 073d7ef3e..a221e9f55 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -7284,7 +7284,7 @@ static int load_module(void) static int reload(void) { - struct ast_flags mask = {AST_FLAGS_ALL,}; + struct ast_flags mask = {AST_FLAGS_ALL & ~QUEUE_RESET_STATS,}; ast_unload_realtime("queue_members"); reload_handler(1, &mask, NULL); return 0; diff --git a/apps/app_readexten.c b/apps/app_readexten.c index d5075ede8..e20dfff1d 100644 --- a/apps/app_readexten.c +++ b/apps/app_readexten.c @@ -220,7 +220,7 @@ static int readexten_exec(struct ast_channel *chan, void *data) if (res < 1) { /* timeout expired or hangup */ if (ast_check_hangup(chan)) { status = "HANGUP"; - } else { + } else if (x == 0) { pbx_builtin_setvar_helper(chan, arglist.variable, "t"); status = "TIMEOUT"; } diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 122f92a87..a3cd60fd3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1380,11 +1380,12 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword) } value = strstr(tmp,","); if (!value) { - ast_log(AST_LOG_WARNING, "variable has bad format.\n"); - break; + new = alloca(strlen(newpassword)+1); + sprintf(new, "%s", newpassword); + } else { + new = alloca((strlen(value)+strlen(newpassword)+1)); + sprintf(new,"%s%s", newpassword, value); } - new = alloca((strlen(value)+strlen(newpassword)+1)); - sprintf(new,"%s%s", newpassword, value); if (!(cat = ast_category_get(cfg, category))) { ast_log(AST_LOG_WARNING, "Failed to get category structure.\n"); break; |