LP1567514 - Don't Output Null Byte for Spool Files user/jboyer/lp1567514_msi_null_byte
authorJason Boyer <jboyer@library.in.gov>
Thu, 7 Apr 2016 16:08:09 +0000 (12:08 -0400)
committerJason Boyer <jboyer@library.in.gov>
Thu, 7 Apr 2016 16:08:09 +0000 (12:08 -0400)
If a spool file is defined on the marc_stream_importer.pl
command line, no null byte is output after the record(s)
are processed.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Open-ILS/src/support-scripts/marc_stream_importer.pl

index f51e0ff..b6c51cb 100755 (executable)
@@ -492,7 +492,7 @@ sub process_file {
     $msg .= "Successfully imported $imported $cur_rec_type records ".
         "using merge profile '$profile'\n" if $imported;
     $msg .= "Failed to import $failed $cur_rec_type records\n" if $failed;
-    $msg .= "\x00";
+    $msg .= "\x00" unless $spoolfile;
     print $msg;
 
     clear_auth_token(); # logout