fix the check to usecache. Bug #731
[asterisk/asterisk.git] / apps / app_festival.c
index e4e1af7..0cbe48b 100755 (executable)
@@ -342,7 +342,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
        }
        readcache=0;
        writecache=0;
-       if (strlen(cachedir)+strlen(MD5Hex)+1<=MAXFESTLEN && (usecache==1)) {
+       if (strlen(cachedir)+strlen(MD5Hex)+1<=MAXFESTLEN && (usecache==-1)) {
                sprintf(cachefile,"%s/%s",cachedir,MD5Hex);
                fdesc=open(cachefile,O_RDWR);
                if (fdesc==-1) {