infopipe tweaking
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Fri, 6 Jan 2006 00:35:49 +0000 (00:35 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Fri, 6 Jan 2006 00:35:49 +0000 (00:35 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@470 7f574dfc-610e-0410-a909-a81674777703

src/infopipe.c
src/infopipe.h

index ef93ad9..1049dff 100644 (file)
@@ -63,8 +63,9 @@ void *infopipe_thread_func(void *pvoid)
     int i,fd,runnable;
     fd_set readset;
     struct timeval tm;
-    char buf[2048],*pbuf;
-    infopipe_t items;
+    static char buf[2048];  /* such equal or exceed sizeof(infopipe_t) */
+    static infopipe_t items;
+    char *pbuf;
 
     pvoid=(void*)pvoid; /* useless cast to avoid unused var warning */
 
@@ -92,9 +93,9 @@ void *infopipe_thread_func(void *pvoid)
             FD_ZERO(&readset);
            FD_SET(fd,&readset);
 
-           /* The select() below can block for a brief time (tm value) and is 
-               ideally suited for a worker thread such as this.  We don't want 
-               to slow down ui updates in the main thread as there is already 
+           /* The select() below can block for time tm and is ideally suited
+               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 
               excess latency there. */
             if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */
                    
index 7425af5..ba5f7bc 100644 (file)
@@ -50,7 +50,7 @@ enum _infopipe_keys {
 };
 
 /* 14 slots for the infopipe values */
-typedef char infopipe_t[14][256];
+typedef char infopipe_t[14][128];
 
 /* Service routine for the conky main thread */
 void update_infopipe(void);