gril: Remove g_ril_reply_oem_hook_raw

This commit is contained in:
Denis Kenzior 2015-12-03 10:50:48 -06:00
parent 4db0659cbd
commit 414ec4a2b9
2 changed files with 0 additions and 57 deletions

View File

@ -217,50 +217,3 @@ no_data:
return NULL;
}
void g_ril_reply_free_oem_hook(struct reply_oem_hook *oem_hook)
{
if (oem_hook) {
g_free(oem_hook->data);
g_free(oem_hook);
}
}
struct reply_oem_hook *g_ril_reply_oem_hook_raw(GRil *gril,
const struct ril_msg *message)
{
struct reply_oem_hook *reply = NULL;
struct parcel rilp;
reply = g_try_malloc0(sizeof(*reply));
if (reply == NULL) {
ofono_error("%s: out of memory", __func__);
goto end;
}
g_ril_init_parcel(message, &rilp);
reply->data = parcel_r_raw(&rilp, &(reply->length));
if (rilp.malformed) {
ofono_error("%s: malformed parcel", __func__);
g_ril_reply_free_oem_hook(reply);
reply = NULL;
goto end;
}
g_ril_append_print_buf(gril, "{%d", reply->length);
if (reply->data != NULL) {
char *hex_dump;
hex_dump = encode_hex(reply->data, reply->length, '\0');
g_ril_append_print_buf(gril, "%s,%s", print_buf, hex_dump);
g_free(hex_dump);
}
g_ril_append_print_buf(gril, "%s}", print_buf);
g_ril_print_response(gril, message);
end:
return reply;
}

View File

@ -32,21 +32,11 @@
extern "C" {
#endif
struct reply_oem_hook {
int length;
void *data;
};
GSList *g_ril_reply_parse_get_calls(GRil *gril, const struct ril_msg *message);
int *g_ril_reply_parse_retries(GRil *gril, const struct ril_msg *message,
enum ofono_sim_password_type passwd_type);
void g_ril_reply_free_oem_hook(struct reply_oem_hook *oem_hook);
struct reply_oem_hook *g_ril_reply_oem_hook_raw(GRil *gril,
const struct ril_msg *message);
#ifdef __cplusplus
}
#endif