Changeset 142a42969bbc5793e9a8f3fe6fe352f01b663bc8

Show
Ignore:
Timestamp:
11/13/09 20:40:27 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1258144827 +0000
git-parent:

[5cffd17c6e77c2634aa900dbfa5a0385fa9cf9e8]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1258144827 +0000
Message:

fixes #218

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_log.c

    r5bb306c r142a429  
    131131 
    132132static int 
    133 jlog_lspath_to_fspath(noit_log_stream_t ls, char *buff, int len) { 
     133jlog_lspath_to_fspath(noit_log_stream_t ls, char *buff, int len, 
     134                      char **subout) { 
    134135  char *sub; 
     136  if(subout) *subout = NULL; 
    135137  if(!ls->path) return -1; 
    136138  strlcpy(buff, ls->path, len); 
     
    142144      *sub = '\0'; 
    143145      sub += 1; 
     146      if(subout) *subout = sub; 
    144147    } 
    145148  } 
     
    176179  log = (jlog_ctx *)ls->op_ctx; 
    177180  if(!log) return -1; 
    178   if(jlog_lspath_to_fspath(ls, path, sizeof(path)) <= 0) return -1; 
     181  if(jlog_lspath_to_fspath(ls, path, sizeof(path), NULL) <= 0) return -1; 
    179182  d = opendir(path); 
    180183  if(!d) return -1; 
     
    231234  jlog_ctx *log = NULL; 
    232235 
    233   if(jlog_lspath_to_fspath(ls, path, sizeof(path)) <= 0) return -1; 
     236  if(jlog_lspath_to_fspath(ls, path, sizeof(path), &sub) <= 0) return -1; 
    234237  log = jlog_new(path); 
    235238  if(!log) return -1;