diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2020-12-16 21:24:16 +0530 |
---|---|---|
committer | Niraj Kumar Goit <niraj.g@samsung.com> | 2021-01-25 13:23:16 +0530 |
commit | 05d00ac16fd9c9a5630afb5a2f9b92774fdca01a (patch) | |
tree | 4acf11fa96c10aae15b19c562b033fef5ebe83b0 | |
parent | 6d2cf90574c81cd30340116270e17af058703afb (diff) | |
download | connman-05d00ac16fd9c9a5630afb5a2f9b92774fdca01a.tar.gz connman-05d00ac16fd9c9a5630afb5a2f9b92774fdca01a.tar.bz2 connman-05d00ac16fd9c9a5630afb5a2f9b92774fdca01a.zip |
Added Dbus method 'IsEapolEnabled'.
This patch fixes EAPoL enabled status on device reboot scenario.
Change-Id: Ib9fcbed659996eae42c6a30e7ee5f584aeaa19d2
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rw-r--r-- | packaging/connman.spec | 2 | ||||
-rwxr-xr-x | src/service.c | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec index 6d17cd99..ccba7fb0 100644 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -6,7 +6,7 @@ Name: connman Version: 1.38 -Release: 1 +Release: 2 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net diff --git a/src/service.c b/src/service.c index 5a73d09a..c7088d24 100755 --- a/src/service.c +++ b/src/service.c @@ -7452,6 +7452,26 @@ static DBusMessage *reset_counters(DBusConnection *conn, return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET +static DBusMessage *is_eapol_enabled(DBusConnection *conn, + DBusMessage *msg, void *user_data) +{ + struct connman_service *service = user_data; + DBG("service: %p path: %s UseEapol: %d", service, service->path, service->use_eapol); + + dbus_bool_t eapol_status = service->use_eapol; + + DBusMessage *reply = dbus_message_new_method_return(msg); + if (!reply) { + DBG("Failed to initialize reply"); + return NULL; + } + + dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &eapol_status, DBUS_TYPE_INVALID); + return reply; +} +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + #if defined TIZEN_MAINTAIN_ONLINE static DBusMessage *downgrade_service(DBusConnection *conn, DBusMessage *msg, void *user_data) @@ -7529,6 +7549,9 @@ static const GDBusMethodTable service_methods[] = { GDBUS_ARGS({ "service", "o" }), NULL, move_after) }, { GDBUS_METHOD("ResetCounters", NULL, NULL, reset_counters) }, +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + { GDBUS_METHOD("IsEapolEnabled", NULL, GDBUS_ARGS({ "eapol", "b" }), is_eapol_enabled) }, +#endif #if defined TIZEN_MAINTAIN_ONLINE { GDBUS_METHOD("Downgrade", NULL, NULL, downgrade_service) }, #endif |