|
Lines 168-173
Link Here
|
| 168 |
struct ptime_data *trim_at; /* Specific time to do trimming */ |
168 |
struct ptime_data *trim_at; /* Specific time to do trimming */ |
| 169 |
unsigned int permissions; /* File permissions on the log */ |
169 |
unsigned int permissions; /* File permissions on the log */ |
| 170 |
int flags; /* CE_BINARY */ |
170 |
int flags; /* CE_BINARY */ |
|
|
171 |
int nuncompact; /* number of rotations that should not |
| 172 |
* be compressed; -1 turns this off */ |
| 171 |
int compress; /* Compression */ |
173 |
int compress; /* Compression */ |
| 172 |
int sig; /* Signal to send */ |
174 |
int sig; /* Signal to send */ |
| 173 |
int def_cfg; /* Using the <default> rule for this file */ |
175 |
int def_cfg; /* Using the <default> rule for this file */ |
|
Lines 408-413
Link Here
|
| 408 |
tempwork->trim_at = ptime_init(src_entry->trim_at); |
410 |
tempwork->trim_at = ptime_init(src_entry->trim_at); |
| 409 |
tempwork->permissions = src_entry->permissions; |
411 |
tempwork->permissions = src_entry->permissions; |
| 410 |
tempwork->flags = src_entry->flags; |
412 |
tempwork->flags = src_entry->flags; |
|
|
413 |
tempwork->nuncompact = -1; |
| 411 |
tempwork->compress = src_entry->compress; |
414 |
tempwork->compress = src_entry->compress; |
| 412 |
tempwork->sig = src_entry->sig; |
415 |
tempwork->sig = src_entry->sig; |
| 413 |
tempwork->def_cfg = src_entry->def_cfg; |
416 |
tempwork->def_cfg = src_entry->def_cfg; |
|
Lines 426-431
Link Here
|
| 426 |
tempwork->trim_at = NULL; |
429 |
tempwork->trim_at = NULL; |
| 427 |
tempwork->permissions = 0; |
430 |
tempwork->permissions = 0; |
| 428 |
tempwork->flags = 0; |
431 |
tempwork->flags = 0; |
|
|
432 |
tempwork->nuncompact = -1; |
| 429 |
tempwork->compress = COMPRESS_NONE; |
433 |
tempwork->compress = COMPRESS_NONE; |
| 430 |
tempwork->sig = SIGHUP; |
434 |
tempwork->sig = SIGHUP; |
| 431 |
tempwork->def_cfg = 0; |
435 |
tempwork->def_cfg = 0; |
|
Lines 1268-1273
Link Here
|
| 1268 |
} |
1272 |
} |
| 1269 |
|
1273 |
|
| 1270 |
for (; q && *q && !isspacech(*q); q++) { |
1274 |
for (; q && *q && !isspacech(*q); q++) { |
|
|
1275 |
if (isdigit(*q)) { |
| 1276 |
working->nuncompact = strtol(q, NULL, 10); |
| 1277 |
while(isdigit(*(q+1))) q++; |
| 1278 |
continue; |
| 1279 |
} |
| 1271 |
switch (tolowerch(*q)) { |
1280 |
switch (tolowerch(*q)) { |
| 1272 |
case 'b': |
1281 |
case 'b': |
| 1273 |
working->flags |= CE_BINARY; |
1282 |
working->flags |= CE_BINARY; |
|
Lines 1813-1818
Link Here
|
| 1813 |
(void)rename(zfile1, zfile2); |
1822 |
(void)rename(zfile1, zfile2); |
| 1814 |
} |
1823 |
} |
| 1815 |
change_attrs(zfile2, ent); |
1824 |
change_attrs(zfile2, ent); |
|
|
1825 |
if (ent->compress > COMPRESS_NONE && |
| 1826 |
ent->nuncompact != -1 && |
| 1827 |
numlogs_c == ent->nuncompact) { |
| 1828 |
free_or_keep = KEEP_ENT; |
| 1829 |
save_zipwork(ent, NULL, ent->fsize, file2); |
| 1830 |
} |
| 1816 |
} |
1831 |
} |
| 1817 |
|
1832 |
|
| 1818 |
if (ent->numlogs > 0) { |
1833 |
if (ent->numlogs > 0) { |
|
Lines 1860-1866
Link Here
|
| 1860 |
swork = NULL; |
1875 |
swork = NULL; |
| 1861 |
if (ent->pid_cmd_file != NULL) |
1876 |
if (ent->pid_cmd_file != NULL) |
| 1862 |
swork = save_sigwork(ent); |
1877 |
swork = save_sigwork(ent); |
| 1863 |
if (ent->numlogs > 0 && ent->compress > COMPRESS_NONE) { |
1878 |
if (ent->numlogs > 0 && ent->compress > COMPRESS_NONE && |
|
|
1879 |
ent->nuncompact == -1) { |
| 1864 |
/* |
1880 |
/* |
| 1865 |
* The zipwork_entry will include a pointer to this |
1881 |
* The zipwork_entry will include a pointer to this |
| 1866 |
* conf_entry, so the conf_entry should not be freed. |
1882 |
* conf_entry, so the conf_entry should not be freed. |