summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-24 15:26:18 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-08-24 15:26:18 -0700
commit2cdda38dc484246d169082e9bae4805cd5b08e6b (patch)
treeee921b24886fb9c96c8c8fc963869b7ab0877f52 /one.cpp
parentccea3d04d63e39a020e140b348aa87e272747c7e (diff)
downloadinfinitytier-2cdda38dc484246d169082e9bae4805cd5b08e6b.tar.gz
infinitytier-2cdda38dc484246d169082e9bae4805cd5b08e6b.zip
It basically works... at least on current controllers.
Diffstat (limited to 'one.cpp')
-rw-r--r--one.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/one.cpp b/one.cpp
index f3442933..3cb6b775 100644
--- a/one.cpp
+++ b/one.cpp
@@ -403,7 +403,9 @@ static int cli(int argc,char **argv)
}
}
if (aa.length() == 0) aa = "-";
- out << "200 listnetworks " << n["nwid"].get<std::string>() << " " << n["name"].get<std::string>() << " " << n["mac"].get<std::string>() << " " << n["status"].get<std::string>() << " " << n["type"].get<std::string>() << " " << n["portDeviceName"].get<std::string>() << " " << aa << ZT_EOL_S;
+ std::string name = n["name"];
+ if (name.length() == 0) name = "-";
+ out << "200 listnetworks " << n["nwid"].get<std::string>() << " " << name << " " << n["mac"].get<std::string>() << " " << n["status"].get<std::string>() << " " << n["type"].get<std::string>() << " " << n["portDeviceName"].get<std::string>() << " " << aa << ZT_EOL_S;
}
}
}