Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 413892) +++ apps/app_voicemail.c (working copy) @@ -4146,11 +4146,12 @@ static void copy_plain_file(char *frompath, char *topath) { char frompath2[PATH_MAX], topath2[PATH_MAX]; - struct ast_variable *tmp,*var = NULL; - const char *origmailbox = NULL, *context = NULL, *macrocontext = NULL, *exten = NULL, *priority = NULL, *callerchan = NULL, *callerid = NULL, *origdate = NULL, *origtime = NULL, *category = NULL, *duration = NULL; ast_filecopy(frompath, topath, NULL); snprintf(frompath2, sizeof(frompath2), "%s.txt", frompath); snprintf(topath2, sizeof(topath2), "%s.txt", topath); +#ifndef ODBC_STORAGE + struct ast_variable *tmp,*var = NULL; + const char *origmailbox = NULL, *context = NULL, *macrocontext = NULL, *exten = NULL, *priority = NULL, *callerchan = NULL, *callerid = NULL, *origdate = NULL, *origtime = NULL, *category = NULL, *duration = NULL; if (ast_check_realtime("voicemail_data")) { var = ast_load_realtime("voicemail_data", "filename", frompath, SENTINEL); /* This cycle converts ast_variable linked list, to va_list list of arguments, may be there is a better way to do it? */ @@ -4181,8 +4182,9 @@ } ast_store_realtime("voicemail_data", "filename", topath, "origmailbox", origmailbox, "context", context, "macrocontext", macrocontext, "exten", exten, "priority", priority, "callerchan", callerchan, "callerid", callerid, "origdate", origdate, "origtime", origtime, "category", category, "duration", duration, SENTINEL); } + ast_variables_destroy(var); +#endif copy(frompath2, topath2); - ast_variables_destroy(var); } #endif