commit d0328c34eea2e3ae15b8e294ec3d6bb8a279ee37 Author: Tomás Touceda chiiph@torproject.org Date: Sat Jun 9 13:00:33 2012 -0300
Return regular descriptor in case the relay did not publish the microdesc --- src/torcontrol/TorControl.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/torcontrol/TorControl.cpp b/src/torcontrol/TorControl.cpp index 84de11f..c9893ce 100644 --- a/src/torcontrol/TorControl.cpp +++ b/src/torcontrol/TorControl.cpp @@ -1066,8 +1066,11 @@ TorControl::useMicrodescriptors(QString *errmsg) QStringList TorControl::getRouterDescriptorText(const QString &id, QString *errmsg) { - if(useMicrodescriptors(errmsg)) - return getInfo("md/id/" + id, errmsg).toStringList(); + if(useMicrodescriptors(errmsg)) { + QStringList res = getInfo("md/id/" + id, errmsg).toStringList(); + if(!res.isEmpty()) + return res; + }
return getInfo("desc/id/" + id, errmsg).toStringList(); }
tor-commits@lists.torproject.org