diff --git a/src/network/RESTAPI.cpp b/src/network/RESTAPI.cpp index 314589c3..76363366 100644 --- a/src/network/RESTAPI.cpp +++ b/src/network/RESTAPI.cpp @@ -511,6 +511,14 @@ void RESTAPI::restAPI_GetStatus(const HTTPPayload& request, HTTPPayload& reply, response["dmrCC"].set(m_host->m_dmrCtrlChannel); response["p25CC"].set(m_host->m_p25CtrlChannel); response["nxdnCC"].set(m_host->m_nxdnCtrlChannel); + + yaml::Node p25Protocol = m_host->m_conf["protocols"]["p25"]; + bool p25VOC = p25Protocol["voiceOnControl"].as(false); + yaml::Node nxdnProtocol = m_host->m_conf["protocols"]["nxdn"]; + bool nxdnVOC = nxdnProtocol["voiceOnControl"].as(false); + + response["p25VOC"].set(p25VOC); + response["nxdnVOC"].set(nxdnVOC); } { diff --git a/src/remote/RESTClientMain.cpp b/src/remote/RESTClientMain.cpp index 85a57133..4cd29e05 100644 --- a/src/remote/RESTClientMain.cpp +++ b/src/remote/RESTClientMain.cpp @@ -132,12 +132,21 @@ static bool g_debug = false; // Global Functions // --------------------------------------------------------------------------- +/// +/// Helper to print a fatal error message and exit. +/// +/// Message. void fatal(const char* message) { ::fprintf(stderr, "%s: %s\n", g_progExe.c_str(), message); exit(EXIT_FAILURE); } +/// +/// Helper to pring usage the command line arguments. (And optionally an error.) +/// +/// Error message. +/// Error message arguments. void usage(const char* message, const char* arg) { ::fprintf(stdout, __PROG_NAME__ " %s (built %s)\r\n", __VER__, __BUILD__); @@ -221,6 +230,12 @@ void usage(const char* message, const char* arg) exit(EXIT_FAILURE); } +/// +/// Helper to validate the command line arguments. +/// +/// Argument count. +/// Array of argument strings. +/// Count of remaining unprocessed arguments. int checkArgs(int argc, char* argv[]) { int i, p = 0;