aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 20:06:31 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 20:06:31 +0000
commitbbdc6cafb5a4c952b565135ee3470200673b310f (patch)
treebf8e77f6e4f2525aaca5cf79d01143c9973cdbd2 /apps
parent994debde3c3d78011509a53fc68dd6ae27a6024e (diff)
Transmit silence when reading DTMF in ast_readstring.
Otherwise, you could get issues with DTMF timeouts causing hangups. (closes issue #17370) Reported by: makoto Patches: channel-readstring-silence-generator.patch uploaded by makoto (license 38) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@285742 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_chanspy.c2
-rw-r--r--apps/app_dial.c3
-rw-r--r--apps/app_voicemail.c9
3 files changed, 8 insertions, 6 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index b7c915b45..57309e5b5 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -633,7 +633,7 @@ static int common_exec(struct ast_channel *chan, const struct ast_flags *flags,
ast_channel_unlock(peer);
if (!ast_test_flag(flags, OPTION_QUIET)) {
- 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 3a942ffc2..f1dd6ef3d 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1856,8 +1856,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_voicemail.c b/apps/app_voicemail.c
index a02ac78bf..ead08664e 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -915,11 +915,12 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
}
value = strstr(tmp,",");
if (!value) {
- ast_log(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(LOG_WARNING, "Failed to get category structure.\n");
break;