storage: migrate 0.76-era device enabled / powered state
[framework/connectivity/connman.git] / src / main.c
index 61e35cb..48a956c 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007-2010  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2012  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
 
 #include <gdbus.h>
 
-#ifdef HAVE_CAPNG
-#include <cap-ng.h>
-#endif
-
 #include "connman.h"
 
 static struct {
@@ -146,10 +142,14 @@ static void parse_config(GKeyFile *config)
                "wifi",
                "ethernet",
                "cellular",
+               NULL
        };
 
-       if (config == NULL)
+       if (config == NULL) {
+               connman_settings.auto_connect =
+                       parse_service_types(default_auto_connect, 3);
                return;
+       }
 
        DBG("parsing main.conf");
 
@@ -383,10 +383,6 @@ int main(int argc, char *argv[])
        GKeyFile *config;
        guint signal;
 
-#ifdef HAVE_CAPNG
-       /* Drop capabilities */
-#endif
-
 #ifdef NEED_THREADS
        if (g_thread_supported() == FALSE)
                g_thread_init(NULL);
@@ -462,10 +458,9 @@ int main(int argc, char *argv[])
        __connman_dbus_init(conn);
 
        config = load_config(CONFIGDIR "/main.conf");
-       if (config != NULL) {
-               parse_config(config);
+       parse_config(config);
+       if (config != NULL)
                g_key_file_free(config);
-       }
 
        __connman_storage_migrate();
        __connman_technology_init();