aboutsummaryrefslogtreecommitdiff
path: root/community/supertuxkart/0001-network_config-use-ns_name_uncompress.patch
blob: dc11b31f98f91917c45fa7601a390fb291b1f072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From fe82f77786d24b812b8d226195fdb196d8ecb35f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 28 Aug 2020 19:30:38 -0300
Subject: [PATCH] network_config: use ns_name_uncompress

---
 src/network/network_config.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/network_config.cpp b/src/network/network_config.cpp
index 605254808..d4e08cc5e 100644
--- a/src/network/network_config.cpp
+++ b/src/network/network_config.cpp
@@ -587,7 +587,7 @@ void NetworkConfig::fillStunList(std::vector<std::pair<std::string, int> >* l,
         for (unsigned i = 0; i < srv.size(); i++)
         {
             char server_name[512] = {};
-            if (ns_name_ntop(srv[i] + SRV_SERVER, server_name, 512) < 0)
+            if (ns_name_uncompress(response, response + response_len, srv[i] + SRV_SERVER, server_name, 512) < 0)
                 continue;
             uint16_t port = ns_get16(srv[i] + SRV_PORT);
             uint16_t weight = ns_get16(srv[i] + SRV_WEIGHT);
-- 
2.28.0