mirror of git://git.sysmocom.de/ofono
sms: sms_assembly_encode_address export and rename
The new name better reflects the function's purpose. We need to export it, as for generating unique message naming (for persistence and D-Bus object naming), we'll be using the address.
This commit is contained in:
parent
ca46f51c2d
commit
9517bf2991
|
@ -2293,8 +2293,7 @@ static gboolean sms_assembly_extract_address(const char *straddr,
|
||||||
return sms_decode_address_field(pdu, len, &offset, FALSE, out);
|
return sms_decode_address_field(pdu, len, &offset, FALSE, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean sms_assembly_encode_address(const struct sms_address *in,
|
gboolean sms_address_to_hex_string(const struct sms_address *in, char *straddr)
|
||||||
char *straddr)
|
|
||||||
{
|
{
|
||||||
unsigned char pdu[12];
|
unsigned char pdu[12];
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
@ -2396,7 +2395,7 @@ static gboolean sms_assembly_store(struct sms_assembly *assembly,
|
||||||
if (!assembly->imsi)
|
if (!assembly->imsi)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (sms_assembly_encode_address(&node->addr, straddr) == FALSE)
|
if (sms_address_to_hex_string(&node->addr, straddr) == FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
len = sms_serialize(buf, sms);
|
len = sms_serialize(buf, sms);
|
||||||
|
@ -2419,7 +2418,7 @@ static void sms_assembly_backup_free(struct sms_assembly *assembly,
|
||||||
if (!assembly->imsi)
|
if (!assembly->imsi)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (sms_assembly_encode_address(&node->addr, straddr) == FALSE)
|
if (sms_address_to_hex_string(&node->addr, straddr) == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (seq = 0; seq < node->max_fragments; seq++) {
|
for (seq = 0; seq < node->max_fragments; seq++) {
|
||||||
|
|
|
@ -500,6 +500,8 @@ GSList *sms_assembly_add_fragment(struct sms_assembly *assembly,
|
||||||
const struct sms_address *addr,
|
const struct sms_address *addr,
|
||||||
guint16 ref, guint8 max, guint8 seq);
|
guint16 ref, guint8 max, guint8 seq);
|
||||||
void sms_assembly_expire(struct sms_assembly *assembly, time_t before);
|
void sms_assembly_expire(struct sms_assembly *assembly, time_t before);
|
||||||
|
gboolean sms_address_to_hex_string(const struct sms_address *in,
|
||||||
|
char *straddr);
|
||||||
|
|
||||||
struct status_report_assembly *status_report_assembly_new(const char *imsi);
|
struct status_report_assembly *status_report_assembly_new(const char *imsi);
|
||||||
void status_report_assembly_free(struct status_report_assembly *assembly);
|
void status_report_assembly_free(struct status_report_assembly *assembly);
|
||||||
|
|
Loading…
Reference in New Issue