Opened 5 years ago

Closed 5 years ago

#3886 closed defect (duplicate)

display of 8 bit fields in custom options

Reported by: fdupont Owned by: fdupont
Priority: low Milestone: Kea0.9.2-beta
Component: Unclassified Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

I was not very satisfied by the display of signature options (two algorithm IDs on 8 bits followed by the signature itself as binary): instead of the values 1 I got raw ^A characters. I found the origin of the problem: in fact there is no operator<< defined in the C++ standard for 8 bit integers (both signed and unsigned), cf http://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/
The solution is trivial: add a static_cast to simulate promotion to (unsigned) int.

Subtickets

Change History (5)

comment:1 Changed 5 years ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

comment:2 Changed 5 years ago by marcin

Yes, typically we do static_cast when we want to print the 8 bit value. There are quite a few of these already in the code.

comment:3 Changed 5 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea0.9.2
  • Priority changed from very low to low

comment:4 Changed 5 years ago by fdupont

I merged the proposed change into #3899. Closing this as a duplicate.

comment:5 Changed 5 years ago by fdupont

  • Resolution set to duplicate
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.