mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
net/gcoap: Fix typo, replacing _uri with _proxy
This commit is contained in:
parent
9f3786e336
commit
b05ae93e4b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user