Ejemplo n.º 1
0
void handle_control_message(const char *msg, const char *arg)
{
    if (!strcmp(msg,"start")) {
        msg_start(arg);
    } else if (!strcmp(msg,"stop")) {
        msg_stop(arg);
    } else if (!strcmp(msg,"restart")) {
        msg_restart(arg);
    } else {
        ERROR("unknown control msg '%s'\n", msg);
    }
}
Ejemplo n.º 2
0
void handle_control_message(const std::string& msg, const std::string& arg)
{
    if (msg == "start") {
        msg_start(arg);
    } else if (msg == "stop") {
        msg_stop(arg);
    } else if (msg == "restart") {
        msg_restart(arg);
    } else {
        ERROR("unknown control msg '%s'\n", msg.c_str());
    }
}