ofono: Create ipconfig layer when creating network
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Wed, 21 Dec 2011 15:53:34 +0000 (16:53 +0100)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 22 Dec 2011 10:10:15 +0000 (11:10 +0100)
Create the ipconfig layer before trying to connect. Withouth
the ipconfig layer the core is not ready to process errors.

plugins/ofono.c

index 4906dc5..4a6467b 100644 (file)
@@ -998,6 +998,12 @@ static void add_network(struct modem_data *modem)
                modem->network = NULL;
                return;
        }
+
+       /*
+        * Create the ipconfig layer before trying to connect. Withouth
+        * the ipconfig layer the core is not ready to process errors.
+        */
+       connman_network_set_index(modem->network, -1);
 }
 
 static void remove_network(struct modem_data *modem)