From 2037f3aef4c85d6af5ae0e675585648bcfc0fcbe Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 5 Nov 2015 22:40:14 -0600 Subject: gril: Remove g_ril_reply_parse_get_smsc_address --- gril/grilreply.c | 55 ------------------------------------------------------- gril/grilreply.h | 4 ---- 2 files changed, 59 deletions(-) (limited to 'gril') diff --git a/gril/grilreply.c b/gril/grilreply.c index 60c61220..cbc9a81b 100644 --- a/gril/grilreply.c +++ b/gril/grilreply.c @@ -726,61 +726,6 @@ error: return NULL; } -struct ofono_phone_number *g_ril_reply_parse_get_smsc_address( - GRil *gril, - const struct ril_msg *message) -{ - struct ofono_phone_number *sca; - struct parcel rilp; - char *number, *temp_buf; - - sca = g_new0(struct ofono_phone_number, 1); - if (sca == NULL) { - ofono_error("%s Out of memory", __func__); - goto err_alloc; - } - - g_ril_init_parcel(message, &rilp); - - temp_buf = parcel_r_string(&rilp); - if (temp_buf == NULL) { - ofono_error("%s Cannot read SMSC address", __func__); - goto err_readsca; - } - - /* RIL gives address in quotes */ - number = strtok(temp_buf, "\""); - if (number == NULL || *number == '\0') { - ofono_error("%s Invalid SMSC address", __func__); - goto err_scaformat; - } - - if (number[0] == '+') { - number = number + 1; - sca->type = OFONO_NUMBER_TYPE_INTERNATIONAL; - } else { - sca->type = OFONO_NUMBER_TYPE_UNKNOWN; - } - - strncpy(sca->number, number, OFONO_MAX_PHONE_NUMBER_LENGTH); - sca->number[OFONO_MAX_PHONE_NUMBER_LENGTH] = '\0'; - - g_ril_append_print_buf(gril, "{type=%d,number=%s}", - sca->type, sca->number); - g_ril_print_response(gril, message); - - g_free(temp_buf); - - return sca; - -err_scaformat: - g_free(temp_buf); -err_readsca: - g_free(sca); -err_alloc: - return NULL; -} - static gint g_ril_call_compare(gconstpointer a, gconstpointer b) { const struct ofono_call *ca = a; diff --git a/gril/grilreply.h b/gril/grilreply.h index cbc26466..a58f172f 100644 --- a/gril/grilreply.h +++ b/gril/grilreply.h @@ -116,10 +116,6 @@ void g_ril_reply_free_sim_status(struct reply_sim_status *status); struct reply_sim_status *g_ril_reply_parse_sim_status(GRil *gril, const struct ril_msg *message); -struct ofono_phone_number *g_ril_reply_parse_get_smsc_address( - GRil *gril, - const struct ril_msg *message); - GSList *g_ril_reply_parse_get_calls(GRil *gril, const struct ril_msg *message); enum ofono_disconnect_reason g_ril_reply_parse_call_fail_cause( -- cgit v1.2.3