aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-05-20 10:57:56 +0200
committerDavid 'Digit' Turner <digit@google.com>2009-05-20 10:57:56 +0200
commit7410e8a38956bc52b7a8ba18c0c9618bd4af8000 (patch)
tree2b0710433963ac333bd4c82b7cb65c9dc22ce483
parent3ea24be7cceb4dc4557fb33f758a83380725bc83 (diff)
downloadexternal_qemu-7410e8a38956bc52b7a8ba18c0c9618bd4af8000.zip
external_qemu-7410e8a38956bc52b7a8ba18c0c9618bd4af8000.tar.gz
external_qemu-7410e8a38956bc52b7a8ba18c0c9618bd4af8000.tar.bz2
Fix one minor crashing bug when -debug-audio is used with the OSS audio backend.
Moreover, properly set errno to 0 in QSOCKET_CALL macro, to avoid misleading trace messages when -debug-slirp is used
-rw-r--r--audio/esdaudio.c2
-rw-r--r--sockets.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/audio/esdaudio.c b/audio/esdaudio.c
index 05c030f..2226022 100644
--- a/audio/esdaudio.c
+++ b/audio/esdaudio.c
@@ -226,7 +226,7 @@ static int qesd_run_out (HWVoiceOut *hw)
esd->live = live - decr;
hw->rpos = esd->rpos;
if (esd->live > 0) {
- O("%s: signaling %d samples\n", esd->live);
+ O("%s: signaling %d samples\n", __FUNCTION__, esd->live);
audio_pt_unlock_and_signal (&esd->pt, AUDIO_FUNC);
}
else {
diff --git a/sockets.c b/sockets.c
index 87ee567..2e61d9a 100644
--- a/sockets.c
+++ b/sockets.c
@@ -50,7 +50,10 @@
do { _ret = (_cmd); } while ( _ret < 0 && WSAGetLastError() == WSAEINTR )
#else
# define QSOCKET_CALL(_ret,_cmd) \
- do { _ret = (_cmd); } while ( _ret < 0 && errno == EINTR )
+ do { \
+ errno = 0; \
+ do { _ret = (_cmd); } while ( _ret < 0 && errno == EINTR ); \
+ } while (0);
#endif
#ifdef _WIN32