diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-12-07 13:12:46 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-01-10 19:15:51 +0000 |
commit | 2d305ff13a5e24fd2bd54e7dcde89539950974a1 (patch) | |
tree | fa0e674e2893a273b3f23d45e2e5d7265f00e9a2 /package/network/services/hostapd/src/src/ap | |
parent | 425e392466f139a3ed349d65b2d556b4dd56304e (diff) | |
download | upstream-2d305ff13a5e24fd2bd54e7dcde89539950974a1.tar.gz upstream-2d305ff13a5e24fd2bd54e7dcde89539950974a1.tar.bz2 upstream-2d305ff13a5e24fd2bd54e7dcde89539950974a1.zip |
hostapd: return PID on config_add call
To simplify the way netifd acquires the PIDs of wpa_supplicant and
hostapd let the config_add method of both of them return the PID of the
called process. Use the returned PID instead of querying procd when
adding wpa_supplicant configuration.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/hostapd/src/src/ap')
-rw-r--r-- | package/network/services/hostapd/src/src/ap/ubus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c index 8546d2ce69..d03b848f94 100644 --- a/package/network/services/hostapd/src/src/ap/ubus.c +++ b/package/network/services/hostapd/src/src/ap/ubus.c @@ -658,6 +658,10 @@ hostapd_config_add(struct ubus_context *ctx, struct ubus_object *obj, if (hostapd_add_iface(interfaces, buf)) return UBUS_STATUS_INVALID_ARGUMENT; + blob_buf_init(&b, 0); + blobmsg_add_u32(&b, "pid", getpid()); + ubus_send_reply(ctx, req, b.head); + return UBUS_STATUS_OK; } |