summaryrefslogtreecommitdiff
path: root/src/sms_send.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_send.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_send.c')
-rw-r--r--src/sms_send.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/sms_send.c b/src/sms_send.c
index 3cae12e..7099c06 100644
--- a/src/sms_send.c
+++ b/src/sms_send.c
@@ -224,12 +224,6 @@ static int do_send(int fd, struct send_options *options, int argc, char **argv)
printf("preparing for send...\n");
}
- tmp = atcmd_plus_cmgf_write(fd, SMS_PDU_MODE);
- if (tmp < 0) {
- log_error("setting pdu mode failed");
- return false;
- }
-
if (options->cmgw_first) {
tmp = pdu_encode(buf, sizeof(buf), &pdu);
if (tmp < 0) {
@@ -377,12 +371,10 @@ int sms_send(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_send(fd, &options, argc, argv);