diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-09-19 16:30:11 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-09-19 16:30:11 +0000 |
commit | 742ccd187ed5f1294119f82a23a55e640d3e42e1 (patch) | |
tree | 8667e2107cb520ff8e752e7a9ae2df6580829767 | |
parent | 4f2cb50a8d1a4f8a6779c7ba8e6c90875bf734b8 (diff) |
if the device is dying, don't try to stop it, otherwise this would
trigger the code to free() it, which will try to stop it, and so on
-rw-r--r-- | usr.bin/aucat/safile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/aucat/safile.c b/usr.bin/aucat/safile.c index d9f315a5498..a7a62f4b112 100644 --- a/usr.bin/aucat/safile.c +++ b/usr.bin/aucat/safile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safile.c,v 1.16 2009/09/19 15:56:04 ratchov Exp $ */ +/* $OpenBSD: safile.c,v 1.17 2009/09/19 16:30:10 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -179,7 +179,7 @@ safile_stop(struct file *file) struct safile *f = (struct safile *)file; f->started = 0; - if (!sio_stop(f->hdl)) { + if (!sio_eof(f->hdl) && !sio_stop(f->hdl)) { DPRINTF("safile_stop: sio_stop() filed\n"); file_close(file); return; |