aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.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 /epan/dissectors/packet-dcerpc.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 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index e9eea18ae0..57591c7d21 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -1940,7 +1940,7 @@ dcerpcstat_init(struct register_srt* srt, GArray* srt_array)
}
}
-static int
+static tap_packet_status
dcerpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
{
guint i = 0;
@@ -1953,31 +1953,31 @@ dcerpcstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const
tap_data = (dcerpcstat_tap_data_t*)dcerpc_srt_table->table_specific_data;
if(!ri->call_data){
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
if(!ri->call_data->req_frame){
/* we have not seen the request so we don't know the delta*/
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
if(ri->call_data->opnum >= tap_data->num_procedures){
/* don't handle this since it's outside of known table */
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* we are only interested in reply packets */
if(ri->ptype != PDU_RESP){
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
/* we are only interested in certain program/versions */
if( (!uuid_equal( (&ri->call_data->uuid), (&tap_data->uuid)))
||(ri->call_data->ver != tap_data->ver)){
- return 0;
+ return TAP_PACKET_DONT_REDRAW;
}
add_srt_table_data(dcerpc_srt_table, ri->call_data->opnum, &ri->call_data->req_time, pinfo);
- return 1;
+ return TAP_PACKET_REDRAW;
}
static guint