summaryrefslogtreecommitdiff
path: root/src/technology.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-04-27 16:01:48 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-04-27 15:14:16 +0200
commit091347cc83aa28a2395630274b6f1334fcab4f88 (patch)
tree428134ac34e26d6d49a437eada814bc9e20cf5c4 /src/technology.c
parent52e6d658e5aca70761b482af4bf6eb0c80c47224 (diff)
downloadconnman-091347cc83aa28a2395630274b6f1334fcab4f88.tar.gz
connman-091347cc83aa28a2395630274b6f1334fcab4f88.tar.bz2
connman-091347cc83aa28a2395630274b6f1334fcab4f88.zip
technology: Enable ethernet by default
Ethernet is enabled by default if settings file is not found or the Wired entry is not found in the file.
Diffstat (limited to 'src/technology.c')
-rw-r--r--src/technology.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/technology.c b/src/technology.c
index 27ada407..c523182e 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -304,7 +304,11 @@ static void load_state(struct connman_technology *technology)
keyfile = __connman_storage_load_global();
/* Fallback on disabling technology if file not found. */
if (keyfile == NULL) {
- technology->enable_persistent = FALSE;
+ if (technology->type == CONNMAN_SERVICE_TYPE_ETHERNET)
+ /* We enable ethernet by default */
+ technology->enable_persistent = TRUE;
+ else
+ technology->enable_persistent = FALSE;
return;
}
@@ -316,7 +320,10 @@ static void load_state(struct connman_technology *technology)
if (error == NULL)
technology->enable_persistent = enable;
else {
- technology->enable_persistent = FALSE;
+ if (technology->type == CONNMAN_SERVICE_TYPE_ETHERNET)
+ technology->enable_persistent = TRUE;
+ else
+ technology->enable_persistent = FALSE;
g_clear_error(&error);
}
done: