gril: Remove g_ril_reply_parse_sim_io & related

This commit is contained in:
Denis Kenzior 2015-11-29 17:04:28 -06:00
parent 50a8b36aee
commit 4717227603
2 changed files with 0 additions and 75 deletions

View File

@ -308,69 +308,6 @@ out:
return reply;
}
void g_ril_reply_free_sim_io(struct reply_sim_io *reply)
{
if (reply) {
g_free(reply->hex_response);
g_free(reply);
}
}
struct reply_sim_io *g_ril_reply_parse_sim_io(GRil *gril,
const struct ril_msg *message)
{
struct parcel rilp;
char *response = NULL;
struct reply_sim_io *reply;
/*
* Minimum length of SIM_IO_Response is 12:
* sw1 (int32)
* sw2 (int32)
* simResponse (string)
*/
if (message->buf_len < 12) {
ofono_error("Invalid SIM IO reply: size too small (< 12): %d ",
(int) message->buf_len);
return NULL;
}
reply = g_new0(struct reply_sim_io, 1);
g_ril_init_parcel(message, &rilp);
reply->sw1 = parcel_r_int32(&rilp);
reply->sw2 = parcel_r_int32(&rilp);
response = parcel_r_string(&rilp);
g_ril_append_print_buf(gril,
"(sw1=0x%.2X,sw2=0x%.2X,%s)",
reply->sw1,
reply->sw2,
response);
g_ril_print_response(gril, message);
if (rilp.malformed)
goto error;
if (response != NULL) {
reply->hex_response =
decode_hex(response, strlen(response),
(long *) &reply->hex_len, -1);
g_free(response);
if (reply->hex_response == NULL)
goto error;
}
return reply;
error:
g_free(reply);
return NULL;
}
void g_ril_reply_free_sim_status(struct reply_sim_status *status)
{
if (status) {

View File

@ -44,13 +44,6 @@ struct reply_data_reg_state {
unsigned int max_cids;
};
struct reply_sim_io {
int sw1;
int sw2;
int hex_len;
unsigned char *hex_response;
};
#define MAX_UICC_APPS 16
struct reply_sim_app {
@ -79,11 +72,6 @@ struct reply_oem_hook {
void *data;
};
void g_ril_reply_free_sim_io(struct reply_sim_io *reply);
struct reply_sim_io *g_ril_reply_parse_sim_io(GRil *gril,
const struct ril_msg *message);
struct reply_reg_state *g_ril_reply_parse_voice_reg_state(GRil *gril,
const struct ril_msg *message);
struct reply_data_reg_state *g_ril_reply_parse_data_reg_state(GRil *gril,