aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>1999-12-18 07:01:48 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>1999-12-18 07:01:48 +0000
commit8a317c03a2bf05b95e939bff76e48e06e93a1777 (patch)
tree4330d2a970481cdd4f9b929248ccdf11036365df /apps/app_voicemail.c
parent53b26418053e05bd30974b1d336167f90860e85b (diff)
Version 0.1.1 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@141 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index d32a0ef9d..f2893b3f6 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3,7 +3,7 @@
*
* Voicemail System (did you ever think it could be so easy?)
*
- * Copyright (C) 1999, Adtran Inc. and Linux Support Services, LLC
+ * Copyright (C) 1999, Mark Spencer
*
* Mark Spencer <markster@linux-support.net>
*
@@ -153,7 +153,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent)
ast_log(LOG_WARNING, "No such configuration file %s\n", VOICEMAIL_CONFIG);
return -1;
}
- if ((copy = ast_variable_retrieve(cfg, chan->context, ext))) {
+ if ((copy = ast_variable_retrieve(cfg, NULL, ext))) {
/* Make sure they have an entry in the config */
copy = strdup(copy);
passwd = strtok(copy, ",");
@@ -320,11 +320,15 @@ static int vm_execmain(struct ast_channel *chan, void *data)
/* Prompt for, and read in the username */
if (ast_readstring(chan, username, sizeof(username), 2000, 5000, "#"))
goto out;
+ if (!strlen(username)) {
+ res = 0;
+ goto out;
+ }
if (ast_streamfile(chan, "vm-password"))
goto out;
if (ast_readstring(chan, password, sizeof(password), 2000, 5000, "#"))
goto out;
- copy = ast_variable_retrieve(cfg, chan->context, username);
+ copy = ast_variable_retrieve(cfg, NULL, username);
if (copy) {
copy = strdup(copy);
strtok(copy, ",");