DA: Standard error for customer self-diagnosis
[platform/upstream/connman.git] / plugins / ofono.c
old mode 100644 (file)
new mode 100755 (executable)
index 78f8f19..f0bd3c5
@@ -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;
        }
@@ -910,7 +910,7 @@ static void extract_ipv4_settings(DBusMessageIter *array,
        if (context->ipv4_method != CONNMAN_IPCONFIG_METHOD_FIXED)
                goto out;
 
-       context->ipv4_address = connman_ipaddress_alloc(CONNMAN_IPCONFIG_TYPE_IPV4);
+       context->ipv4_address = connman_ipaddress_alloc(AF_INET);
        if (!context->ipv4_address) {
                context->index = -1;
                goto out;
@@ -998,7 +998,7 @@ static void extract_ipv6_settings(DBusMessageIter *array,
        context->ipv6_method = CONNMAN_IPCONFIG_METHOD_AUTO;
 
        context->ipv6_address =
-               connman_ipaddress_alloc(CONNMAN_IPCONFIG_TYPE_IPV6);
+               connman_ipaddress_alloc(AF_INET6);
        if (!context->ipv6_address)
                goto out;
 
@@ -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);