Commit 82d95bad authored by Chris T's avatar Chris T

Clean up Code

parent 7befa7a6
......@@ -54,34 +54,35 @@ enum {
} e_purple_connection;
enum {
MMSD_MM_MODEM_MMSC_MISCONFIGURED, //the MMSC is the default value
MMSD_MM_MODEM_NO_BEARERS_ACTIVE, //The Modem has no bearers
MMSD_MM_MODEM_INTERFACE_DISCONNECTED, //mmsd found the right bearer, but it is disconnected
MMSD_MM_MODEM_INCORRECT_APN_CONNECTED, //no APN is connected that matches the settings
MMSD_MM_MODEM_MMSC_MISCONFIGURED, //the MMSC is the default value
MMSD_MM_MODEM_NO_BEARERS_ACTIVE, //The Modem has no bearers
MMSD_MM_MODEM_INTERFACE_DISCONNECTED, //mmsd found the right bearer, but it is disconnected
MMSD_MM_MODEM_INCORRECT_APN_CONNECTED, //no APN is connected that matches the settings
MMSD_MM_MODEM_FUTURE_CASE_DISCONNECTED, //Reserved for future case
MMSD_MM_MODEM_CONTEXT_ACTIVE //No error, context activated properly
MMSD_MM_MODEM_CONTEXT_ACTIVE //No error, context activated properly
} mm_context_connection;
struct modem_data {
struct mms_service *service; //Do not mess with the guts of this in plugin.c!
GKeyFile *modemsettings;
//These are pulled from the settings file, and can be set via the Dbus
char *message_center; //The mmsc
char *mms_apn; //The MMS APN
char *MMS_proxy; // I *think* this is where mms proxy goes?
char *message_center; // The mmsc
char *mms_apn; // The MMS APN
char *MMS_proxy; // I *think* this is where mms proxy goes?
// These are for settings the context (i.e. APN settings and if the bearer is active)
char *context_path; //What is the dbus path to the context?
dbus_bool_t context_active; // Is the bearer context active?
char *context_interface; //Put the bearer interface here
guint owner_id; //The Bus org.ofono.mms.ModemManager
guint registration_id;
char *context_interface; // Bearer interface here (e.g. "wwan0")
char *context_path; // Dbus path of the bearer
dbus_bool_t context_active; // Whether the context is active
//The Bus org.ofono.mms.ModemManager
GDBusConnection *master_connection;
guint owner_id;
guint registration_id;
//These are modem manager related settings
GDBusConnection *master_connection; //connection of org.ofono.mms.ModemManager
char *path;
guint mm_watch_id;
MMManager *mm;
guint mm_watch_id;
MMObject *object;
MMModem *modem;
char *path;
MMSim *sim;
const char *imsi;
MMModemMessaging *modem_messaging;
......@@ -827,6 +828,7 @@ static void mmsd_plugin_disconnect (void) {
mms_service_set_bearer_handler(modem->service, NULL, NULL);
g_free(modem->path);
g_clear_object (&modem->modem);
g_clear_object (&modem->modem_messaging);
modem->object = NULL;
if (modem->device_arr && modem->device_arr->len) {
g_ptr_array_set_size (modem->device_arr, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment