aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tap-sctp-analysis.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-12-31 19:36:12 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-01 05:03:42 +0000
commit2d41b15495e245d9292ba42dd3954bdebc9f3290 (patch)
tree40282b7aab9f1347489126dd98974a681dca888f /ui/tap-sctp-analysis.c
parentba589a4e445a8ad8054073eff846087fc61c9ef8 (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 'ui/tap-sctp-analysis.c')
-rw-r--r--ui/tap-sctp-analysis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c
index 3747f4df3a..1694f29fe0 100644
--- a/ui/tap-sctp-analysis.c
+++ b/ui/tap-sctp-analysis.c
@@ -320,7 +320,7 @@ add_address(address *vadd, sctp_assoc_info_t *info, guint16 direction)
return info;
}
-static gboolean
+static tap_packet_status
packet(void *tapdata _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data)
{
const struct _sctp_info *sctp_info = (const struct _sctp_info *)data;
@@ -1229,7 +1229,7 @@ packet(void *tapdata _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const voi
tsn_free(sack);
free_address(&tmp_info.src);
free_address(&tmp_info.dst);
- return TRUE;
+ return TAP_PACKET_REDRAW;
}