From acb7a31d363ea06b529362d860d6877c40732178 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 4 Nov 2015 23:26:40 -0600 Subject: [PATCH] gril: Remove g_ril_reply_parse_query_call_fwd --- gril/grilreply.c | 84 ------------------------------------------------ gril/grilreply.h | 5 --- 2 files changed, 89 deletions(-) diff --git a/gril/grilreply.c b/gril/grilreply.c index dd441a79..b76b53f6 100644 --- a/gril/grilreply.c +++ b/gril/grilreply.c @@ -966,90 +966,6 @@ char *g_ril_reply_parse_get_imei(GRil *gril, return imei; } -struct ofono_call_forwarding_condition - *g_ril_reply_parse_query_call_fwd(GRil *gril, - const struct ril_msg *message, - unsigned int *list_size) -{ - struct ofono_call_forwarding_condition *list; - struct parcel rilp; - unsigned int i; - - if (list_size == NULL) { - ofono_error("%s: list_size is NULL!", __func__); - goto error; - } - - g_ril_init_parcel(message, &rilp); - - if (rilp.size < sizeof(int32_t)) { - ofono_error("%s: malformed parcel, can't read num params", - __func__); - goto error; - } - - *list_size = parcel_r_int32(&rilp); - if (*list_size == 0) { - /* not really an error; handled in caller */ - goto error; - } - - list = g_try_new0(struct ofono_call_forwarding_condition, *list_size); - if (list == NULL) { - ofono_error("%s: Out of memory", __func__); - goto error; - } - - g_ril_append_print_buf(gril, "{"); - - for (i = 0; i < *list_size; i++) { - char *str; - - list[i].status = parcel_r_int32(&rilp); - - parcel_r_int32(&rilp); /* skip reason */ - - list[i].cls = parcel_r_int32(&rilp); - list[i].phone_number.type = parcel_r_int32(&rilp); - - str = parcel_r_string(&rilp); - - if (str != NULL) { - strncpy(list[i].phone_number.number, str, - OFONO_MAX_PHONE_NUMBER_LENGTH); - g_free(str); - - list[i].phone_number.number[ - OFONO_MAX_PHONE_NUMBER_LENGTH] = '\0'; - } - - list[i].time = parcel_r_int32(&rilp); - - if (rilp.malformed) { - ofono_error("%s: malformed parcel", __func__); - g_free(list); - goto error; - } - - g_ril_append_print_buf(gril, "%s [%d,%d,%d,%s,%d]", - print_buf, - list[i].status, - list[i].cls, - list[i].phone_number.type, - list[i].phone_number.number, - list[i].time); - - } - - g_ril_append_print_buf(gril, "%s}", print_buf); - g_ril_print_response(gril, message); - - return list; - -error: - return NULL; -} - int g_ril_reply_parse_get_preferred_network_type(GRil *gril, const struct ril_msg *message) { diff --git a/gril/grilreply.h b/gril/grilreply.h index 40b542cb..48cc95e8 100644 --- a/gril/grilreply.h +++ b/gril/grilreply.h @@ -135,11 +135,6 @@ char *g_ril_reply_parse_baseband_version(GRil *gril, char *g_ril_reply_parse_get_imei(GRil *gril, const struct ril_msg *message); -struct ofono_call_forwarding_condition - *g_ril_reply_parse_query_call_fwd(GRil *gril, - const struct ril_msg *message, - unsigned int *list_size); - int g_ril_reply_parse_get_preferred_network_type(GRil *gril, const struct ril_msg *message);