summaryrefslogtreecommitdiffstats
path: root/plugins/ifx.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-11-22 06:42:04 -0600
committerDenis Kenzior <denkenz@gmail.com>2012-11-22 06:50:08 -0600
commit792c9c02f8e258d4b53d93a8617762558f1ffd65 (patch)
tree1b0c623d3dbaea0dce5b01dac079e2429e54cd86 /plugins/ifx.c
parentb97e79b3df36e09274d52179e746ceb89b599935 (diff)
downloadofono-792c9c02f8e258d4b53d93a8617762558f1ffd65.tar.bz2
ifx: Get rid of have_sim tracking
Diffstat (limited to 'plugins/ifx.c')
-rw-r--r--plugins/ifx.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/ifx.c b/plugins/ifx.c
index cf6f322f..ffb9f58f 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -95,7 +95,6 @@ struct ifx_data {
int mux_ldisc;
int saved_ldisc;
struct ofono_sim *sim;
- gboolean have_sim;
};
static void ifx_debug(const char *str, void *user_data)
@@ -141,10 +140,7 @@ static void ifx_set_sim_state(struct ifx_data *data, int state)
switch (state) {
case 0: /* SIM not present */
case 9: /* SIM Removed */
- if (data->have_sim == TRUE) {
- ofono_sim_inserted_notify(data->sim, FALSE);
- data->have_sim = FALSE;
- }
+ ofono_sim_inserted_notify(data->sim, FALSE);
break;
case 1: /* PIN verification needed */
case 2: /* PIN verification not needed – Ready */
@@ -154,10 +150,7 @@ static void ifx_set_sim_state(struct ifx_data *data, int state)
case 6: /* SIM Error */
case 7: /* ready for attach (+COPS) */
case 8: /* SIM Technical Problem */
- if (data->have_sim == FALSE) {
- ofono_sim_inserted_notify(data->sim, TRUE);
- data->have_sim = TRUE;
- }
+ ofono_sim_inserted_notify(data->sim, TRUE);
break;
case 10: /* SIM Reactivating */
case 11: /* SIM Reactivated */
@@ -323,8 +316,6 @@ static void xgendata_query(gboolean ok, GAtResult *result, gpointer user_data)
g_at_chat_send(data->dlcs[AUX_DLC], "AT+XPOW=0,0,0", none_prefix,
NULL, NULL, NULL);
- data->have_sim = FALSE;
-
/* notify that the modem is ready so that pre_sim gets called */
ofono_modem_set_powered(modem, TRUE);