path: root/plugins
diff options
authorDaniel Wagner <>2012-09-19 13:37:14 +0200
committerDaniel Wagner <>2012-09-27 10:28:28 +0200
commita5e3f919ed56b1aba3893abc780039ad32debb90 (patch)
tree68e32af56ab7b129d6fcfc7c2cf234fa126cd4b5 /plugins
parentdc7095e240c3a4ca50805e7f2d2249e6cecd4e78 (diff)
session: Use session pointer instead of string id
Instead of passing in some string to identify we can use the connman_session pointer. This allows us to keep the way sessions are identfied away from the core, e.g. using the D-Bus owner id or something else.
Diffstat (limited to 'plugins')
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/session_policy.c b/plugins/session_policy.c
index acbf154a..906cc229 100644
--- a/plugins/session_policy.c
+++ b/plugins/session_policy.c
@@ -33,9 +33,10 @@
#include <connman/log.h>
#include <connman/session.h>
-static int policy_get_bool(const char *id, const char *key, connman_bool_t *val)
+static int policy_get_bool(struct connman_session *session,
+ const char *key, connman_bool_t *val)
- DBG("id %s key %s", id, key);
+ DBG("sesion %p key %s", session, key);
if (g_str_equal(key, "Priority") == TRUE)
*val = FALSE;
@@ -47,9 +48,10 @@ static int policy_get_bool(const char *id, const char *key, connman_bool_t *val)
return 0;
-static int policy_get_string(const char *id, const char *key, char **val)
+static int policy_get_string(struct connman_session *session,
+ const char *key, char **val)
- DBG("id %s key %s", id, key);
+ DBG("session %p key %s", session, key);
if (g_str_equal(key, "RoamingPolicy") == TRUE)
*val = "default";