Changeset 1f7257a8ff592ab11f5f72082f2e144955669d8c

Show
Ignore:
Timestamp:
03/06/08 04:55:14 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1204779314 +0000
git-parent:

[f23949829c33d2b6c326248aff07974cdc58b932]

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

make the jlog open as we do in the logger

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_jlog_listener.c

    reb03582 r1f7257a  
    151151    noit_log_stream_t ls; 
    152152    const char *logname; 
     153    char path[PATH_MAX], *sub; 
    153154    jcl = ac->service_ctx = noit_jlog_closure_alloc(); 
    154155    if(!noit_hash_retrieve(ac->config, "log", strlen("log"), 
     
    173174    } 
    174175 
    175     jcl->jlog = jlog_new(ls->path); 
     176    strlcpy(path, ls->path, sizeof(path)); 
     177    sub = strchr(path, '('); 
     178    if(sub) { 
     179      char *esub = strchr(sub, ')'); 
     180      if(esub) { 
     181        *esub = '\0'; 
     182        *sub = '\0'; 
     183        sub += 1; 
     184      } 
     185    } 
     186 
     187    jcl->jlog = jlog_new(path); 
    176188    if(jlog_ctx_open_reader(jcl->jlog, ac->remote_cn) == -1) { 
    177189      noitL(noit_error, "jlog reader[%s] error: %s\n", ac->remote_cn,