BIND 10 #2187: Remove "cout" statements from libdhcp++
BIND 10 Development
do-not-reply at isc.org
Wed Sep 26 15:23:38 UTC 2012
#2187: Remove "cout" statements from libdhcp++
-------------------------------------+-------------------------------------
Reporter: | Owner: marcin
stephen | Status: closed
Type: | Milestone: Sprint-
enhancement | DHCP-20121004
Priority: | Resolution: fixed
medium | Sensitive: 0
Component: dhcp | Sub-Project: DHCP
Keywords: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by marcin):
* status: reviewing => closed
* resolution: => fixed
Comment:
Replying to [comment:3 stephen]:
> > Note: I don't throw exceptions when things like pack() fail because we
spoke with Stephen that we would change those functions to void and throw
exceptions with another ticket. I simply added @todo statements there.
> The ticket is #2264
> ----
> Reviewed commit 02dd6ed0dd458e7627e06bcab6a5168354e929d6
>
> I've made (and pushed) minor changes to some text in the following
files:
> * src/bin/dhcp4/dhcp4_messages.mes
> * src/bin/dhcp6/dhcp6_messages.mes
> * src/lib/dhcp/iface_mgr.cc
>
Thanks for your changes.
> Other comments:
>
> '''src/lib/dhcp/tests/iface_mgr_unittest.cc'''[[BR]]
> Test socketsFromRemoteAddress: suggest moving the call to
ifaceMgr->closeSockets() to the end of the function (after the #endif for
OS_LINUX). That way, if running the test on Linux, socket3 will be closed
on exit as well.
>
I can't move closeSockets() because it guarantees that when part of the
test enclosed in #if OS_LINUX starts all sockets are closed. This is
required because one of the ports is reused in this part. Attempt to close
another socket using the same port would result in failure.
In the same time there is no need to invoke closeSockets() at the end of
the function because it is invoked anyway by the IfaceMgr's virtual
destructor.
I added some comments on this in the code.
> '''tests/tools/perfdhcp/test_control.cc'''[[BR]]
> receivePackets(): messages written to cout should probably be written to
cerr (as they are error messages).
Ok, replaced cout with cerr.
>
> Unless you alter something else, I don't need to see the corrections.
Please merge after you've made (and tested) then.
Code is merged. Thanks for review.
--
Ticket URL: <http://bind10.isc.org/ticket/2187#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list