]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_voicemail: fix imap compilation errors
authorMike Bradeen <mbradeen@sangoma.com>
Mon, 26 Jun 2023 15:40:03 +0000 (09:40 -0600)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Thu, 29 Jun 2023 16:08:14 +0000 (16:08 +0000)
Fixes two compilation errors in app_voicemail_imap, one due to an unsed
variable and one due to a new variable added in the incorrect location
in _163.

Resolves: #174

apps/app_voicemail.c

index 1976f8027bf4af0bf26385b417977d0e22b513d8..4699e730589caccb2ad1ec1bfc53a8399f18173e 100644 (file)
@@ -2592,13 +2592,13 @@ static int messagecount(const char *mailbox_id, const char *folder)
 {
        char *context;
        char *mailbox;
+       int count;
 
        if (ast_strlen_zero(mailbox_id)
                || separate_mailbox(ast_strdupa(mailbox_id), &mailbox, &context)) {
                return 0;
        }
 
-       int count;
        if (ast_strlen_zero(folder) || !strcmp(folder, "INBOX")) {
                count = __messagecount(context, mailbox, "INBOX") + __messagecount(context, mailbox, "Urgent");
        } else {
@@ -6190,7 +6190,6 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
        #ifdef IMAP_STORAGE
        struct vm_state *vms = NULL;
        char ext_context[256] = "";
-       char *fmt = ast_strdupa(recdata->recording_ext);
        int newmsgs = 0;
        int oldmsgs = 0;
        #endif