mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
clean: codacy
This commit is contained in:
parent
0995c27f50
commit
5055096e47
21 changed files with 12 additions and 66 deletions
|
@ -1562,7 +1562,6 @@ lws_http_action(struct lws *wsi)
|
|||
|
||||
pp = lws_vhost_name_to_protocol(wsi->vhost, name);
|
||||
if (!pp) {
|
||||
n = -1;
|
||||
lwsl_err("Unable to find plugin '%s'\n",
|
||||
hit->origin);
|
||||
return 1;
|
||||
|
@ -1646,9 +1645,10 @@ lws_http_action(struct lws *wsi)
|
|||
#if defined(LWS_WITH_FILE_OPS)
|
||||
if (hit->origin_protocol == LWSMPRO_FILE)
|
||||
m = lws_http_serve(wsi, s, hit->origin, hit);
|
||||
#endif
|
||||
|
||||
if (m > 0) {
|
||||
if (m > 0)
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
* lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, NULL);
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libwebsockets - small server side websockets and web server implementation
|
||||
*
|
||||
* Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
|
||||
* Copyright (C) 2010 - 2020 Andy Green <andy@warmcat.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -172,7 +172,11 @@ lws_async_dns_writeable(struct lws *wsi, lws_adns_q_t *q)
|
|||
|
||||
/* we hack b0 of the tid to be 0 = A, 1 = AAAA */
|
||||
|
||||
lws_ser_wu16be(&p[DHO_TID], which ? q->tid | 1 : q->tid);
|
||||
lws_ser_wu16be(&p[DHO_TID],
|
||||
#if defined(LWS_WITH_IPV6)
|
||||
which ? q->tid | 1 :
|
||||
#endif
|
||||
q->tid);
|
||||
lws_ser_wu16be(&p[DHO_FLAGS], (1 << 8));
|
||||
lws_ser_wu16be(&p[DHO_NQUERIES], 1);
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,9 +210,6 @@
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,9 +113,6 @@ function lws_gray_out(vis, _options) {
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,9 +113,6 @@ function lws_gray_out(vis, _options) {
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -609,11 +609,8 @@ window.addEventListener("load", function() {
|
|||
}
|
||||
|
||||
if (lwsgs_user) {
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
ws = new MozWebSocket(get_appropriate_ws_url(),
|
||||
"protocol-lws-messageboard");
|
||||
else
|
||||
ws = new WebSocket(get_appropriate_ws_url(),
|
||||
|
||||
ws = new WebSocket(get_appropriate_ws_url(),
|
||||
"protocol-lws-messageboard");
|
||||
|
||||
try {
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket !== "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ function get_appropriate_ws_url(extra_url)
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,9 +210,6 @@
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
|
@ -603,10 +603,6 @@ window.addEventListener("load", function() {
|
|||
}
|
||||
|
||||
if (lwsgs_user) {
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
ws = new MozWebSocket(get_appropriate_ws_url(),
|
||||
"protocol-lws-messageboard");
|
||||
else
|
||||
ws = new WebSocket(get_appropriate_ws_url(),
|
||||
"protocol-lws-messageboard");
|
||||
|
||||
|
|
|
@ -67,10 +67,7 @@ function lwsgt_initial(title, pcol, divname, cb, gname)
|
|||
|
||||
lws_gray_out(true,{"zindex":"499"});
|
||||
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
this.lwsgt_ws = new MozWebSocket(lwsgt_get_appropriate_ws_url(), pcol);
|
||||
else
|
||||
this.lwsgt_ws = new WebSocket(lwsgt_get_appropriate_ws_url(), pcol);
|
||||
this.lwsgt_ws = new WebSocket(lwsgt_get_appropriate_ws_url(), pcol);
|
||||
this.lwsgt_ws.divname = divname;
|
||||
this.lwsgt_ws.lwsgt_cb = cb;
|
||||
this.lwsgt_ws.lwsgt_parent = gname;
|
||||
|
|
|
@ -113,9 +113,6 @@ function lws_gray_out(vis, _options) {
|
|||
|
||||
function new_ws(urlpath, protocol)
|
||||
{
|
||||
if (typeof MozWebSocket != "undefined")
|
||||
return new MozWebSocket(urlpath, protocol);
|
||||
|
||||
return new WebSocket(urlpath, protocol);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue