Wireshark-commits: [Wireshark-commits] master-2.2 9af0adc: SEL Protocol - Fix 'Fast Meter Config' s
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Thu, 18 Aug 2016 20:47:12 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9af0adce69dc7afc529150b1a183167e615d63f6
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

9af0adc by Chris Bontje (cbontje@xxxxxxxxx):

    SEL Protocol - Fix 'Fast Meter Config' sub-tree addition typo & 'if (tree)' usage
    
    - The proto_tree_add_subtree call was previously using the length of the full tvb,
    instead of len-2 like all other calls.  This typo did not previously cause an issue,
    but in newer versions of Wireshark it causes an assert.
    
    - When I created the selfm dissector 4-5 years ago, I used packet-synphasor.c
    as a template and there was an 'if (tree)' wrapper around several initial GUI calls
    including col_*** info column clear/set functions.  It looks like in recent years
    this layout has been removed (for example, https://code.wireshark.org/review/#/c/6725/ ).
    I'm not sure of the exact reasoning behind this, but in Wireshark 2.x (QT), there are
    several conditions where in the SEL protocol dissector the info column will be
    cleared and not repopulate - I can only assume because col_clear has been called
    with no col_add's.  Removal of this 'if' condition does correct the issue with no immediate ill effects..
    
    Change-Id: I4c619cb320cd2152e1d4d1b76c809b1498dfda61
    Reviewed-on: https://code.wireshark.org/review/17147
    Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
    (cherry picked from commit ea024e245e3db5f65a99479be54414ba5f2413fc)
    Reviewed-on: https://code.wireshark.org/review/17152
    

Actions performed:

    from  677aee3   xbxml: restore removed line.
    adds  9af0adc   SEL Protocol - Fix 'Fast Meter Config' sub-tree addition typo & 'if (tree)' usage


Summary of changes:
 epan/dissectors/packet-selfm.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)