at: log expected result before setting it to NULL

Otherwise the log contains NULL instead of the expected value, making it hard to debug
This commit is contained in:
Dylan Van Assche
2021-05-12 18:25:40 +02:00
parent 9646e0e8df
commit dac50e34eb

View File

@@ -151,9 +151,9 @@ void at_process_result(struct EG25Manager *manager,
if (at_cmd->expected && !strstr(response, at_cmd->expected)) {
g_free(at_cmd->value);
at_cmd->value = at_cmd->expected;
at_cmd->expected = NULL;
g_message("Got a different result than expected, changing value...");
g_message("\t%s\n\t%s", at_cmd->expected, response);
g_message("Expected: [%s]\nResponse: [%s]", at_cmd->expected, response);
at_cmd->expected = NULL;
at_send_command(manager);
} else {
at_next_command(manager);