rib+tools: adapt to Controller::CommandFailCallback with ControlResponse
refs #3739
Change-Id: Icf5b3ed0bd997730a024bad2ccd258c8168b4ccb
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index b21fe6d..996c03c 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -70,10 +70,11 @@
void
onRegisterCommandFailure(uint64_t faceId, const Name& prefix,
- uint32_t code, const std::string& reason)
+ const nfd::ControlResponse& response)
{
std::cerr << "FAILED: register " << prefix << " on face " << faceId
- << " (code: " << code << ", reason: " << reason << ")" << std::endl;
+ << " (code: " << response.getCode() << ", reason: " << response.getText() << ")"
+ << std::endl;
}
/**
@@ -137,7 +138,7 @@
.setCost(m_cost)
.setExpirationPeriod(time::milliseconds::max()),
bind(&AutoregServer::onRegisterCommandSuccess, this, faceId, *prefix),
- bind(&AutoregServer::onRegisterCommandFailure, this, faceId, *prefix, _1, _2));
+ bind(&AutoregServer::onRegisterCommandFailure, this, faceId, *prefix, _1));
}
}