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