From 385904d9f3b156079b83077a1c655011e6ec240c Mon Sep 17 00:00:00 2001 From: James Maki Date: Mon, 23 Aug 2010 10:12:29 -0500 Subject: H4/Sierra Wireless does not support AT+CPBR If we cannot get the phonebook before sending just warn and continue. --- src/atcmd.c | 3 ++- src/sms_send.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/atcmd.c b/src/atcmd.c index 5c59a4d..76372d2 100644 --- a/src/atcmd.c +++ b/src/atcmd.c @@ -368,7 +368,8 @@ int atcmd_expect_line(int fd, char *buf, size_t len, const char *expect) } else if (!strcmp(buf, "ERROR")) { log_error("expected %s but got %s", expect, buf); return -1; - } else if (!strncmp(buf, "+CMS ERROR: ", sizeof("+CMS ERROR: ") - 1)) { + } else if (!strncmp(buf, "+CMS ERROR: ", sizeof("+CMS ERROR: ") - 1) || + !strncmp(buf, "+CME ERROR: ", sizeof("+CME ERROR: ") - 1)) { log_error("expected %s but got %s", expect, buf); return -1; } diff --git a/src/sms_send.c b/src/sms_send.c index abc642f..8ed7ebb 100644 --- a/src/sms_send.c +++ b/src/sms_send.c @@ -249,8 +249,9 @@ static int do_send(int fd, struct send_options *options, int argc, char **argv) } tmp = phonebook_list_get(fd, &list_info); if (tmp < 0) { - log_error("failed to get phonebook list"); - return false; + log_warning("failed to get phonebook list"); + memset(&list_info, 0, sizeof(list_info)); + INIT_LIST_HEAD(&list_info.entry_list); } for (i = 0; i < argc; i++) { -- cgit v1.2.3