mirror of git://git.sysmocom.de/ofono
Some fixes to sms_text_prepare
This commit is contained in:
parent
61a4b0fee9
commit
b42c2bc79f
|
@ -2282,6 +2282,9 @@ GSList *sms_text_prepare(const char *utf8, guint16 ref,
|
||||||
if (!offset)
|
if (!offset)
|
||||||
offset = 1;
|
offset = 1;
|
||||||
|
|
||||||
|
if (ref_offset)
|
||||||
|
*ref_offset = offset + 2;
|
||||||
|
|
||||||
if (use_16bit) {
|
if (use_16bit) {
|
||||||
template.submit.ud[0] += 6;
|
template.submit.ud[0] += 6;
|
||||||
template.submit.ud[offset] = SMS_IEI_CONCATENATED_16BIT;
|
template.submit.ud[offset] = SMS_IEI_CONCATENATED_16BIT;
|
||||||
|
@ -2299,16 +2302,15 @@ GSList *sms_text_prepare(const char *utf8, guint16 ref,
|
||||||
offset += 5;
|
offset += 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref_offset)
|
seq = 0;
|
||||||
*ref_offset = offset + 2;
|
|
||||||
|
|
||||||
seq = 1;
|
|
||||||
left = written;
|
left = written;
|
||||||
written = 0;
|
written = 0;
|
||||||
|
|
||||||
while (left > 0) {
|
while (left > 0) {
|
||||||
long chunk;
|
long chunk;
|
||||||
|
|
||||||
|
seq += 1;
|
||||||
|
|
||||||
if (gsm_encoded) {
|
if (gsm_encoded) {
|
||||||
chunk = sms_text_capacity_gsm(160, offset);
|
chunk = sms_text_capacity_gsm(160, offset);
|
||||||
|
|
||||||
|
@ -2343,8 +2345,6 @@ GSList *sms_text_prepare(const char *utf8, guint16 ref,
|
||||||
|
|
||||||
if (seq == 255)
|
if (seq == 255)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
seq += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gsm_encoded)
|
if (gsm_encoded)
|
||||||
|
|
Loading…
Reference in New Issue