Browse Source

MT#55283 update is_http to bool

Change-Id: I34ceb36d7ec466e991b69b1434a824f34bd63e93
(cherry picked from commit 557b052544)
mr12.5
Richard Fuchs 6 months ago
parent
commit
7be564cdc0
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      daemon/websocket.c

+ 4
- 5
daemon/websocket.c View File

@ -303,7 +303,7 @@ static int websocket_dequeue(struct websocket_conn *wc) {
if (!wc)
return 0;
int is_http = 0;
bool is_http = false;
mutex_lock(&wc->lock);
struct websocket_output *wo;
@ -340,7 +340,7 @@ static int websocket_dequeue(struct websocket_conn *wc) {
(unsigned long) to_send);
if (wo->protocol == LWS_WRITE_HTTP)
is_http = 1;
is_http = true;
}
next:
@ -350,12 +350,11 @@ next:
mutex_unlock(&wc->lock);
int ret = 0;
if (is_http)
if (lws_http_transaction_completed(wsi) == 1) // may destroy `wc`
ret = -1;
return -1;
return ret;
return 0;
}
void websocket_http_response(struct websocket_conn *wc, int status, const char *content_type,


Loading…
Cancel
Save