diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c index d4dc9a567..989994d42 100644 --- a/lib/roles/http/server/server.c +++ b/lib/roles/http/server/server.c @@ -1516,7 +1516,7 @@ lws_http_action(struct lws *wsi) if (lws_bind_protocol(wsi, pp, "http action CALLBACK bind")) return 1; - lwsl_notice("%s: %s, checking access rights for mask 0x%x\n", + lwsl_debug("%s: %s, checking access rights for mask 0x%x\n", __func__, hit->origin, hit->auth_mask); args.p = uri_ptr; diff --git a/lib/roles/ws/client-ws.c b/lib/roles/ws/client-ws.c index ee30bac66..6dc6d80f4 100644 --- a/lib/roles/ws/client-ws.c +++ b/lib/roles/ws/client-ws.c @@ -391,7 +391,7 @@ identify_protocol: if (!lwsi_role_client(wsi)) wsi->protocol = NULL; - while (wsi->vhost->protocols[n].callback) { + while (n < wsi->vhost->count_protocols) { if (!wsi->protocol && strcmp(p, wsi->vhost->protocols[n].name) == 0) { wsi->protocol = &wsi->vhost->protocols[n]; @@ -400,7 +400,7 @@ identify_protocol: n++; } - if (!wsi->vhost->protocols[n].callback) { /* no match */ + if (n == wsi->vhost->count_protocols) { /* no match */ /* if server, that's already fatal */ if (!lwsi_role_client(wsi)) { lwsl_info("%s: fail protocol %s\n", __func__, p);