summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/aucat.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-11 12:56:03 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2008-11-11 12:56:03 +0000
commit6ded11df2bec40fb5c723cb16cd840d0a6a45c17 (patch)
tree4b717bf6e9c1fdf69aa8f7f242df63c7a3b461cb /usr.bin/aucat/aucat.c
parentb8f784bf1eb633ab43cad195630096d79683f261 (diff)
when not in server mode, aucat terminates automatically using
the {MIX,SUB}_AUTAQUIT features. In this case we're not allowed to directly touch dev_mix and dev_sub because they can disappar. So disable the ``suspend'' and ``quit'' bits when {MIX,SUB}_AUTAQUIT are used.
Diffstat (limited to 'usr.bin/aucat/aucat.c')
-rw-r--r--usr.bin/aucat/aucat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index c3e65334a0d..2c1a5a5ffd7 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.35 2008/11/10 23:25:37 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.36 2008/11/11 12:56:02 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -502,6 +502,8 @@ main(int argc, char **argv)
}
if (!file_poll())
break;
+ if (!l_flag)
+ continue;
if ((!dev_mix || dev_mix->u.mix.idle > 2 * dev_bufsz) &&
(!dev_sub || dev_sub->u.sub.idle > 2 * dev_bufsz)) {
if (!suspend) {
@@ -525,7 +527,8 @@ main(int argc, char **argv)
suspend = 0;
dev_start();
}
- dev_done();
+ if (l_flag)
+ dev_done();
filelist_done();
sigfillset(&sa.sa_mask);