]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #766 about Job logs displayed with unneeded linefeed
authorEric Bollengier <eric@baculasystems.com>
Wed, 29 Jun 2016 13:17:19 +0000 (15:17 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 3 Jul 2016 10:47:47 +0000 (12:47 +0200)
bacula/src/cats/sql.c

index e241d09efdd80b6bc397fa187147b372260a8a51..b20911c878e8556ee83a79cf021c8a4cef574375 100644 (file)
@@ -686,7 +686,8 @@ list_result(JCR *jcr, BDB *mdb, DB_LIST_HANDLER *send, void *ctx, e_list_type ty
          } else if (mdb->sql_field_is_numeric(field->type) && !jcr->gui && is_an_integer(row[i])) { 
             bsnprintf(buf, sizeof(buf), " %*s |", max_len, 
                       add_commas(row[i], ewc)); 
-         } else { 
+         } else {
+            strip_trailing_junk(row[i]);
             bsnprintf(buf, sizeof(buf), " %-*s |", max_len, row[i]); 
          } 
          send(ctx, buf); 
@@ -711,7 +712,8 @@ vertical_list:
          } else if (mdb->sql_field_is_numeric(field->type) && !jcr->gui && is_an_integer(row[i])) { 
             bsnprintf(buf, sizeof(buf), " %*s: %s\n", max_len, field->name, 
                 add_commas(row[i], ewc)); 
-         } else { 
+         } else {
+            strip_trailing_junk(row[i]);
             bsnprintf(buf, sizeof(buf), " %*s: %s\n", max_len, field->name, row[i]); 
          } 
          send(ctx, buf);