]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
make app_voicemail compile with IMAP_STORAGE
authorJeff Peeler <jpeeler@digium.com>
Mon, 19 Apr 2010 19:09:46 +0000 (19:09 +0000)
committerJeff Peeler <jpeeler@digium.com>
Mon, 19 Apr 2010 19:09:46 +0000 (19:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@257856 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 40f56eeab5fe0c819c894647e8f39fc94682b36b..c75303a3508e811a2397884e62729eafd6891a7a 100644 (file)
@@ -2877,6 +2877,7 @@ static int remove_file(char *dir, int msgnum)
 }
 #endif
 
+#ifndef IMAP_STORAGE
 static int copy(char *infile, char *outfile)
 {
        int ifd;
@@ -2926,7 +2927,9 @@ static int copy(char *infile, char *outfile)
        }
 #endif
 }
+#endif
 
+#ifndef IMAP_STORAGE
 static void copy_plain_file(char *frompath, char *topath)
 {
        char frompath2[PATH_MAX], topath2[PATH_MAX];
@@ -2935,7 +2938,9 @@ static void copy_plain_file(char *frompath, char *topath)
        snprintf(topath2, sizeof(topath2), "%s.txt", topath);
        copy(frompath2, topath2);
 }
+#endif
 
+#ifndef IMAP_STORAGE
 static int vm_delete(char *file)
 {
        char *txt;
@@ -2950,6 +2955,7 @@ static int vm_delete(char *file)
        unlink(txt);
        return ast_filedelete(file, NULL);
 }
+#endif
 
 static int inbuf(struct baseio *bio, FILE *fi)
 {
@@ -5387,8 +5393,10 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
        } else {
                /* Forward VoiceMail */
                long duration = 0;
-               char msgfile[PATH_MAX];
                struct vm_state vmstmp;
+#ifndef IMAP_STORAGE
+               char msgfile[PATH_MAX];
+#endif
 
                memcpy(&vmstmp, vms, sizeof(vmstmp));