diff options
-rw-r--r-- | ui/text_import.c | 5 | ||||
-rw-r--r-- | ui/text_import_scanner.h | 1 | ||||
-rw-r--r-- | ui/text_import_scanner.l | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ui/text_import.c b/ui/text_import.c index 186a95648a..da67324423 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -384,7 +384,7 @@ number_of_padding_bytes (guint32 length) /*---------------------------------------------------------------------- * Write current packet out */ -void +static void write_current_packet (void) { int prefix_length = 0; @@ -1117,6 +1117,9 @@ text_import(text_import_info_t *info) max_offset = info->max_frame_length; ret = text_import_scan(info->import_text_file); + if (ret == 0) { + write_current_packet(); + } g_free(packet_buf); return ret; } diff --git a/ui/text_import_scanner.h b/ui/text_import_scanner.h index b0a6d0c71c..a67b50766d 100644 --- a/ui/text_import_scanner.h +++ b/ui/text_import_scanner.h @@ -30,7 +30,6 @@ typedef enum { void parse_token(token_t token, char *str); -void write_current_packet(void); extern FILE *text_importin; diff --git a/ui/text_import_scanner.l b/ui/text_import_scanner.l index 5c89405745..9bc812edc8 100644 --- a/ui/text_import_scanner.l +++ b/ui/text_import_scanner.l @@ -122,8 +122,6 @@ eol \r?\n\r? {comment} { parse_token(T_EOL, NULL); } {text} { parse_token(T_TEXT, yytext); } -<<EOF>> { write_current_packet(); yyterminate(); } - %% /* |