Skip to content

Commit

Permalink
Generate braces in find_used_compressalgos function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed May 5, 2013
1 parent 3fa8dea commit d355b16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dird/backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ void generate_backup_summary(JCR *jcr, MEDIA_DBR *mr, CLIENT_DBR *cr,
jcr->res.client->GraceTime +
jcr->res.client->SoftQuotaGracePeriod);

find_used_compressalgos( &compress_algo_list, jcr);
find_used_compressalgos(&compress_algo_list, jcr);

if (RunTime <= 0) {
kbps = 0;
Expand Down Expand Up @@ -996,7 +996,7 @@ void generate_backup_summary(JCR *jcr, MEDIA_DBR *mr, CLIENT_DBR *cr,
} else {
if (jcr->HasBase) {
Mmsg(client_options, _(
" Software Compression: %s (%s)\n"
" Software Compression: %s%s\n"
" Base files/Used files: %lld/%lld (%.2f%%)\n"
" VSS: %s\n"
" Encryption: %s\n"
Expand All @@ -1011,7 +1011,7 @@ void generate_backup_summary(JCR *jcr, MEDIA_DBR *mr, CLIENT_DBR *cr,
jcr->accurate ? _("yes") : _("no"));
} else {
Mmsg(client_options, _(
" Software Compression: %s (%s)\n"
" Software Compression: %s%s\n"
" VSS: %s\n"
" Encryption: %s\n"
" Accurate: %s\n"),
Expand Down
6 changes: 6 additions & 0 deletions src/dird/inc_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ void find_used_compressalgos(POOL_MEM *compressalgos, JCR *jcr)
if (bstrncmp(k, fs_opt->option, strlen(fs_opt->option))) {
if (cnt > 0) {
compressalgos->strcat(",");
} else {
compressalgos->strcat(" (");
}
compressalgos->strcat(fs_opt->name);
k += strlen(fs_opt->option) - 1;
Expand All @@ -330,6 +332,10 @@ void find_used_compressalgos(POOL_MEM *compressalgos, JCR *jcr)
}
}
}

if (cnt > 0) {
compressalgos->strcat(")");
}
}

/*
Expand Down

0 comments on commit d355b16

Please sign in to comment.