Imported Upstream connman version 1.38
[platform/upstream/connman.git] / plugins / ofono.c
index 78f8f19..36873d5 100755 (executable)
@@ -614,7 +614,7 @@ static void context_set_active_reply(struct modem_data *modem,
        if (success) {
                /*
                 * Don't handle do anything on success here. oFono will send
-                * the change via PropertyChanged singal.
+                * the change via PropertyChanged signal.
                 */
                return;
        }
@@ -667,7 +667,7 @@ static void cdma_cm_set_powered_reply(struct modem_data *modem,
        if (success) {
                /*
                 * Don't handle do anything on success here. oFono will send
-                * the change via PropertyChanged singal.
+                * the change via PropertyChanged signal.
                 */
                return;
        }
@@ -1301,10 +1301,13 @@ static void remove_all_contexts(struct modem_data *modem)
        if (modem->context_list == NULL)
                return;
 
-       for (list = modem->context_list; list; list = list->next) {
+       list = modem->context_list;
+       while (list) {
                struct network_context *context = list->data;
 
                remove_cm_context(modem, context);
+
+               list = modem->context_list;
        }
        g_slist_free(modem->context_list);
        modem->context_list = NULL;
@@ -2965,7 +2968,7 @@ static void ofono_exit(void)
 
        if (modem_hash) {
                /*
-                * We should propably wait for the SetProperty() reply
+                * We should probably wait for the SetProperty() reply
                 * message, because ...
                 */
                g_hash_table_foreach(modem_hash, modem_power_down, NULL);