summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Maki <jmaki@multitech.com>2010-08-23 10:12:29 -0500
committerJames Maki <jmaki@multitech.com>2010-08-23 10:12:29 -0500
commit385904d9f3b156079b83077a1c655011e6ec240c (patch)
treed9fa5cd739666cb909f8bcc86186f06f85a7980e /src
parent93f445716bfa3543fc369b66ab8c3e61df47e1d8 (diff)
downloadsms-utils-385904d9f3b156079b83077a1c655011e6ec240c.tar.gz
sms-utils-385904d9f3b156079b83077a1c655011e6ec240c.tar.bz2
sms-utils-385904d9f3b156079b83077a1c655011e6ec240c.zip
H4/Sierra Wireless does not support AT+CPBR
If we cannot get the phonebook before sending just warn and continue.
Diffstat (limited to 'src')
-rw-r--r--src/atcmd.c3
-rw-r--r--src/sms_send.c5
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++) {