Wrong debug message in d_tcp.c:1559

Bug #1493361 reported by Klaus Warnke on 2015-09-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rohc
Status tracked in Rohc-main
Rohc-1.7.x
Low
Didier Barvaux
Rohc-main
Low
Didier Barvaux

Bug Description

There is a wrong debug message in d_tcp.c:1559:

   /* ACK number */
   if(co_common->ack_indicator != 0)
   {
    rohc_decomp_debug(context, "ACK flag not set, but indicator for "
                      "ACK number is %u instead of 0",
                      co_common->ack_indicator);
   }

Should be replaced with similar like this

   /* ACK number */
   if((co_common->ack_flag == 0)
                           && (co_common->ack_indicator != 0))
   {
    rohc_decomp_debug(context, "ACK flag not set, but indicator for "
                      "ACK number is %u instead of 0",
                      co_common->ack_indicator);
   }

to prevent wrong messages like

[DEBUG] [d_tcp.c:1559 d_tcp_parse_CO()] ACK flag not set, but indicator for ACK number is 2 instead of 0

even if ack_flag is set.

Breakpoint 3 (d_tcp.c:1557) pending.
(gdb) p co_common->ack_flag
$1 = 1 '\001'

Best,
Klaus Warnke

Didier Barvaux (didier-barvaux) wrote :

You're right. Thank you for the report. I'll fix it in master for the 2.0.0 release.

tags: added: library tcp
Didier Barvaux (didier-barvaux) wrote :

Fix pushed on master.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers