diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-09-19 15:56:05 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2009-09-19 15:56:05 +0000 |
commit | ed24bea35c5aae1a7185507ed58c3374870f6b92 (patch) | |
tree | 338fdd4d67f747ddce44f84ceecf4d6f11c39b8e /usr.bin | |
parent | 221f900511a16ab81ca54833ef69c63c6e96f493 (diff) |
tag the device as stopped even if sio_stop() failed (ie. device
is disconnected). This way, when it's ``file'' structure is
free()'d, we don't try to stop it again.
Diffstat (limited to 'usr.bin')
-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 41438d9e240..d9f315a5498 100644 --- a/usr.bin/aucat/safile.c +++ b/usr.bin/aucat/safile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safile.c,v 1.15 2009/08/28 06:30:17 ratchov Exp $ */ +/* $OpenBSD: safile.c,v 1.16 2009/09/19 15:56:04 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -178,12 +178,12 @@ safile_stop(struct file *file) { struct safile *f = (struct safile *)file; + f->started = 0; if (!sio_stop(f->hdl)) { DPRINTF("safile_stop: sio_stop() filed\n"); file_close(file); return; } - f->started = 0; DPRINTF("safile_stop: play/rec stopped\n"); } |