Omit logpurge attr if no purge time was configured

This commit is contained in:
Howard Chu 2006-06-17 01:28:50 +00:00
parent bc8550e3c2
commit 77dce50110

View File

@ -620,6 +620,10 @@ log_cf_gen(ConfigArgs *c)
rc = mask_to_verbs( logops, li->li_ops, &c->rvalue_vals );
break;
case LOG_PURGE:
if ( !li->li_age ) {
rc = 1;
break;
}
agebv.bv_val = agebuf;
log_age_unparse( li->li_age, &agebv );
agebv.bv_val[agebv.bv_len] = ' ';