summaryrefslogtreecommitdiffstats
path: root/src/ManagementServer.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-07 11:43:04 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-07 11:43:04 +0100
commitf7addcf7d00621f0973f2c6a997893ff3d7f6c3e (patch)
tree86e5f3188c7c2f3df6c3edc4614c60483b217413 /src/ManagementServer.cpp
parent48b481e76f0c40bc93a62a29f40198131d9f551e (diff)
downloaddabmux-f7addcf7d00621f0973f2c6a997893ff3d7f6c3e.tar.gz
dabmux-f7addcf7d00621f0973f2c6a997893ff3d7f6c3e.tar.bz2
dabmux-f7addcf7d00621f0973f2c6a997893ff3d7f6c3e.zip
Add version string to management server
Diffstat (limited to 'src/ManagementServer.cpp')
-rw-r--r--src/ManagementServer.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ManagementServer.cpp b/src/ManagementServer.cpp
index cd70b77..092b257 100644
--- a/src/ManagementServer.cpp
+++ b/src/ManagementServer.cpp
@@ -298,14 +298,24 @@ void ManagementServer::handle_message(zmq::message_t& zmq_message)
if (data == "info") {
answer <<
- "{ \"service\": \"" <<
+ "{ " <<
+ "\"service\": \"" <<
PACKAGE_NAME << " " <<
#if defined(GITVERSION)
GITVERSION <<
#else
PACKAGE_VERSION <<
#endif
- " MGMT Server\" }\n";
+ " MGMT Server\", "
+ <<
+ "\"version\": \"" <<
+#if defined(GITVERSION)
+ GITVERSION <<
+#else
+ PACKAGE_VERSION <<
+#endif
+ "\" "
+ << "}\n";
}
else if (data == "config") {
answer << getStatConfigJSON();