summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2015-11-13 14:29:04 -0600
committerDenis Kenzior <denkenz@gmail.com>2015-11-13 14:29:04 -0600
commitcbc53783466a5dcf853b092d110ef3e1f4781a97 (patch)
tree163e338003c6238801c214a3376be0917ef8d7d7
parent659851b1b1934a62929cd02c3c4041bc7301e51d (diff)
downloadofono-cbc53783466a5dcf853b092d110ef3e1f4781a97.tar.bz2
gril: Remove g_ril_reply_parse_operator
-rw-r--r--gril/grilreply.c87
-rw-r--r--gril/grilreply.h13
2 files changed, 0 insertions, 100 deletions
diff --git a/gril/grilreply.c b/gril/grilreply.c
index 0cb56f52..7fc8efdc 100644
--- a/gril/grilreply.c
+++ b/gril/grilreply.c
@@ -43,8 +43,6 @@
#include "grilreply.h"
#include "grilutil.h"
-#define OPERATOR_NUM_PARAMS 3
-
/* Indexes for registration state replies */
#define RST_IX_STATE 0
#define RST_IX_LAC 1
@@ -54,91 +52,6 @@
#define MTK_MODEM_MAX_CIDS 3
-static void ril_reply_free_operator(gpointer data)
-{
- struct reply_operator *reply = data;
-
- if (reply) {
- g_free(reply->lalpha);
- g_free(reply->salpha);
- g_free(reply->numeric);
- g_free(reply->status);
- g_free(reply);
- }
-}
-
-void g_ril_reply_free_operator(struct reply_operator *reply)
-{
- ril_reply_free_operator(reply);
-}
-
-struct reply_operator *g_ril_reply_parse_operator(GRil *gril,
- const struct ril_msg *message)
-{
- struct parcel rilp;
- int num_params;
- struct reply_operator *reply = NULL;
-
- /*
- * Minimum message length is 16:
- * - array size
- * - 3 NULL strings
- */
- if (message->buf_len < 16) {
- ofono_error("%s: invalid OPERATOR reply: "
- "size too small (< 16): %d ",
- __func__,
- (int) message->buf_len);
- goto error;
- }
-
- g_ril_init_parcel(message, &rilp);
-
- num_params = parcel_r_int32(&rilp);
- if (num_params != OPERATOR_NUM_PARAMS) {
- ofono_error("%s: invalid OPERATOR reply: "
- "number of params is %d; should be 3.",
- __func__,
- num_params);
- goto error;
- }
-
- reply = g_new0(struct reply_operator, 1);
-
- reply->lalpha = parcel_r_string(&rilp);
- reply->salpha = parcel_r_string(&rilp);
- reply->numeric = parcel_r_string(&rilp);
-
- if (reply->lalpha == NULL && reply->salpha == NULL) {
- ofono_error("%s: invalid OPERATOR reply: "
- " no names returned.",
- __func__);
-
- goto error;
- }
-
- if (reply->numeric == NULL) {
- ofono_error("%s: invalid OPERATOR reply: "
- " no numeric returned.",
- __func__);
- goto error;
- }
-
- g_ril_append_print_buf(gril,
- "(lalpha=%s, salpha=%s, numeric=%s)",
- reply->lalpha, reply->salpha, reply->numeric);
-
- g_ril_print_response(gril, message);
-
- return reply;
-
-error:
- if (reply)
- g_ril_reply_free_operator(reply);
-
- return NULL;
-}
-
static void set_reg_state(GRil *gril, struct reply_reg_state *reply,
int i, const char *str)
{
diff --git a/gril/grilreply.h b/gril/grilreply.h
index b57d8c8a..338ee225 100644
--- a/gril/grilreply.h
+++ b/gril/grilreply.h
@@ -32,14 +32,6 @@
extern "C" {
#endif
-struct reply_operator {
- char *lalpha;
- char *salpha;
- char *numeric;
- char *status;
- int tech;
-};
-
struct reply_reg_state {
int status;
int lac;
@@ -87,11 +79,6 @@ struct reply_oem_hook {
void *data;
};
-void g_ril_reply_free_operator(struct reply_operator *reply);
-
-struct reply_operator *g_ril_reply_parse_operator(GRil *gril,
- const struct ril_msg *message);
-
void g_ril_reply_free_sim_io(struct reply_sim_io *reply);
struct reply_sim_io *g_ril_reply_parse_sim_io(GRil *gril,