mirror of git://git.sysmocom.de/ofono
gril: Remove g_ril_reply_parse_query_call_fwd
This commit is contained in:
parent
b8fcc3ef21
commit
acb7a31d36
|
@ -966,90 +966,6 @@ char *g_ril_reply_parse_get_imei(GRil *gril,
|
||||||
return imei;
|
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,
|
int g_ril_reply_parse_get_preferred_network_type(GRil *gril,
|
||||||
const struct ril_msg *message)
|
const struct ril_msg *message)
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,11 +135,6 @@ char *g_ril_reply_parse_baseband_version(GRil *gril,
|
||||||
char *g_ril_reply_parse_get_imei(GRil *gril,
|
char *g_ril_reply_parse_get_imei(GRil *gril,
|
||||||
const struct ril_msg *message);
|
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,
|
int g_ril_reply_parse_get_preferred_network_type(GRil *gril,
|
||||||
const struct ril_msg *message);
|
const struct ril_msg *message);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue