1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-02 12:08:33 +00:00

infopipe debugging to console and docs correction

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@475 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-01-06 03:44:30 +00:00
parent 8673b53673
commit 9fb5e80a3e
4 changed files with 9 additions and 23 deletions

4
README
View File

@ -655,10 +655,6 @@ VARIABLES
XMMS/BMP InfoPipe sampling frequency of current tune XMMS/BMP InfoPipe sampling frequency of current tune
infopipe_protocol
XMMS/BMP InfoPipe protocol
infopipe_playlist_currtune infopipe_playlist_currtune
XMMS/BMP InfoPipe playlist index number of current tune XMMS/BMP InfoPipe playlist index number of current tune

View File

@ -586,10 +586,6 @@ XMMS/BMP InfoPipe full path and file name of current tune
\fBinfopipe_frequency\fR \fBinfopipe_frequency\fR
XMMS/BMP InfoPipe sampling frequency of current tune XMMS/BMP InfoPipe sampling frequency of current tune
.TP
\fBinfopipe_protocol\fR
XMMS/BMP InfoPipe protocol
.TP .TP
\fBinfopipe_playlist_currtune\fR \fBinfopipe_playlist_currtune\fR
XMMS/BMP InfoPipe playlist index number of current tune XMMS/BMP InfoPipe playlist index number of current tune

View File

@ -663,15 +663,6 @@
<para></para></listitem> <para></para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<command><option>infopipe_protocol</option></command>
</term>
<listitem>
XMMS/BMP InfoPipe protocol
<para></para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<command><option>infopipe_playlist_currtune</option></command> <command><option>infopipe_playlist_currtune</option></command>

View File

@ -60,7 +60,7 @@ void update_infopipe(void)
* -------------------------------------------------- */ * -------------------------------------------------- */
void *infopipe_thread_func(void *pvoid) void *infopipe_thread_func(void *pvoid)
{ {
int i,fd,runnable; int i,rc,fd,runnable;
fd_set readset; fd_set readset;
struct timeval tm; struct timeval tm;
static char buf[2048]; /* should equal or exceed sizeof(infopipe_t) */ static char buf[2048]; /* should equal or exceed sizeof(infopipe_t) */
@ -97,7 +97,10 @@ void *infopipe_thread_func(void *pvoid)
for a worker thread such as this. We don't want to slow down for a worker thread such as this. We don't want to slow down
user interface updates in the main thread as there is already user interface updates in the main thread as there is already
excess latency there. */ excess latency there. */
if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */ rc=select(fd+1,&readset,NULL,NULL,&tm);
if (rc == -1)
perror("infopipe select()");
else if (rc && FD_ISSET(fd,&readset)) {
if (read(fd,buf,sizeof(buf)) > 0) { /* buf has data */ if (read(fd,buf,sizeof(buf)) > 0) { /* buf has data */
@ -112,12 +115,12 @@ void *infopipe_thread_func(void *pvoid)
for(i=0;i<14;i++) for(i=0;i<14;i++)
printf("%s\n",items[i]); printf("%s\n",items[i]);
*/ */
} }
} }
else
printf("no infopipe data to read.\n");
if (close(fd) < 0) { close(fd);
break;
}
break; break;
} }