Skip to content

Commit

Permalink
Merge pull request #20561 from Teufelchen1/fix/gcoap_dns_typo
Browse files Browse the repository at this point in the history
net/gcoap: Fix typo, replacing _uri with _proxy
  • Loading branch information
miri64 authored Apr 15, 2024
2 parents 714feaf + b05ae93 commit 72817bc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sys/net/application_layer/gcoap/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 72817bc

Please sign in to comment.