Commit 43a7ef68 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[3880] Extra sanity check added.

parent fd66d064
......@@ -264,6 +264,9 @@ TEST_F(CtrlDhcpv4SrvTest, commandsRegistration) {
/// work correctly after fork or develop a small tool that will send data
/// from stdin to specified UNIX socket, print out the responses on stdout
/// and develop shell tests for this.
///
/// Note that the test passes when run on its own, but not when run along with
/// other unit-tests.
TEST_F(CtrlDhcpv4SrvTest, DISABLED_commandSocketBasic) {
string socket_path = string(TEST_DATA_DIR) + "/kea4.sock";
......
......@@ -292,6 +292,10 @@ IfaceMgr::isDirectResponseSupported() const {
void
IfaceMgr::addExternalSocket(int socketfd, SocketCallback callback) {
if (socketfd < 0) {
isc_throw(BadValue, "Attempted to install callback for invalid socket "
<< socketfd);
}
BOOST_FOREACH(SocketCallbackInfo s, callbacks_) {
// There's such a socket description there already.
// Update the callback and we're done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment