summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
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;
}
}
}