diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-04-14 22:14:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-04-15 05:54:41 +0000 |
commit | 89f339afa21606427b87d98d20f5e49cb4189352 (patch) | |
tree | 84b5f5489c27643646e41065082d6faff4b4dc70 /ui/tap-tcp-stream.c | |
parent | 75a6897b0f574df6c8d983e45f2eecb014a4bdc1 (diff) |
Hava a routine to read the currently-selected frome.
Have cf_read_current_record() take a capture_file as an argument and
read, into its wtap_rec and Buffer for the currently-selected frame,
information for the currently-selected frame.
Rename cf_read_record_r() to cf_read_record().
That gives us 1) a routine that reads the currently-selected frame into
the wtap_rec and Buffer for the currently-selected frame and 2) a
routine that reads an arbitrary frame into the wtap_rec and Buffer
supplied to it. If you *want* the currently-selected record, use the
former, otherwise use the latter.
Change-Id: If6bd5915dd5bc18334d7b89859822a19234153a4
Reviewed-on: https://code.wireshark.org/review/32858
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/tap-tcp-stream.c')
-rw-r--r-- | ui/tap-tcp-stream.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/tap-tcp-stream.c b/ui/tap-tcp-stream.c index f0ce7144cd..138bfdcf64 100644 --- a/ui/tap-tcp-stream.c +++ b/ui/tap-tcp-stream.c @@ -283,8 +283,6 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs) return NULL; } - fdata = cf->current_frame; - /* no real filter yet */ if (!dfilter_compile("tcp", &sfcode, &err_msg)) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg); @@ -293,10 +291,11 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs) } /* dissect the current record */ - if (!cf_read_record(cf, fdata)) { + if (!cf_read_current_record(cf)) { return NULL; /* error reading the record */ } + fdata = cf->current_frame; error_string = register_tap_listener("tcp", &th, NULL, 0, NULL, tap_tcpip_packet, NULL, NULL); if (error_string) { |