Skip to content
Snippets Groups Projects
Commit f1c56bc2 authored by Andy Green's avatar Andy Green
Browse files

alpn: allow NULL alpn in role struct when scanning for match

parent f497562a
No related branches found
Tags
No related merge requests found
...@@ -83,7 +83,7 @@ lws_role_call_alpn_negotiated(struct lws *wsi, const char *alpn) ...@@ -83,7 +83,7 @@ lws_role_call_alpn_negotiated(struct lws *wsi, const char *alpn)
lwsl_info("%s: '%s'\n", __func__, alpn); lwsl_info("%s: '%s'\n", __func__, alpn);
LWS_FOR_EVERY_AVAILABLE_ROLE_START(ar) LWS_FOR_EVERY_AVAILABLE_ROLE_START(ar)
if (!strcmp(ar->alpn, alpn) && ar->alpn_negotiated) if (ar->alpn && !strcmp(ar->alpn, alpn) && ar->alpn_negotiated)
return ar->alpn_negotiated(wsi, alpn); return ar->alpn_negotiated(wsi, alpn);
LWS_FOR_EVERY_AVAILABLE_ROLE_END; LWS_FOR_EVERY_AVAILABLE_ROLE_END;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment