aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tap-rlc-graph.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-rlc-graph.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-rlc-graph.c')
-rw-r--r--ui/tap-rlc-graph.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/tap-rlc-graph.c b/ui/tap-rlc-graph.c
index af1a982451..354ee9499e 100644
--- a/ui/tap-rlc-graph.c
+++ b/ui/tap-rlc-graph.c
@@ -50,7 +50,7 @@ gboolean compare_rlc_headers(guint16 ueid1, guint16 channelType1, guint16 channe
/* This is the tap function used to identify a list of channels found in the current frame. It is only used for the single,
currently selected frame. */
-static gboolean
+static tap_packet_status
tap_lte_rlc_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip)
{
int n;
@@ -85,7 +85,7 @@ tap_lte_rlc_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, c
th->num_hdrs++;
}
- return FALSE; /* i.e. no immediate redraw requested */
+ return TAP_PACKET_DONT_REDRAW; /* i.e. no immediate redraw requested */
}
/* Return an array of tap_info structs that were found while dissecting the current frame
@@ -170,7 +170,7 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
}
/* This is the tapping function to update stats when dissecting the whole packet list */
-static gboolean rlc_lte_tap_for_graph_data(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
+static tap_packet_status rlc_lte_tap_for_graph_data(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
struct rlc_graph *graph = (struct rlc_graph *)pct;
const rlc_lte_tap_info *rlchdr = (const rlc_lte_tap_info*)vip;
@@ -224,7 +224,7 @@ static gboolean rlc_lte_tap_for_graph_data(void *pct, packet_info *pinfo, epan_d
graph->last_segment = segment;
}
- return FALSE; /* i.e. no immediate redraw requested */
+ return TAP_PACKET_DONT_REDRAW; /* i.e. no immediate redraw requested */
}
/* If don't have a channel, try to get one from current frame, then read all frames looking for data