]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Sun, 19 Feb 2006 18:03:48 +0000 (18:03 +0000)
committerAutomerge script <automerge@asterisk.org>
Sun, 19 Feb 2006 18:03:48 +0000 (18:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10486 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
formats/format_sln.c

index 4a3aa2a468858059db25c959422d3eb37c109614..43eb4fb66b2a8c402b12b4f1ef29c4f140ea80aa 100644 (file)
@@ -4945,7 +4945,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
                           struct ast_vm_user *res_vmu, const char *context, const char *prefix,
                           int skipuser, int maxlogins, int silent)
 {
-       int useadsi, valid=0, logretries=0;
+       int useadsi=0, valid=0, logretries=0;
        char password[AST_MAX_EXTENSION]="", *passptr;
        struct ast_vm_user vmus, *vmu = NULL;
 
index 008a715bc3bd625d8d8402efb7a37118353ceb5f..c1a16618db26a5f0a06be4907a713ba2a20ed673 100644 (file)
@@ -172,6 +172,7 @@ static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
 static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whence)
 {
        off_t offset=0,min,cur,max;
+       int res;
 
        min = 0;
        sample_offset <<= 1;
@@ -189,7 +190,12 @@ static int slinear_seek(struct ast_filestream *fs, long sample_offset, int whenc
        }
        /* always protect against seeking past begining. */
        offset = (offset < min)?min:offset;
-       return fseek(fs->f, offset, SEEK_SET) / 2;
+       res = fseek(fs->f, offset, SEEK_SET);
+       /* Negative values indicate error */
+       if (res > -1)
+               return res / 2;
+       else
+               return res;
 }
 
 static int slinear_trunc(struct ast_filestream *fs)