Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
MessageSend - log error message
Browse files Browse the repository at this point in the history
  • Loading branch information
RoEdAl committed Jun 17, 2024
1 parent c0ffbda commit 1a1e1c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/msg_tech.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ static int msg_send(const struct ast_msg* msg, const char* to, attribute_unused
parse_msg_vars(msg, &validity, &report);

ast_verb(1, "MSG[%s]: <%s>: [%s]\n", dest, msg_to, S_OR(msg_body, ""));
return send_sms(dest, "", msg_to, S_OR(msg_body, ""), validity, report);
if (send_sms(dest, "", msg_to, S_OR(msg_body, ""), validity, report)) {
ast_log(LOG_ERROR, "[%s] %s\n", dest, error2str(chan_quectel_err));
return 1;
}
return 0;
}

static const struct ast_msg_tech msg_tech = {.name = "mobile", .msg_send = &msg_send};
Expand Down

0 comments on commit 1a1e1c1

Please sign in to comment.