1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

if the device disappear the mixer and demultiplexer chains are

destroyed. If this happen then warn and exit, rather than crashing.
This commit is contained in:
ratchov 2008-11-11 21:26:21 +00:00
parent 29ee1e5255
commit 8d673bd4ec

View File

@ -1,4 +1,4 @@
/* $OpenBSD: aucat.c,v 1.37 2008/11/11 13:12:03 ratchov Exp $ */
/* $OpenBSD: aucat.c,v 1.38 2008/11/11 21:26:21 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@ -490,8 +490,10 @@ main(int argc, char **argv)
filelist_unlisten();
break;
}
if (!file_poll())
break;
if (!file_poll()) {
fprintf(stderr, "Terminated, device desappeared?\n");
exit(1);
}
if ((!dev_mix || dev_mix->u.mix.idle > 2 * dev_bufsz) &&
(!dev_sub || dev_sub->u.sub.idle > 2 * dev_bufsz)) {
if (!l_flag)