diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-10-02 16:04:59 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-10-02 16:22:31 +0200 |
commit | bb9098e011846fd1985a2b6eda185d8ebf6abb6e (patch) | |
tree | a9cf4fd6bd43a04df546f9aa43a30a01d96d3162 /src | |
parent | 36ab809686c0be354199b9a62619a8c57863e5ee (diff) | |
download | connman-bb9098e011846fd1985a2b6eda185d8ebf6abb6e.tar.gz connman-bb9098e011846fd1985a2b6eda185d8ebf6abb6e.tar.bz2 connman-bb9098e011846fd1985a2b6eda185d8ebf6abb6e.zip |
session: Move the default config create part back to core
Diffstat (limited to 'src')
-rw-r--r-- | src/session.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c index fe1f5033..de25f789 100644 --- a/src/session.c +++ b/src/session.c @@ -326,6 +326,27 @@ void connman_session_policy_unregister(struct connman_session_policy *policy) remove_policy(policy); } +struct connman_session_config *connman_session_create_default_config(void) +{ + struct connman_session_config *config; + + config = g_try_new0(struct connman_session_config, 1); + if (config == NULL) + return NULL; + + config->priority = FALSE; + config->roaming_policy = CONNMAN_SESSION_ROAMING_POLICY_DEFAULT; + config->type = CONNMAN_SESSION_TYPE_ANY; + config->ecall = FALSE; + config->allowed_bearers = connman_session_allowed_bearers_any(); + if (config->allowed_bearers == NULL) { + g_free(config); + return NULL; + } + + return config; +} + static enum connman_session_type apply_policy_on_type( enum connman_session_type policy, enum connman_session_type type) |