Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. [PATCH 0/3] Update session-test (Daniel Wagner)
2. [PATCH 1/3] session-test: Update callback function signature
(Daniel Wagner)
3. [PATCH 2/3] session-test: Use callback from helper data
structure (Daniel Wagner)
4. [PATCH 3/3] session-test: Update notification parser
(Daniel Wagner)
5. Re: [PATCH] iwd: Remove device state property (Daniel Wagner)
----------------------------------------------------------------------
Message: 1
Date: Tue, 9 Oct 2018 09:16:52 +0200
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH 0/3] Update session-test
Message-ID: <[email protected]>
session-test started to bit rot slightly.
Daniel Wagner (3):
session-test: Update callback function signature
session-test: Use callback from helper data structure
session-test: Update notification parser
tools/session-api.c | 42 +++++++++++++++++++++++++++++++-----------
tools/session-test.h | 3 +++
tools/session-utils.c | 18 ++++++++++++------
3 files changed, 46 insertions(+), 17 deletions(-)
--
2.14.4
------------------------------
Message: 2
Date: Tue, 9 Oct 2018 09:16:53 +0200
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH 1/3] session-test: Update callback function signature
Message-ID: <[email protected]>
Instead just silencing the warning as in 84984e919ab7 ("session-utils:
Remove -Wcast-function-type from build"), update the code. That avoids
warning from older gcc which do not know -Wcast-function-type.
---
tools/session-utils.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tools/session-utils.c b/tools/session-utils.c
index 77485f7c8c11..9b0426c30d4b 100644
--- a/tools/session-utils.c
+++ b/tools/session-utils.c
@@ -26,7 +26,6 @@
#include <stdlib.h>
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#pragma GCC diagnostic ignored "-Wcast-function-type"
#include <gdbus.h>
@@ -193,7 +192,7 @@ struct test_data_cb {
util_test_func_t teardown;
};
-static void run_test_cb(gconstpointer data)
+static void run_test_cb(gpointer fixture, gconstpointer data)
{
const struct test_data_cb *cbd = data;
struct test_fix *fix;
@@ -222,6 +221,13 @@ static void run_test_cb(gconstpointer data)
cleanup_fix(fix);
}
+static void cleanup_test_cb(gpointer fixture, gconstpointer data)
+{
+ struct test_data_cb *cbd = (void *)data;
+
+ g_free(cbd);
+}
+
void util_test_add(const char *test_name, util_test_func_t test_func,
util_test_func_t setup, util_test_func_t teardown)
{
@@ -231,9 +237,7 @@ void util_test_add(const char *test_name, util_test_func_t
test_func,
cbd->setup = setup;
cbd->teardown = teardown;
- g_test_add_vtable(test_name, 0, cbd, NULL,
- (GTestFixtureFunc) run_test_cb,
- (GTestFixtureFunc) g_free);
+ g_test_add_vtable(test_name, 0, cbd, NULL, run_test_cb,
cleanup_test_cb);
}
void util_session_create(struct test_fix *fix, unsigned int max_sessions)
--
2.14.4
------------------------------
Message: 3
Date: Tue, 9 Oct 2018 09:16:54 +0200
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH 2/3] session-test: Use callback from helper data
structure
Message-ID: <[email protected]>
c190e462eba3 ("session-test: Pass in struct test_fix into tests")
forgot to update this callside.
---
tools/session-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/session-utils.c b/tools/session-utils.c
index 9b0426c30d4b..a70898db55a0 100644
--- a/tools/session-utils.c
+++ b/tools/session-utils.c
@@ -211,7 +211,7 @@ static void run_test_cb(gpointer fixture, gconstpointer
data)
g_test_trap_assert_passed();
#else
- util_call(fix, func, NULL);
+ util_call(fix, cbd->func, NULL);
g_main_loop_run(fix->main_loop);
#endif
--
2.14.4
------------------------------
Message: 4
Date: Tue, 9 Oct 2018 09:16:55 +0200
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH 3/3] session-test: Update notification parser
Message-ID: <[email protected]>
Add the 'recently' introduced properties to the parser.
---
tools/session-api.c | 42 +++++++++++++++++++++++++++++++-----------
tools/session-test.h | 3 +++
tools/session-utils.c | 2 ++
3 files changed, 36 insertions(+), 11 deletions(-)
diff --git a/tools/session-api.c b/tools/session-api.c
index b97cfc0195bd..e869d19011b6 100644
--- a/tools/session-api.c
+++ b/tools/session-api.c
@@ -158,35 +158,55 @@ static DBusMessage *notify_update(DBusConnection *conn,
const char *val;
dbus_message_iter_get_basic(&value, &val);
- if (info->bearer)
- g_free(info->bearer);
-
+ g_free(info->bearer);
info->bearer = g_strdup(val);
} else if (g_str_equal(key, "Name")) {
const char *val;
dbus_message_iter_get_basic(&value, &val);
- if (info->name)
- g_free(info->name);
-
+ g_free(info->name);
info->name = g_strdup(val);
} else if (g_str_equal(key, "Interface")) {
const char *val;
dbus_message_iter_get_basic(&value, &val);
- if (info->interface)
- g_free(info->interface);
-
+ g_free(info->interface);
info->interface = g_strdup(val);
- } else if (g_str_equal(key, "ConnectionType")
- ) {
+ } else if (g_str_equal(key, "ConnectionType")) {
const char *val;
dbus_message_iter_get_basic(&value, &val);
info->type = string2type(val);
+
+ } else if (g_str_equal(key, "Allowedinterface")) {
+ const char *val;
+ dbus_message_iter_get_basic(&value, &val);
+
+ g_free(info->allowed_interface);
+ info->allowed_interface = g_strdup(val);
+
+ } else if (g_str_equal(key, "ContextIdentifier")) {
+ const char *val;
+ dbus_message_iter_get_basic(&value, &val);
+
+ g_free(info->context_identifier);
+ info->context_identifier = g_strdup(val);
+
+ } else {
+ g_assert(FALSE);
+ return __connman_error_invalid_arguments(msg);
+ }
+ break;
+ case DBUS_TYPE_BOOLEAN:
+ if (g_str_equal(key, "SourceIPRule")) {
+ dbus_bool_t val;
+ dbus_message_iter_get_basic(&value, &val);
+
+ info->source_ip_rule = val;
+
} else {
g_assert(FALSE);
return __connman_error_invalid_arguments(msg);
diff --git a/tools/session-test.h b/tools/session-test.h
index 85129337afb0..2c068bd7ed36 100644
--- a/tools/session-test.h
+++ b/tools/session-test.h
@@ -76,6 +76,9 @@ struct test_session_info {
enum connman_session_type type;
/* ipv4, ipv6 dicts */
GSList *allowed_bearers;
+ char *allowed_interface;
+ bool source_ip_rule;
+ char *context_identifier;
};
struct test_session {
diff --git a/tools/session-utils.c b/tools/session-utils.c
index a70898db55a0..47f0de1f1509 100644
--- a/tools/session-utils.c
+++ b/tools/session-utils.c
@@ -309,6 +309,8 @@ void util_session_cleanup(struct test_session *session)
g_slist_foreach(session->info->allowed_bearers,
bearer_info_cleanup, NULL);
g_slist_free(session->info->allowed_bearers);
+ g_free(session->info->allowed_interface);
+ g_free(session->info->context_identifier);
session->notify = NULL;
g_free(session->notify_path);
--
2.14.4
------------------------------
Message: 5
Date: Tue, 9 Oct 2018 09:19:42 +0200
From: Daniel Wagner <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: [PATCH] iwd: Remove device state property
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
On 09/29/2018 12:02 PM, Daniel Wagner wrote:
> iwd has moved parts of the Device API into the Station API. Among
> those properties is the state of device. So far we haven't used this
> property at all, therefore we can just remove it.
Patch applied.
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 36, Issue 9
**************************************