Skip to content

Commit 0150af5

Browse files
committed
modules: cloud: Simplify cloud message handling
Do all cloud message handling within the same cloud channel check. Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
1 parent 9faaf68 commit 0150af5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

app/src/modules/cloud/cloud_module.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,7 @@ static void state_connected_ready_run(void *o)
682682
SEND_FATAL_ERROR();
683683
return;
684684
}
685-
}
686-
}
687-
688-
if (state_object->chan == &CLOUD_CHAN) {
689-
const enum cloud_msg_type msg_type = MSG_TO_CLOUD_MSG(state_object->msg_buf).type;
690-
691-
if (msg_type == CLOUD_POLL_SHADOW) {
685+
} else if (msg.type == CLOUD_POLL_SHADOW) {
692686
LOG_DBG("Poll shadow trigger received");
693687

694688
shadow_get(true);

0 commit comments

Comments
 (0)