diff options
author | James Maki <jmaki@multitech.com> | 2010-04-28 09:57:12 -0500 |
---|---|---|
committer | James Maki <jmaki@multitech.com> | 2010-04-28 09:57:12 -0500 |
commit | 223246228c5224a91147a98dc394ea60efab81ef (patch) | |
tree | 657adf4bbf1c59be35a37cadef783d0a8e1d3567 /src/sms_list.c | |
parent | a2848ad713af4d78cf0326dcf44a36bba3e93e40 (diff) | |
download | sms-utils-223246228c5224a91147a98dc394ea60efab81ef.tar.gz sms-utils-223246228c5224a91147a98dc394ea60efab81ef.tar.bz2 sms-utils-223246228c5224a91147a98dc394ea60efab81ef.zip |
optional at command init
Diffstat (limited to 'src/sms_list.c')
-rw-r--r-- | src/sms_list.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/sms_list.c b/src/sms_list.c index 0f9a9e6..4e815fc 100644 --- a/src/sms_list.c +++ b/src/sms_list.c @@ -322,12 +322,6 @@ int sms_list_get(int fd, struct msg_list_info *list_info) list_info->nr_unknown = 0; list_info->nr_msgs = 0; - tmp = atcmd_plus_cmgf_write(fd, SMS_PDU_MODE); - if (tmp < 0) { - log_error("setting pdu mode failed"); - return -1; - } - switch (list_info->cmd_type) { case CMD_TYPE_CMGL: atcmd_writeline(fd, "AT+CMGL=%d", list_info->status); @@ -487,12 +481,10 @@ int sms_list(int argc, char **argv) argc -= optind; argv += optind; - fd = tty_open(Global.core.device, Global.core.baud_rate); + fd = sms_device_open(); if (fd < 0) { - fprintf(stderr, "failed to open tty device %s\n", Global.core.device); return false; } - atcmd_init(fd, Global.core.read_timeout); ret = do_list(fd, cmd_type, argc, argv); |