diff options
| author | luwenpeng <[email protected]> | 2024-08-30 18:33:41 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-08-30 18:56:36 +0800 |
| commit | 82cb1eaeeba92f34405744c6b2449b7b80930678 (patch) | |
| tree | 3c70b4fcb47b42b55a5a0017ae4661897d5d3cd2 /infra/packet_io | |
| parent | d1d5e6e09e92361f16586f2f611351c45b2b932b (diff) | |
optimize session manager config
Diffstat (limited to 'infra/packet_io')
| -rw-r--r-- | infra/packet_io/packet_io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/infra/packet_io/packet_io.c b/infra/packet_io/packet_io.c index 42a9743..76d5981 100644 --- a/infra/packet_io/packet_io.c +++ b/infra/packet_io/packet_io.c @@ -32,7 +32,7 @@ int packet_io_config_load(struct packet_io_config *cfg, const char *toml_file) int ret = -1; const char *ptr; char *ptr_mode = NULL; - char *ptr_dumpfile_path = NULL; + char *ptr_pcap_path = NULL; char *ptr_app_symbol = NULL; char *ptr_dev_symbol = NULL; char errbuf[200]; @@ -89,12 +89,12 @@ int packet_io_config_load(struct packet_io_config *cfg, const char *toml_file) if (cfg->mode == PACKET_IO_PCAPFILE || cfg->mode == PACKET_IO_PCAPLIST) { ptr = toml_raw_in(table, "pcap_path"); - if (ptr == NULL || toml_rtos(ptr, &ptr_dumpfile_path) != 0) + if (ptr == NULL || toml_rtos(ptr, &ptr_pcap_path) != 0) { PACKET_IO_LOG_ERROR("config file missing packet_io.pcap_path"); goto error_out; } - strcpy(cfg->pcap_path, ptr_dumpfile_path); + strcpy(cfg->pcap_path, ptr_pcap_path); } else { @@ -164,9 +164,9 @@ error_out: { free(ptr_mode); } - if (ptr_dumpfile_path) + if (ptr_pcap_path) { - free(ptr_dumpfile_path); + free(ptr_pcap_path); } if (ptr_app_symbol) { |
