"a & b == c" is, in C, parsed as "a & (b == c)" - and if b and c are the

same, and have only one bit set, "(a & b) == c", which is what is
intended, is the same as "a & b".

In addition, we don't want to do desegmentation if "isup_apm_desegment"
isn't set, so that test should be ANDed with the other two tests.

svn path=/trunk/; revision=16792
This commit is contained in:
Guy Harris 2005-12-14 07:33:07 +00:00
parent eaee2b68c5
commit 66c394806a
1 changed files with 4 additions and 2 deletions

View File

@ -3002,10 +3002,12 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf
/*
* Defragment ?
* (si_and_apm_seg_ind != 0xc0) -> Non segmented APM message
* (si_and_apm_seg_ind & 0x80 == 0x80) NO Segmentation local ref ( without SLR defrag. does not work)
* (si_and_apm_seg_ind & H_8BIT_MASK)
* -> NO Segmentation local ref ( without SLR defrag. does not work)
*
*/
if ((isup_apm_desegment && si_and_apm_seg_ind != 0xc0)|| (si_and_apm_seg_ind & 0x80 == 0x80)){
if (isup_apm_desegment &&
(si_and_apm_seg_ind != 0xc0 || si_and_apm_seg_ind & H_8BIT_MASK)){
/* Segmented message */
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;