{
}
-struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
- const char *mcc,
- const char *mnc, guint16 lac)
+static struct sim_eons_operator_info *
+ sim_eons_lookup_common(struct sim_eons *eons,
+ const char *mcc, const char *mnc,
+ gboolean have_lac, guint16 lac)
{
GSList *l;
const struct opl_operator *opl;
if (opl->lac_tac_low == 0 && opl->lac_tac_high == 0xfffe)
break;
+ if (have_lac == FALSE)
+ continue;
+
if ((lac >= opl->lac_tac_low) && (lac <= opl->lac_tac_high))
break;
}
return &eons->pnn_list[opl->id - 1];
}
+
+struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
+ const char *mcc,
+ const char *mnc)
+{
+ return sim_eons_lookup_common(eons, mcc, mnc, FALSE, 0);
+}
+
+struct sim_eons_operator_info *sim_eons_lookup_with_lac(struct sim_eons *eons,
+ const char *mcc,
+ const char *mnc,
+ guint16 lac)
+{
+ return sim_eons_lookup_common(eons, mcc, mnc, TRUE, lac);
+}
void sim_eons_add_opl_record(struct sim_eons *eons,
const guint8 *tlv, int length);
void sim_eons_optimize(struct sim_eons *eons);
+struct sim_eons_operator_info *sim_eons_lookup_with_lac(struct sim_eons *eons,
+ const char *mcc,
+ const char *mnc,
+ guint16 lac);
struct sim_eons_operator_info *sim_eons_lookup(struct sim_eons *eons,
const char *mcc,
- const char *mnc, guint16 lac);
+ const char *mnc);
void sim_eons_free(struct sim_eons *eons);
struct sim_spdi *sim_spdi_new(const guint8 *tlv, int length);