Changeset 142a42969bbc5793e9a8f3fe6fe352f01b663bc8
- 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
| r5bb306c |
r142a429 |
|
| 131 | 131 | |
|---|
| 132 | 132 | static int |
|---|
| 133 | | jlog_lspath_to_fspath(noit_log_stream_t ls, char *buff, int len) { |
|---|
| | 133 | jlog_lspath_to_fspath(noit_log_stream_t ls, char *buff, int len, |
|---|
| | 134 | char **subout) { |
|---|
| 134 | 135 | char *sub; |
|---|
| | 136 | if(subout) *subout = NULL; |
|---|
| 135 | 137 | if(!ls->path) return -1; |
|---|
| 136 | 138 | strlcpy(buff, ls->path, len); |
|---|
| … | … | |
| 142 | 144 | *sub = '\0'; |
|---|
| 143 | 145 | sub += 1; |
|---|
| | 146 | if(subout) *subout = sub; |
|---|
| 144 | 147 | } |
|---|
| 145 | 148 | } |
|---|
| … | … | |
| 176 | 179 | log = (jlog_ctx *)ls->op_ctx; |
|---|
| 177 | 180 | 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; |
|---|
| 179 | 182 | d = opendir(path); |
|---|
| 180 | 183 | if(!d) return -1; |
|---|
| … | … | |
| 231 | 234 | jlog_ctx *log = NULL; |
|---|
| 232 | 235 | |
|---|
| 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; |
|---|
| 234 | 237 | log = jlog_new(path); |
|---|
| 235 | 238 | if(!log) return -1; |
|---|