aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2021-12-25 13:39:12 -0500
committerJohn Thacker <johnthacker@gmail.com>2021-12-25 15:52:46 -0500
commit9e7b5c9189d4f9f56181d85deae6f1db0f80fd43 (patch)
tree4b735c5c89d5718938f5c7771827f3c644ee13b3 /text2pcap.c
parent38dbb8486f3e1f58cae344c6c6f7e52a19ceeda6 (diff)
text2pcap: Use debug level
Pass the debug level parameter from text2pcap to text_import so that it is used as it was before to print internal parsing information.
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/text2pcap.c b/text2pcap.c
index a9a4a11981..4f8bbd32ec 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -102,8 +102,6 @@
/* File format */
static gboolean use_pcapng = FALSE;
-/* Debug level */
-static int debug = 0;
/* Be quiet */
static gboolean quiet = FALSE;
@@ -382,9 +380,9 @@ parse_options(int argc, char *argv[], text_import_info_t * const info, wtap_dump
print_usage(stdout);
exit(0);
break;
- case 'd': if (!quiet) debug++; break;
+ case 'd': if (!quiet) info->debug++; break;
case 'D': has_direction = TRUE; break;
- case 'q': quiet = TRUE; debug = 0; break;
+ case 'q': quiet = TRUE; info->debug = 0; break;
case 'l': pcap_link_type = (guint32)strtol(ws_optarg, NULL, 0); break;
case 'm': max_offset = (guint32)strtol(ws_optarg, NULL, 0); break;
case 'n': use_pcapng = TRUE; break;
@@ -883,7 +881,7 @@ main(int argc, char *argv[])
ret = text_import(&info);
- if (debug)
+ if (info.debug)
fprintf(stderr, "\n-------------------------\n");
if (!quiet) {
bytes_written = wtap_get_bytes_dumped(wdh);