esp32: allow return of default vhost at init time
This commit is contained in:
parent
93a5b586a3
commit
219a367a4c
2 changed files with 6 additions and 2 deletions
|
@ -636,6 +636,7 @@ struct lws_esp32_image {
|
|||
};
|
||||
|
||||
extern struct lws_esp32 lws_esp32;
|
||||
struct lws_vhost;
|
||||
|
||||
extern esp_err_t
|
||||
lws_esp32_event_passthru(void *ctx, system_event_t *event);
|
||||
|
@ -649,7 +650,7 @@ struct lws_context_creation_info;
|
|||
extern void
|
||||
lws_esp32_set_creation_defaults(struct lws_context_creation_info *info);
|
||||
extern struct lws_context *
|
||||
lws_esp32_init(struct lws_context_creation_info *);
|
||||
lws_esp32_init(struct lws_context_creation_info *, struct lws_vhost **pvh);
|
||||
extern int
|
||||
lws_esp32_wlan_nvs_get(int retry);
|
||||
extern esp_err_t
|
||||
|
|
|
@ -1627,7 +1627,7 @@ lws_esp32_get_image_info(const esp_partition_t *part, struct lws_esp32_image *i,
|
|||
}
|
||||
|
||||
struct lws_context *
|
||||
lws_esp32_init(struct lws_context_creation_info *info)
|
||||
lws_esp32_init(struct lws_context_creation_info *info, struct lws_vhost **pvh)
|
||||
{
|
||||
const esp_partition_t *part = lws_esp_ota_get_boot_partition();
|
||||
struct lws_context *context;
|
||||
|
@ -1683,6 +1683,9 @@ lws_esp32_init(struct lws_context_creation_info *info)
|
|||
else
|
||||
lws_init_vhost_client_ssl(info, vhost);
|
||||
|
||||
if (pvh)
|
||||
*pvh = vhost;
|
||||
|
||||
lws_protocol_init(context);
|
||||
|
||||
return context;
|
||||
|
|
Loading…
Add table
Reference in a new issue