summaryrefslogtreecommitdiff
path: root/src/sms_delete.c
diff options
context:
space:
mode:
authorJames Maki <jmaki@multitech.com>2010-04-28 09:57:12 -0500
committerJames Maki <jmaki@multitech.com>2010-04-28 09:57:12 -0500
commit223246228c5224a91147a98dc394ea60efab81ef (patch)
tree657adf4bbf1c59be35a37cadef783d0a8e1d3567 /src/sms_delete.c
parenta2848ad713af4d78cf0326dcf44a36bba3e93e40 (diff)
downloadsms-utils-223246228c5224a91147a98dc394ea60efab81ef.tar.gz
sms-utils-223246228c5224a91147a98dc394ea60efab81ef.tar.bz2
sms-utils-223246228c5224a91147a98dc394ea60efab81ef.zip
optional at command init
Diffstat (limited to 'src/sms_delete.c')
-rw-r--r--src/sms_delete.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/sms_delete.c b/src/sms_delete.c
index bcef866..aee01dd 100644
--- a/src/sms_delete.c
+++ b/src/sms_delete.c
@@ -90,12 +90,6 @@ static int do_delete(int fd, int argc, char **argv)
printf("preparing for delete...\n");
}
- tmp = atcmd_plus_cmgf_write(fd, SMS_PDU_MODE);
- if (tmp < 0) {
- log_error("atcmd_plus_cmgf_write failed");
- return false;
- }
-
tmp = sms_list_get(fd, &list_info);
if (tmp < 0) {
log_error("failed to get msg list");
@@ -166,12 +160,10 @@ int sms_delete(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_delete(fd, argc, argv);