diff options
author | Luis Medinas <metalgod@gentoo.org> | 2005-10-31 03:09:03 +0000 |
---|---|---|
committer | Luis Medinas <metalgod@gentoo.org> | 2005-10-31 03:09:03 +0000 |
commit | c62051e4bdf8af8936ca9cdd2614ac10cb8e056c (patch) | |
tree | feac9a78f348d643f73020d703880e4b60a7375f /media-plugins/xmms-infopipe/files | |
parent | 2.0.53_rc7 release (diff) | |
download | gentoo-2-c62051e4bdf8af8936ca9cdd2614ac10cb8e056c.tar.gz gentoo-2-c62051e4bdf8af8936ca9cdd2614ac10cb8e056c.tar.bz2 gentoo-2-c62051e4bdf8af8936ca9cdd2614ac10cb8e056c.zip |
Added Debian patches to fix a few bugs including bug #103435.
(Portage version: 2.0.53_rc6)
Diffstat (limited to 'media-plugins/xmms-infopipe/files')
-rw-r--r-- | media-plugins/xmms-infopipe/files/digest-xmms-infopipe-1.3-r1 | 1 | ||||
-rw-r--r-- | media-plugins/xmms-infopipe/files/xmms-infopipe-tweaks.patch | 89 |
2 files changed, 90 insertions, 0 deletions
diff --git a/media-plugins/xmms-infopipe/files/digest-xmms-infopipe-1.3-r1 b/media-plugins/xmms-infopipe/files/digest-xmms-infopipe-1.3-r1 new file mode 100644 index 000000000000..02b695d97b0d --- /dev/null +++ b/media-plugins/xmms-infopipe/files/digest-xmms-infopipe-1.3-r1 @@ -0,0 +1 @@ +MD5 1ccc90254c58a81f87abc43720fe71bf xmms-infopipe-1.3.tar.gz 172599 diff --git a/media-plugins/xmms-infopipe/files/xmms-infopipe-tweaks.patch b/media-plugins/xmms-infopipe/files/xmms-infopipe-tweaks.patch new file mode 100644 index 000000000000..0004e146c47b --- /dev/null +++ b/media-plugins/xmms-infopipe/files/xmms-infopipe-tweaks.patch @@ -0,0 +1,89 @@ +--- xmms-infopipe-1.3.orig/src/infopipe_senddata.c ++++ xmms-infopipe-1.3/src/infopipe_senddata.c +@@ -5,6 +5,7 @@ + #include <stdio.h> + #include <glib.h> + #include <xmms/util.h> ++#include <xmms/xmmsctrl.h> + #include "infopipe.h" + #include "../config.h" + +@@ -14,7 +15,7 @@ + This will get the XMMS information and print them out to the pipe. + */ + void blast_info(FILE *pipe) { +- gchar *play_status; ++ gchar *play_status, *s1, *s2; + gint tunes = xmms_remote_get_playlist_length(SESSIONID); + gint current = xmms_remote_get_playlist_pos(SESSIONID); + +@@ -81,10 +82,14 @@ + fprintf(pipe, "Channels: %d\n",nch); + + /* The basicest of the basic information. Title string and file name. */ +- fprintf(pipe, "Title: %s\n", +- xmms_remote_get_playlist_title(SESSIONID,current)); +- fprintf(pipe, "File: %s\n", +- xmms_remote_get_playlist_file(SESSIONID,current)); ++ s1 = xmms_remote_get_playlist_title(SESSIONID,current); ++ s2 = xmms_remote_get_playlist_file(SESSIONID,current); ++ ++ fprintf(pipe, "Title: %s\n", s1); ++ fprintf(pipe, "File: %s\n", s2); ++ ++ g_free(s1); /* xmms_remote_get_playlist_* require we call g_free on the returned string */ ++ g_free(s2); /* xmms_remote_get_playlist_* require we call g_free on the returned string */ + + g_free(play_status); + } +--- xmms-infopipe-1.3.orig/src/infopipe.c ++++ xmms-infopipe-1.3/src/infopipe.c +@@ -228,16 +228,24 @@ + fd_set fds; + FILE *p; /* the pipe */ + int fd; /* File descriptor for pipe, and its flags. */ ++ struct timespec tv; + + for(;;) { ++ /* This is a thread, fill the structure early */ ++ tv.tv_sec = 0; ++ tv.tv_nsec = 100000000; /* 1/10th of a second */ ++ + /* Open the pipe as file descriptor. */ + /* (O_RDONLY seems to be enough in Linux, but FreeBSDites seemed to + demand O_RDWR.) */ +- fd = open(fifo_file, O_RDWR); ++ /* (Actually, we need to write to the pipe, not read it, so O_WRONLY) */ ++ fd = open(fifo_file, O_WRONLY); + + if(fd == -1) { + perror("xmms_infopipe: Pipe open failed"); + xmms_quit(); ++ /* exit the function, don't give the chance to fill with invalid data */ ++ return; + } + + /* Set the file handle to use non-blocking I/O */ +@@ -262,9 +270,8 @@ + /* Changed to 1 second after request... report if you have problems. + FIXME: Should use XMMS configfile facility & config dialog??? + */ +- sleep(1); /* Umm, or non-blockingness still doesn't work without this! +- Is there some nicer way of saying this, like "wait +- until no reader?" select()? */ ++ ++ nanosleep(&tv, NULL); + } + } + +--- xmms-infopipe-1.3.orig/applications/xmms-info.php ++++ xmms-infopipe-1.3/applications/xmms-info.php +@@ -11,7 +11,7 @@ + + $info = fopen ("/tmp/xmms-info", "r"); + +- $input = fread ($info, 261); ++ $input = fread ($info, 2048); + $parse = split ("\n", $input); + + fclose ($info); |