1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20561 from Teufelchen1/fix/gcoap_dns_typo

net/gcoap: Fix typo, replacing _uri with _proxy
This commit is contained in:
Martine Lenders 2024-04-15 13:26:56 +00:00 committed by GitHub
commit 72817bc85c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,6 +30,7 @@
#include "net/sock/udp.h"
#include "net/sock/util.h"
#include "random.h"
#include "string_utils.h"
#include "uri_parser.h"
#include "ut_process.h"
@ -316,14 +317,10 @@ ssize_t gcoap_dns_server_proxy_get(char *proxy, size_t proxy_len)
ssize_t res = 0;
mutex_lock(&_client_mutex);
if (_dns_server_uri_isset()) {
res = strlen(_uri);
if (((size_t)res + 1) > proxy_len) {
/* account for trailing \0 */
res = strscpy(proxy, _proxy, proxy_len);
if (res == -E2BIG) {
res = -ENOBUFS;
}
else {
strcpy(proxy, _proxy);
}
}
mutex_unlock(&_client_mutex);
return res;