FreeCalypso > hg > freecalypso-tools
changeset 374:d1fa771abeb8
uptools: make_sms_submit_pdu() in libcoding now takes PID and DCS arguments
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 08 Mar 2018 20:33:03 +0000 |
parents | 1fa4dcbb1c87 |
children | 759cb6dc501b |
files | uptools/atcmd/smsend_pduout.c uptools/libcoding/sms_submit.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/uptools/atcmd/smsend_pduout.c Thu Mar 08 19:47:40 2018 +0000 +++ b/uptools/atcmd/smsend_pduout.c Thu Mar 08 20:33:03 2018 +0000 @@ -26,7 +26,8 @@ char send_cmd[32]; pdu[0] = 0; - pdulen = make_sms_submit_pdu(da, textsrc, textlen, udh, udhl, pdu + 1); + pdulen = make_sms_submit_pdu(da, 0, 0, textsrc, textlen, udh, udhl, + pdu + 1); make_hex_string(pdu, pdulen + 1, pduhex); if (sms_write_mode) { cmdname = "CMGW";
--- a/uptools/libcoding/sms_submit.c Thu Mar 08 19:47:40 2018 +0000 +++ b/uptools/libcoding/sms_submit.c Thu Mar 08 20:33:03 2018 +0000 @@ -6,7 +6,7 @@ #include <sys/types.h> #include <strings.h> -make_sms_submit_pdu(da, textsrc, textlen, udh, udhl, outbuf) +make_sms_submit_pdu(da, pid, dcs, textsrc, textlen, udh, udhl, outbuf) u_char *da, *textsrc, *udh, *outbuf; unsigned textlen, udhl; { @@ -24,8 +24,8 @@ addr_field_len = ((da[0] + 1) >> 1) + 2; bcopy(da, outp, addr_field_len); outp += addr_field_len; - *outp++ = 0; - *outp++ = 0; + *outp++ = pid; + *outp++ = dcs; if (udh) { udh_octets = udhl + 1; udh_chars = (udh_octets * 8 + 6) / 7;