mangoapp: explicitly handle 0 over the protocol

Receiving 0 indicates no-op/keep as-is. Add a trivial self-describing
two-liner.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
pull/707/head
Emil Velikov 2 years ago committed by jackun
parent f2b991cccd
commit fc7a426d67
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -75,6 +75,9 @@ static void ctrl_thread(){
memset(raw_msg, 0, sizeof(raw_msg));
msgrcv(msgid, (void *) raw_msg, sizeof(raw_msg), 2, 0);
switch (mangoapp_ctrl_v1->log_session) {
case 0:
// Keep as-is
break;
case 1:
if (!logger->is_active())
logger->start_logging();
@ -90,6 +93,9 @@ static void ctrl_thread(){
{
std::lock_guard<std::mutex> lk(mangoapp_m);
switch (mangoapp_ctrl_v1->no_display){
case 0:
// Keep as-is
break;
case 1:
params->no_display = 1;
break;

Loading…
Cancel
Save