diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-12-31 19:36:12 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-01-01 05:03:42 +0000 |
commit | 2d41b15495e245d9292ba42dd3954bdebc9f3290 (patch) | |
tree | 40282b7aab9f1347489126dd98974a681dca888f /epan/dissectors/packet-tftp.c | |
parent | ba589a4e445a8ad8054073eff846087fc61c9ef8 (diff) |
Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.
We make the return value from the packet routine an enum.
Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.
One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".
Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".
Clean up some white space while we're at it.
Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-tftp.c')
-rw-r--r-- | epan/dissectors/packet-tftp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index 852d33653e..61388fd643 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -157,7 +157,7 @@ typedef struct _tftp_eo_t { } tftp_eo_t; /* Tap function */ -static gboolean +static tap_packet_status tftp_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data) { export_object_list_t *object_list = (export_object_list_t *)tapdata; @@ -202,7 +202,7 @@ tftp_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Pass out entry to the GUI */ object_list->add_entry(object_list->gui_data, entry); - return TRUE; /* State changed - window should be redrawn */ + return TAP_PACKET_REDRAW; /* State changed - window should be redrawn */ } /* Clean up the stored parts of a single tapped entry */ |