From: Marcin Siodelski Date: Tue, 2 Jul 2013 22:39:15 +0000 (+0200) Subject: [2977] Implemented DNS Update response parsing. X-Git-Tag: bind10-1.2.0beta1-release~347^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf1828a29fe1afd7382ebf41417b98c027ac5bfd;p=thirdparty%2Fkea.git [2977] Implemented DNS Update response parsing. --- diff --git a/src/bin/d2/dns_client.cc b/src/bin/d2/dns_client.cc index ba5e9a32e9..38d80c34cd 100644 --- a/src/bin/d2/dns_client.cc +++ b/src/bin/d2/dns_client.cc @@ -43,8 +43,13 @@ DNSClient::DNSClient(D2UpdateMessagePtr& response_placeholder, void DNSClient::operator()(IOFetch::Result result) { - // @todo Do something useful here. One of the useful things will be to parse - // incoming message if the result is SUCCESS. + // @todo More sanity checks here. Also, there is a question, what happens if + // the exception is thrown here. + + if (result == IOFetch::SUCCESS) { + InputBuffer response_buf(in_buf_->getData(), in_buf_->getLength()); + response_->fromWire(response_buf); + } // Once we are done with internal business, let's call a callback supplied // by a caller.