Changeset 875

Show
Ignore:
Timestamp:
04/14/08 12:47:21 (7 months ago)
Author:
michux
Message:

minor update

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugin_fifo.c

    r871 r875  
    6969{ 
    7070    char *s; 
     71    memset(fifopath, 0, 1024); 
    7172    s = cfg_get(Section, "fifopath", "/tmp/lcd4linux.fifo"); 
    7273    if (*s == '\0') { 
    7374  info("[FIFO] empty '%s.fifopath' entry from %s, assuming '/tmp/lcd4linux.fifo'", Section, cfg_source()); 
    7475  strcpy(fifopath, "/tmp/lcd4linux.fifo"); 
    75     } else 
     76    } else { 
    7677  strcpy(fifopath, s); 
     78  info("[FIFO] read '%s.fifopath', value is '%s'", Section, fifopath); 
     79    } 
    7780    free(s); 
    7881} 
     
    154157    if (checkFifo() == 0) { 
    155158  memset(buf, 0, FIFO_BUFFER_SIZE); 
    156   while (bytes > 0 && errno != EINTR) 
     159  while (bytes > 0 && errno != EINTR) { 
    157160      bytes = read(fd.input, buf, FIFO_BUFFER_SIZE); 
     161  } 
     162   
    158163  if (bytes < 0) { 
    159       error("[FIFO] Error %i: %s\n", errno, strerror(errno)); 
     164      error("[FIFO] Error %i: %s", errno, strerror(errno)); 
    160165  } else { 
    161166      if (strlen(buf) > 0) { 
     
    167172      } 
    168173  } 
    169     } 
     174    }  
    170175 
    171176    /* store result */