From 3ab20de02b813c3ed47060b8a0f5e413fdddfc43 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Fri, 4 Sep 2009 18:18:34 +0000 Subject: From Rob Casey: Fix for: Incorrect station identifier parsing in Kingfisher dissector See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3946 svn path=/trunk/; revision=29700 --- epan/dissectors/packet-kingfisher.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'epan/dissectors/packet-kingfisher.c') diff --git a/epan/dissectors/packet-kingfisher.c b/epan/dissectors/packet-kingfisher.c index bc0b7bec2e..9727a8fd43 100644 --- a/epan/dissectors/packet-kingfisher.c +++ b/epan/dissectors/packet-kingfisher.c @@ -259,18 +259,18 @@ dissect_kingfisher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean kfp->version = (kfp->function & 0x80)?3:2; - kfp->system = tvb_get_guint8(tvb, 0); - kfp->message = tvb_get_guint8(tvb, 5); - - - if(kfp->version == 2){ - kfp->target = tvb_get_guint8(tvb, 1); - kfp->from = tvb_get_guint8(tvb, 3); - kfp->via = tvb_get_guint8(tvb, 4); - } else { - kfp->target |= (tvb_get_guint8(tvb, 7) << 8); - kfp->from |= (tvb_get_guint8(tvb, 8) << 8); - kfp->via |= (tvb_get_guint8(tvb, 9) << 8); + kfp->system = tvb_get_guint8( tvb, 0 ); + kfp->message = tvb_get_guint8( tvb, 5 ); + + kfp->target = tvb_get_guint8( tvb, 1 ); + kfp->from = tvb_get_guint8( tvb, 3 ); + kfp->via = tvb_get_guint8( tvb, 4 ); + + if( kfp->version == 3 ) + { + kfp->target |= ( tvb_get_guint8( tvb, 7 ) << 8 ); + kfp->from |= ( tvb_get_guint8( tvb, 8 ) << 8 ); + kfp->via |= ( tvb_get_guint8( tvb, 9 ) << 8 ); } -- cgit v1.2.3