summaryrefslogtreecommitdiff
path: root/lib/libsndio
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-10-26 19:06:29 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-10-26 19:06:29 +0000
commit0b8b322500bcd224cac3a587a114e422849c56ac (patch)
treec05050ebfb47f13a61ca904d2b533d32fd6b42c5 /lib/libsndio
parentbea86742f2e8809cd4621cd01f0790bb51514325 (diff)
reader state cannot be IDLE, terminate the stream if so rather
entering a busy loop
Diffstat (limited to 'lib/libsndio')
-rw-r--r--lib/libsndio/aucat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libsndio/aucat.c b/lib/libsndio/aucat.c
index 272df65d246..0cd2128d55c 100644
--- a/lib/libsndio/aucat.c
+++ b/lib/libsndio/aucat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aucat.c,v 1.31 2009/10/24 09:35:16 ratchov Exp $ */
+/* $OpenBSD: aucat.c,v 1.32 2009/10/26 19:06:28 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -506,8 +506,9 @@ aucat_read(struct sio_hdl *sh, void *buf, size_t len)
return 0;
break;
case STATE_IDLE:
- DPRINTF("aucat_read: unexpected idle\n");
- break;
+ DPRINTF("aucat_read: unexpected idle state\n");
+ hdl->sio.eof = 1;
+ return 0;
}
}
if (len > hdl->rtodo)