Opened 7 years ago

Closed 7 years ago

#3062 closed enhancement (fixed)

Create generic "CalloutHandle" store

Reported by: stephen Owned by: stephen
Priority: medium Milestone: Sprint-DHCP-20130821
Component: dhcp Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


The DHCP code contains two functions (called getCalloutHandle()) that allow a hooks "CalloutHandle" to be associated with a packet. This ticket extends those functions to allow stored callout handles to be cleared.


Change History (4)

comment:1 Changed 7 years ago by stephen

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

comment:2 Changed 7 years ago by stephen

  • Owner changed from stephen to UnAssigned
  • Status changed from accepted to reviewing

Now ready for review.

Interestingly enough, there was a bug in the previous server-specific implementation in that the stored CalloutHandlePtr was not declared static. As a result, a new CalloutHandle was being returned on every call.

comment:3 Changed 7 years ago by tmark

  • Owner changed from UnAssigned to stephen

Changes seem fine. I do have one question:

Is the equality test used in getCalloutHandler sufficient to consider the two packet pointers equal? As these are shared pointers, this amounts to a.get() == b.get(), which would compare the allocated pointer values,as opposed to *(a.get()) == *(b.get()) (if the packet classes had == defined)? Basically, is there any risk that in procesing a packet, we throw it what was allocated and replace it midstream? If not, then this should be fine, but maybe worth a comment?

comment:4 Changed 7 years ago by tmark

  • Resolution set to fixed
  • Status changed from reviewing to closed

In Stephen's absence (vacation) and per his request, I have merged in this ticket.
See git commit 28684bcfe5e54ad0421d75d4445a04b75358ce77 and created ChangeLog? entry 664.

Note: See TracTickets for help on using tickets.