Changeset 875
- Timestamp:
- 04/14/08 12:47:21 (7 months ago)
- Files:
-
- 1 modified
-
trunk/plugin_fifo.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugin_fifo.c
r871 r875 69 69 { 70 70 char *s; 71 memset(fifopath, 0, 1024); 71 72 s = cfg_get(Section, "fifopath", "/tmp/lcd4linux.fifo"); 72 73 if (*s == '\0') { 73 74 info("[FIFO] empty '%s.fifopath' entry from %s, assuming '/tmp/lcd4linux.fifo'", Section, cfg_source()); 74 75 strcpy(fifopath, "/tmp/lcd4linux.fifo"); 75 } else 76 } else { 76 77 strcpy(fifopath, s); 78 info("[FIFO] read '%s.fifopath', value is '%s'", Section, fifopath); 79 } 77 80 free(s); 78 81 } … … 154 157 if (checkFifo() == 0) { 155 158 memset(buf, 0, FIFO_BUFFER_SIZE); 156 while (bytes > 0 && errno != EINTR) 159 while (bytes > 0 && errno != EINTR) { 157 160 bytes = read(fd.input, buf, FIFO_BUFFER_SIZE); 161 } 162 158 163 if (bytes < 0) { 159 error("[FIFO] Error %i: %s \n", errno, strerror(errno));164 error("[FIFO] Error %i: %s", errno, strerror(errno)); 160 165 } else { 161 166 if (strlen(buf) > 0) { … … 167 172 } 168 173 } 169 } 174 } 170 175 171 176 /* store result */
