summaryrefslogtreecommitdiff
path: root/apps/app_minivm.c
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2007-06-28 18:59:19 +0000
committerLuigi Rizzo <rizzo@icir.org>2007-06-28 18:59:19 +0000
commita0011053d61463322d6e9e47e8ef7bb85419eda7 (patch)
tree219cc9d6033a5f4a566f5b6af0d56befc450e47c /apps/app_minivm.c
parentd2d0db799b4bf71aea6a0fc1c57a1f28f99eb4b9 (diff)
move variable declarations to the beginning of a block.
Not applicable to previous branches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r--apps/app_minivm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 728e66b5c..75bb8dfcb 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1022,10 +1022,10 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
if (ast_strlen_zero(fromaddress)) {
fprintf(p, "From: Asterisk PBX <%s>\n", who);
} else {
- ast_debug(4, "-_-_- Fromaddress template: %s\n", fromaddress);
/* Allocate a buffer big enough for variable substitution */
int vmlen = strlen(fromaddress) * 3 + 200;
+ ast_debug(4, "-_-_- Fromaddress template: %s\n", fromaddress);
if ((passdata = alloca(vmlen))) {
memset(passdata, 0, vmlen);
pbx_substitute_variables_helper(ast, fromaddress, passdata, vmlen);
@@ -1100,8 +1100,8 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
}
/* Eww. We want formats to tell us their own MIME type */
if (template->attachment) {
- ast_debug(3, "-_-_- Attaching file to message: %s\n", fname);
char *ctype = "audio/x-";
+ ast_debug(3, "-_-_- Attaching file to message: %s\n", fname);
if (!strcasecmp(format, "ogg"))
ctype = "application/";
@@ -2404,6 +2404,7 @@ static int load_config(void)
char *cat;
const char *chanvar;
int error = 0;
+ struct minivm_template *template;
cfg = ast_config_load(VOICEMAIL_CONFIG);
ast_mutex_lock(&minivmlock);
@@ -2428,7 +2429,6 @@ static int load_config(void)
ast_set2_flag((&globalflags), FALSE, MVM_REVIEW);
ast_set2_flag((&globalflags), FALSE, MVM_OPERATOR);
strcpy(global_charset, "ISO-8859-1");
- struct minivm_template *template;
/* Reset statistics */
memset(&global_stats, 0, sizeof(struct minivm_stats));
global_stats.reset = time(NULL);