From: Simon Schubert Date: Mon, 20 Jul 2009 11:33:09 +0000 (+0200) Subject: dma: correct logic for setting the locked flag X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c3e35461c97bc05bb7e8cf5b97690a2d38716f1;p=people%2Fms%2Fdma.git dma: correct logic for setting the locked flag --- diff --git a/spool.c b/spool.c index 8489234..ae3c987 100644 --- a/spool.c +++ b/spool.c @@ -227,9 +227,11 @@ load_queue(struct queue *queue, int ignorelock) goto fail; fd = open_locked(queuefn, O_RDONLY|O_NONBLOCK); - if (ignorelock && fd < 0) { - fd = open(queuefn, O_RDONLY); - locked = 0; + if (ignorelock) { + if (fd < 0) + fd = open(queuefn, O_RDONLY); + else + locked = 0; } if (fd < 0) { /* Ignore locked files */