sim: cleanup sim atom private structure
authorDenis Kenzior <denkenz@gmail.com>
Wed, 1 Sep 2010 00:11:44 +0000 (19:11 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 1 Sep 2010 17:06:59 +0000 (12:06 -0500)
The number of elements was getting out of hand and out of order

src/sim.c

index 12515e6..9d34cae 100644 (file)
--- a/src/sim.c
+++ b/src/sim.c
@@ -70,39 +70,50 @@ struct sim_file_op {
 };
 
 struct ofono_sim {
+       /* Contents of the SIM file system, in rough initialization order */
        char *iccid;
-       char *imsi;
+
+       char **language_prefs;
+       unsigned char *efli;
+       unsigned char efli_length;
+
+       enum ofono_sim_password_type pin_type;
+       gboolean locked_pins[OFONO_SIM_PASSWORD_SIM_PUK]; /* Number of PINs */
+
        enum ofono_sim_phase phase;
        unsigned char mnc_length;
+       enum ofono_sim_cphs_phase cphs_phase;
+       unsigned char cphs_service_table[2];
+       unsigned char *efust;
+       unsigned char efust_length;
+       unsigned char *efest;
+       unsigned char efest_length;
+       unsigned char *efsst;
+       unsigned char efsst_length;
+
+       char *imsi;
+
        GSList *own_numbers;
        GSList *new_numbers;
-       GSList *service_numbers;
-       gboolean sdn_ready;
-       enum ofono_sim_state state;
-       enum ofono_sim_password_type pin_type;
-       gboolean locked_pins[OFONO_SIM_PASSWORD_SIM_PUK]; /* Number of PINs */
-       char **language_prefs;
-       GQueue *simop_q;
-       gint simop_source;
        unsigned char efmsisdn_length;
        unsigned char efmsisdn_records;
-       unsigned char *efli;
-       unsigned char efli_length;
+
+       GSList *service_numbers;
+       gboolean sdn_ready;
+
        unsigned char *efimg;
        unsigned short efimg_length;
-       enum ofono_sim_cphs_phase cphs_phase;
-       unsigned char cphs_service_table[2];
+
+       enum ofono_sim_state state;
        struct ofono_watchlist *state_watches;
+
+       GQueue *simop_q;
+       gint simop_source;
+
+       DBusMessage *pending;
        const struct ofono_sim_driver *driver;
        void *driver_data;
        struct ofono_atom *atom;
-       DBusMessage *pending;
-       unsigned char *efust;
-       unsigned char efust_length;
-       unsigned char *efest;
-       unsigned char efest_length;
-       unsigned char *efsst;
-       unsigned char efsst_length;
 };
 
 struct msisdn_set_request {