summaryrefslogtreecommitdiff
path: root/src/sms_delete.c
diff options
context:
space:
mode:
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);