From 7d63d18905b7f7ea2f0febc3b70c906ed42e9850 Mon Sep 17 00:00:00 2001 From: Brandon Bayer Date: Wed, 10 Feb 2016 14:01:12 -0600 Subject: fix: phonebook access error message on CE910-DUAL --- configure.in | 2 +- src/phonebook.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 993eb32..e9cd8e2 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_INIT([src/sms_main.c]) -AM_INIT_AUTOMAKE([sms-utils], [0.0.14]) +AM_INIT_AUTOMAKE([sms-utils], [0.0.15]) AM_CONFIG_HEADER([config.h]) AC_PROG_CC diff --git a/src/phonebook.c b/src/phonebook.c index 1d3d437..fc29d61 100644 --- a/src/phonebook.c +++ b/src/phonebook.c @@ -290,7 +290,8 @@ int phonebook_list_get(int fd, struct phonebook_list_info *list_info) atcmd_writeline(fd, "AT+CPBR=%d,%d", list_info->store.index_min, list_info->store.index_max); tmp = atcmd_response_foreach_line(fd, list_info_callback, list_info); - if (tmp < 0) { + //CE910 reports an error if empty. Don't report error in this case + if ((tmp < 0) && strcmp(Global.core.model, "CE910-DUAL")) { log_error("listing failed"); phonebook_list_free(list_info); -- cgit v1.2.3