mirror of git://git.sysmocom.de/ofono
gril: Remove g_ril_unsol_parse_new_sms & related
This commit is contained in:
parent
26917d689e
commit
809507d071
|
@ -341,59 +341,6 @@ error:
|
||||||
return nitz;
|
return nitz;
|
||||||
}
|
}
|
||||||
|
|
||||||
void g_ril_unsol_free_sms_data(struct unsol_sms_data *unsol)
|
|
||||||
{
|
|
||||||
if (unsol != NULL) {
|
|
||||||
g_free(unsol->data);
|
|
||||||
g_free(unsol);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct unsol_sms_data *g_ril_unsol_parse_new_sms(GRil *gril,
|
|
||||||
const struct ril_msg *message)
|
|
||||||
{
|
|
||||||
struct parcel rilp;
|
|
||||||
char *ril_pdu;
|
|
||||||
size_t ril_pdu_len;
|
|
||||||
struct unsol_sms_data *sms_data;
|
|
||||||
|
|
||||||
sms_data = g_new0(struct unsol_sms_data, 1);
|
|
||||||
if (sms_data == NULL) {
|
|
||||||
ofono_error("%s out of memory", __func__);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_ril_init_parcel(message, &rilp);
|
|
||||||
|
|
||||||
ril_pdu = parcel_r_string(&rilp);
|
|
||||||
if (ril_pdu == NULL) {
|
|
||||||
ofono_error("%s Unable to parse notification", __func__);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
ril_pdu_len = strlen(ril_pdu);
|
|
||||||
|
|
||||||
sms_data->data = decode_hex(ril_pdu, ril_pdu_len,
|
|
||||||
&sms_data->length, -1);
|
|
||||||
if (sms_data->data == NULL) {
|
|
||||||
ofono_error("%s Unable to decode notification", __func__);
|
|
||||||
goto error_dec;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_ril_append_print_buf(gril, "{%s}", ril_pdu);
|
|
||||||
g_ril_print_unsol(gril, message);
|
|
||||||
|
|
||||||
g_free(ril_pdu);
|
|
||||||
|
|
||||||
return sms_data;
|
|
||||||
|
|
||||||
error_dec:
|
|
||||||
g_free(ril_pdu);
|
|
||||||
error:
|
|
||||||
g_ril_unsol_free_sms_data(sms_data);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int g_ril_unsol_parse_radio_state_changed(GRil *gril,
|
int g_ril_unsol_parse_radio_state_changed(GRil *gril,
|
||||||
const struct ril_msg *message)
|
const struct ril_msg *message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,11 +47,6 @@ struct ril_data_call_list {
|
||||||
GSList *calls;
|
GSList *calls;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct unsol_sms_data {
|
|
||||||
long length;
|
|
||||||
unsigned char *data;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct unsol_supp_svc_notif {
|
struct unsol_supp_svc_notif {
|
||||||
int notif_type;
|
int notif_type;
|
||||||
int code;
|
int code;
|
||||||
|
@ -67,11 +62,6 @@ struct ril_data_call_list *g_ril_unsol_parse_data_call_list(GRil *gril,
|
||||||
|
|
||||||
char *g_ril_unsol_parse_nitz(GRil *gril, const struct ril_msg *message);
|
char *g_ril_unsol_parse_nitz(GRil *gril, const struct ril_msg *message);
|
||||||
|
|
||||||
void g_ril_unsol_free_sms_data(struct unsol_sms_data *unsol);
|
|
||||||
|
|
||||||
struct unsol_sms_data *g_ril_unsol_parse_new_sms(GRil *gril,
|
|
||||||
const struct ril_msg *message);
|
|
||||||
|
|
||||||
int g_ril_unsol_parse_radio_state_changed(GRil *gril,
|
int g_ril_unsol_parse_radio_state_changed(GRil *gril,
|
||||||
const struct ril_msg *message);
|
const struct ril_msg *message);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue