From: Chris Hofstaedtler Date: Thu, 26 Oct 2017 21:13:04 +0000 (+0200) Subject: dnsdist: make getBind() retval printable X-Git-Tag: rec-4.1.0-rc2~13^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=630e3e0ac532e843293370eff494da2ccfa44a0b;p=pdns dnsdist: make getBind() retval printable --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 3fec2cb1b..88ec89867 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -208,6 +208,7 @@ void doConsole() boost::variant< string, shared_ptr, + ClientState*, std::unordered_map > > @@ -216,6 +217,9 @@ void doConsole() if (const auto dsValue = boost::get>(&*ret)) { cout<<(*dsValue)->getName()<(&*ret)) { + cout<<(*csValue)->local.toStringWithPort()<(&*ret)) { cout<<*strValue<, + ClientState*, std::unordered_map > > >(withReturn ? ("return "+line) : line); if(ret) { - if (const auto dsValue = boost::get>(&*ret)) { - response=(*dsValue)->getName()+"\n"; - } - else if (const auto strValue = boost::get(&*ret)) { - response=*strValue+"\n"; - } + if (const auto dsValue = boost::get>(&*ret)) { + response=(*dsValue)->getName()+"\n"; + } + else if (const auto csValue = boost::get(&*ret)) { + response=(*csValue)->local.toStringWithPort()+"\n"; + } + else if (const auto strValue = boost::get(&*ret)) { + response=*strValue+"\n"; + } else if(const auto um = boost::get >(&*ret)) { using namespace json11; Json::object o;