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

Merge pull request #16986 from benpicco/uhcp-debug

sys/net/uhcp: use LOG_DEBUG instead of LOG_INFO
This commit is contained in:
Martine Lenders 2021-11-09 12:58:16 +01:00 committed by GitHub
commit 4b2ca7a702
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ void uhcp_handle_udp(uint8_t *buf, size_t len, uint8_t *src, uint16_t port, uhcp
{
char addr_str[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, src, addr_str, INET6_ADDRSTRLEN);
LOG_INFO("got packet from %s port %u\n", addr_str, (unsigned)port);
LOG_DEBUG("got packet from %s port %u\n", addr_str, (unsigned)port);
if (len < sizeof(uhcp_req_t)) {
LOG_ERROR("error: packet too small.\n");
@ -39,7 +39,7 @@ void uhcp_handle_udp(uint8_t *buf, size_t len, uint8_t *src, uint16_t port, uhcp
LOG_ERROR("error: wrong protocol version.\n");
}
switch(type) {
switch (type) {
#ifdef UHCP_SERVER
case UHCP_REQ:
if (len < sizeof(uhcp_req_t)) {
@ -108,7 +108,7 @@ void uhcp_handle_push(uhcp_push_t *req, uint8_t *src, uint16_t port, uhcp_iface_
inet_ntop(AF_INET6, prefix, prefix_str, INET6_ADDRSTRLEN);
LOG_INFO("uhcp: push from %s:%u prefix=%s/%u\n", addr_str, (unsigned)port,
LOG_DEBUG("uhcp: push from %s:%u prefix=%s/%u\n", addr_str, (unsigned)port,
prefix_str, req->prefix_len);
uhcp_handle_prefix(prefix, req->prefix_len, 0xFFFF, src, iface);
}

View File

@ -45,8 +45,8 @@ void uhcp_client(uhcp_iface_t iface)
uint8_t buf[sizeof(uhcp_push_t) + 16];
while(1) {
LOG_INFO("uhcp_client(): sending REQ...\n");
while (1) {
LOG_DEBUG("uhcp_client(): sending REQ...\n");
sock_udp_send(&sock, &req, sizeof(uhcp_req_t), &req_target);
res = sock_udp_recv(&sock, buf, sizeof(buf), 10U*US_PER_SEC, &remote);
if (res > 0) {