summaryrefslogtreecommitdiffstats
path: root/src/RemoteControl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RemoteControl.cpp')
-rw-r--r--src/RemoteControl.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/RemoteControl.cpp b/src/RemoteControl.cpp
index 65da3b7..21a6c81 100644
--- a/src/RemoteControl.cpp
+++ b/src/RemoteControl.cpp
@@ -58,8 +58,10 @@ void RemoteControllerTelnet::restart_thread(long)
void RemoteControllerTelnet::process(long)
{
- m_welcome = "ODR-DabMod Remote Control CLI\nWrite 'help' for help.\n**********\n";
- m_prompt = "> ";
+ std::string m_welcome = "ODR-DabMod Remote Control CLI\n"
+ "Write 'help' for help.\n"
+ "**********\n";
+ std::string m_prompt = "> ";
std::string in_message;
size_t length;
@@ -308,7 +310,7 @@ void RemoteControllerZmq::process()
{
// create zmq reply socket for receiving ctrl parameters
zmq::socket_t repSocket(m_zmqContext, ZMQ_REP);
- std::cout << "Starting zmq remote control thread" << std::endl;
+ std::cerr << "Starting zmq remote control thread" << std::endl;
try
{
// connect the socket
@@ -342,10 +344,9 @@ void RemoteControllerZmq::process()
try
{
std::string value = get_param_(module, parameter);
- zmq::message_t *pMsg = new zmq::message_t(value.size());
- memcpy ((void*) pMsg->data(), value.data(), value.size());
- repSocket.send(*pMsg, 0);
- delete pMsg;
+ zmq::message_t msg(value.size());
+ memcpy ((void*) msg.data(), value.data(), value.size());
+ repSocket.send(&msg, 0);
}
catch (ParameterError &err)
{