mirror of
https://github.com/sailfishos/ofono
synced 2025-11-24 03:19:44 +08:00
Compare commits
6 Commits
mer/1.16+g
...
mer/1.16+g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b932bed519 | ||
|
|
db83ac369b | ||
|
|
8e9085f5ab | ||
|
|
c33a48ea0c | ||
|
|
3860230644 | ||
|
|
063234a433 |
@@ -292,20 +292,17 @@ void handle_sne(size_t len, const unsigned char *msg, char *sne)
|
||||
list_entry->data;
|
||||
|
||||
if (entry) {
|
||||
/* If one already exists,
|
||||
delete it */
|
||||
if (entry->sne)
|
||||
g_free(entry->sne);
|
||||
|
||||
DBG("Adding SNE to entry %d",
|
||||
phonebook_entry_nbr);
|
||||
DBG("name %s", entry->name);
|
||||
|
||||
g_free(entry->sne);
|
||||
entry->sne = sne;
|
||||
} else {
|
||||
g_free(sne);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
g_free(sne);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1110,7 +1110,7 @@ static gboolean ril_sim_register(gpointer user)
|
||||
send_get_sim_status(sim);
|
||||
|
||||
sd->idle_id = 0;
|
||||
sd->idle_id = g_ril_register(sd->ril,
|
||||
g_ril_register(sd->ril,
|
||||
RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED,
|
||||
(GRilNotifyFunc) ril_sim_status_changed, sim);
|
||||
return FALSE;
|
||||
@@ -1153,12 +1153,15 @@ static int ril_sim_probe(struct ofono_sim *sim, unsigned int vendor,
|
||||
|
||||
static void ril_sim_remove(struct ofono_sim *sim)
|
||||
{
|
||||
DBG("");
|
||||
struct sim_data *sd = ofono_sim_get_data(sim);
|
||||
|
||||
ofono_sim_set_data(sim, NULL);
|
||||
|
||||
if (sd->idle_id > 0)
|
||||
if (sd->idle_id > 0) {
|
||||
g_source_remove(sd->idle_id);
|
||||
sd->idle_id = 0;
|
||||
}
|
||||
|
||||
g_free(sd->aid_str);
|
||||
g_free(sd->app_str);
|
||||
|
||||
@@ -68,6 +68,7 @@ struct ofono_modem {
|
||||
unsigned int call_ids;
|
||||
DBusMessage *pending;
|
||||
guint interface_update;
|
||||
ofono_bool_t features_update;
|
||||
ofono_bool_t powered;
|
||||
ofono_bool_t powered_pending;
|
||||
ofono_bool_t get_online;
|
||||
@@ -1247,6 +1248,9 @@ static gboolean trigger_interface_update(void *data)
|
||||
&interfaces);
|
||||
g_free(interfaces);
|
||||
|
||||
if (!modem->features_update)
|
||||
goto out;
|
||||
|
||||
features = g_new0(char *, g_slist_length(modem->feature_list) + 1);
|
||||
for (i = 0, l = modem->feature_list; l; l = l->next, i++)
|
||||
features[i] = l->data;
|
||||
@@ -1255,7 +1259,9 @@ static gboolean trigger_interface_update(void *data)
|
||||
"Features", DBUS_TYPE_STRING,
|
||||
&features);
|
||||
g_free(features);
|
||||
modem->features_update = FALSE;
|
||||
|
||||
out:
|
||||
modem->interface_update = 0;
|
||||
|
||||
return FALSE;
|
||||
@@ -1299,9 +1305,11 @@ void ofono_modem_add_interface(struct ofono_modem *modem,
|
||||
g_strdup(interface));
|
||||
|
||||
feature = get_feature(interface);
|
||||
if (feature)
|
||||
if (feature) {
|
||||
modem->features_update = TRUE;
|
||||
modem->feature_list = g_slist_prepend(modem->feature_list,
|
||||
g_strdup(feature));
|
||||
}
|
||||
|
||||
if (modem->interface_update != 0)
|
||||
return;
|
||||
@@ -1333,6 +1341,7 @@ void ofono_modem_remove_interface(struct ofono_modem *modem,
|
||||
(GCompareFunc) strcmp);
|
||||
if (found) {
|
||||
g_free(found->data);
|
||||
modem->features_update = TRUE;
|
||||
modem->feature_list =
|
||||
g_slist_remove(modem->feature_list,
|
||||
found->data);
|
||||
@@ -2071,6 +2080,7 @@ static void modem_unregister(struct ofono_modem *modem)
|
||||
if (modem->interface_update) {
|
||||
g_source_remove(modem->interface_update);
|
||||
modem->interface_update = 0;
|
||||
modem->features_update = FALSE;
|
||||
}
|
||||
|
||||
if (modem->lock_watch) {
|
||||
|
||||
Reference in New Issue
Block a user