summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-07-22 13:33:05 +0300
committerZhang zhengguang <zhengguang.zhang@intel.com>2013-10-28 13:04:03 +0800
commitf62913d1367a970de20905ddf4c4a3ee8a51fa65 (patch)
treeb4fd1bac759dfc854aba6bafa36a34cff1e05003
parente840a9c724eb9cf7b44c958fa9adb469f65c3c19 (diff)
downloadconnman-f62913d1367a970de20905ddf4c4a3ee8a51fa65.tar.gz
connman-f62913d1367a970de20905ddf4c4a3ee8a51fa65.tar.bz2
connman-f62913d1367a970de20905ddf4c4a3ee8a51fa65.zip
Tethering/Upstream: technology: Technology must have a name when saving its data
It is no use saving the technology if the name is missing as the group name in settings file would be NULL in that case. Upstream commit Id: 339f05f38f2dd769fe04912ea157323298a0d091 Change-Id: I9abc95441fd5069e70b548888f6deceb5ab269c6
-rw-r--r--src/technology.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/technology.c b/src/technology.c
index c4b96e5f..f217fe2e 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -237,14 +237,18 @@ static void technology_save(struct connman_technology *technology)
{
GKeyFile *keyfile;
gchar *identifier;
+ const char *name = get_name(technology->type);
- DBG("technology %p", technology);
+ DBG("technology %p type %d name %s", technology, technology->type,
+ name);
+ if (name == NULL)
+ return;
keyfile = __connman_storage_load_global();
if (keyfile == NULL)
keyfile = g_key_file_new();
- identifier = g_strdup_printf("%s", get_name(technology->type));
+ identifier = g_strdup_printf("%s", name);
if (identifier == NULL)
goto done;