eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 1e78ed5a7d5689319c0def9e86ec2802ed2a6073
parent f7171665d1f14b7770542cbb90a617630e7649db
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date:   Wed, 25 Jul 2018 12:54:41 -0700

client: add property setter for device

Diffstat:
Mclient/device.c | 25++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/client/device.c b/client/device.c @@ -31,6 +31,7 @@ #include "device.h" #include "display.h" #include "network.h" +#include "properties.h" struct device { bool powered; @@ -672,7 +673,29 @@ static enum cmd_status cmd_list(const char *device_name, char *args) static enum cmd_status cmd_set_property(const char *device_name, char *args) { - return CMD_STATUS_UNSUPPORTED; + char *name; + char *value_str; + const struct proxy_interface *proxy = + get_device_proxy_by_name(device_name); + + if (!proxy) + return CMD_STATUS_INVALID_VALUE; + + if (!properties_parse_args(args, &name, &value_str)) + return CMD_STATUS_INVALID_ARGS; + + if (!proxy_property_set(proxy, name, value_str, + check_errors_method_callback)) { + l_free(name); + l_free(value_str); + + return CMD_STATUS_INVALID_VALUE; + } + + l_free(name); + l_free(value_str); + + return CMD_STATUS_OK; } static enum cmd_status cmd_connect(const char *device_name, char *args)