route: extend lws_route_uidx_t from 1 byte to 2 bytes
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com> (cherry picked from commit a494ccc3c0d7c3f5a720f0bb1ada2be9bb1bc56a)
This commit is contained in:
parent
b854462e32
commit
d7af6a85c3
@ -0,0 +1,40 @@
|
||||
From 8bae551a6dad97f1f3b5688d917b90011cd272e1 Mon Sep 17 00:00:00 2001
|
||||
From: wayneonway <121931005@qq.com>
|
||||
Date: Mon, 21 Feb 2022 15:16:35 +0800
|
||||
Subject: [PATCH] route: extend lws_route_uidx_t from 1 byte to 2 bytes
|
||||
|
||||
---
|
||||
include/libwebsockets/lws-network-helper.h | 3 ++-
|
||||
lib/core-net/route.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/libwebsockets/lws-network-helper.h b/include/libwebsockets/lws-network-helper.h
|
||||
index 4ad16bef..72c9f932 100644
|
||||
--- a/include/libwebsockets/lws-network-helper.h
|
||||
+++ b/include/libwebsockets/lws-network-helper.h
|
||||
@@ -33,7 +33,8 @@
|
||||
#include <lwip/sockets.h>
|
||||
#endif
|
||||
|
||||
-typedef uint8_t lws_route_uidx_t;
|
||||
+/* cope with large amounts of route information */
|
||||
+typedef uint16_t lws_route_uidx_t;
|
||||
|
||||
typedef struct lws_dns_score {
|
||||
uint8_t precedence;
|
||||
diff --git a/lib/core-net/route.c b/lib/core-net/route.c
|
||||
index 91744372..0f3746fe 100644
|
||||
--- a/lib/core-net/route.c
|
||||
+++ b/lib/core-net/route.c
|
||||
@@ -96,7 +96,7 @@ _lws_routing_table_dump(struct lws_context *cx)
|
||||
lws_route_uidx_t
|
||||
_lws_route_get_uidx(struct lws_context *cx)
|
||||
{
|
||||
- uint8_t ou;
|
||||
+ lws_route_uidx_t ou;
|
||||
|
||||
if (!cx->route_uidx)
|
||||
cx->route_uidx++;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: libwebsockets
|
||||
Version: 4.3.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: A lightweight C library for Websockets
|
||||
License: LGPLv2 and Public Domain and BSD and MIT and zlib
|
||||
URL: https://libwebsockets.org
|
||||
@ -8,6 +8,7 @@ Source0: https://github.com/warmcat/libwebsockets/archive/v%{version}.tar
|
||||
|
||||
Patch9001: 0001-add-secure-compile-option-in-Makefile.patch
|
||||
Patch9002: 0002-solve-the-BEP-problem.patch
|
||||
Patch9003: 0003-route-extend-lws_route_uidx_t-from-1-byte-to-2-bytes.patch
|
||||
|
||||
BuildRequires: cmake openssl-devel zlib-devel libev-devel gcc gcc-c++
|
||||
|
||||
@ -98,7 +99,13 @@ find %{buildroot} -name '*_static.pc' -exec rm -f {} ';'
|
||||
%doc changelog README.md READMEs/
|
||||
|
||||
%changelog
|
||||
* Tue May 3 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-3
|
||||
* Thu May 05 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:extend lws_route_uidx_t from 1 byte to 2 bytes
|
||||
|
||||
* Tue May 03 2022 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 4.3.0-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user