diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-02-27 07:17:52 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-02-27 07:17:52 +0000 |
commit | a3afe3e0f63015432ce9e9d9a8c93c89d26b7287 (patch) | |
tree | 1c450b52fe585036b967684d503c0f344ab6ce10 /audio/esound | |
parent | 0ad38e801e60c285e73207e6671c6f339de6e4d5 (diff) | |
download | ports-a3afe3e0f63015432ce9e9d9a8c93c89d26b7287.tar.gz ports-a3afe3e0f63015432ce9e9d9a8c93c89d26b7287.zip |
Fix a bug where esd could take 100% of the CPU when a client disconnected.
Notes
Notes:
svn path=/head/; revision=186090
Diffstat (limited to 'audio/esound')
-rw-r--r-- | audio/esound/Makefile | 1 | ||||
-rw-r--r-- | audio/esound/files/patch-players.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/audio/esound/Makefile b/audio/esound/Makefile index 0b1c5ce725be..6717a68c595e 100644 --- a/audio/esound/Makefile +++ b/audio/esound/Makefile @@ -7,6 +7,7 @@ PORTNAME= esound PORTVERSION= 0.2.37 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.2 diff --git a/audio/esound/files/patch-players.c b/audio/esound/files/patch-players.c new file mode 100644 index 000000000000..6a140b32b1b7 --- /dev/null +++ b/audio/esound/files/patch-players.c @@ -0,0 +1,20 @@ +--- players.c.orig Tue Feb 27 02:16:05 2007 ++++ players.c Tue Feb 27 02:16:37 2007 +@@ -310,13 +310,14 @@ int read_player( esd_player_t *player ) + player->data_buffer + player->actual_length, + player->buffer_length - player->actual_length, + actual, "str rd" ); +- if (bytes_read < player->buffer_length - player->actual_length) +- break; +- + /* check for end of stream */ + if ( actual == 0 + || ( actual < 0 && errno != EAGAIN && errno != EINTR ) ) + return -1; ++ ++ if (bytes_read < player->buffer_length - player->actual_length) ++ break; ++ + /* more data, save how much we got */ + if ( actual > 0 ) + player->actual_length += actual; |