Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / builder / b-refproxy.c
Author[]google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.c...> 2025-11-30 17:32 UTC
Committer[]Andy Green <andy@warmcat.com> 2025-11-30 17:32 UTC
Tree190933df61413661ce86b1089f3ae08af885785a   Raw Patch
 
Fix saip_switch implicit declaration and lws_sul_schedule type error
Fix saip_switch implicit declaration and lws_sul_schedule type error

- Added `saip_switch` declaration to `src/power/p-ws-server.c` to fix implicit declaration error.
- Added include guards to `src/power/p-private.h`.
- Persisted `saip_builder_t` in memory on disconnect to support cold-start HTTP API lookups.
- Implemented `local_srv_rx` in `p-http-api.c` for correct builder registration.
- Fixed `lws_sul_schedule` call in `p-http-api.c` to use `lws_ss_get_context`.
diff --git a/src/power/p-private.h b/src/power/p-private.h index 40d5742..83fdc8e 100644 --- a/src/power/p-private.h +++ b/src/power/p-private.h @@ -19,6 +19,9 @@ * MA 02110-1301 USA */ +#ifndef SAI_POWER_P_PRIVATE_H +#define SAI_POWER_P_PRIVATE_H + #include "../common/include/private.h" #include <sys/stat.h> @@ -204,6 +207,8 @@ int callback_builder(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len); +#endif + saip_pcon_t * find_pcon_by_builder_name(struct sai_power *pwr, const char *builder_name); diff --git a/src/power/p-ws-server.c b/src/power/p-ws-server.c index 107511d..c3c605a 100644 --- a/src/power/p-ws-server.c +++ b/src/power/p-ws-server.c @@ -28,6 +28,8 @@ #include "p-private.h" +extern void saip_switch(saip_pcon_t *pc, int on); + /* Map for the "powering up" message we send to the server */ static const lws_struct_map_t lsm_schema_power_state[] = { LSM_SCHEMA(sai_power_state_t, NULL, lsm_power_state,
Page fetched 0s ago, creation time: 1ms (vhost etag hits: 0%, cache hits: 0%)