mDNS: change some debug line terminations to just newlines.

Some of there were using carriage-return and newline, yet the
rest of the code base consistently uses only newline.
This commit is contained in:
Our Air Quality 2019-04-03 21:31:14 +11:00 committed by Dirk Ziegelmeier
parent ec11b289cb
commit af5906370f

View File

@ -813,7 +813,7 @@ static void
mdns_debug_print_answer(struct mdns_packet *pkt, struct mdns_answer *a)
{
#ifdef LWIP_DEBUG
/* Arbitratry chose for 200 -> don't want to see more then that. It's only
/* Arbitrarily chose 200 -> don't want to see more then that. It's only
* for debug so not that important. */
char string[200];
int i;
@ -1311,7 +1311,7 @@ mdns_parse_pkt_authoritative_answers(struct netif *netif, struct mdns_packet *pk
match = reply->host_replies & check_host(netif, &ans.info, &rev_v6);
if (match) {
reply->probe_query_recv = 1;
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe for own host info received\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe for own host info received\n"));
}
for (i = 0; i < MDNS_MAX_SERVICES; i++) {
@ -1323,7 +1323,7 @@ mdns_parse_pkt_authoritative_answers(struct netif *netif, struct mdns_packet *pk
if (match) {
reply->probe_query_recv = 1;
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe for own service info received\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Probe for own service info received\n"));
}
}
}
@ -1419,7 +1419,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
/* Ignore additional answers -> do not have any need for them at the moment */
if(pkt->additional) {
LWIP_DEBUGF(MDNS_DEBUG,
("MDNS: Query contains additional answers -> they are discarded \r\n"));
("MDNS: Query contains additional answers -> they are discarded\n"));
}
/* Any replies on question? */
@ -1430,7 +1430,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
if (!rrs_to_send) {
/* This case is most common */
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Nothing to answer\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Nothing to answer\n"));
return;
}
@ -1443,13 +1443,13 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
*/
if (pkt->source_port != LWIP_IANA_PORT_MDNS) {
if (pkt->questions == 1) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: request from legacy querier\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: request from legacy querier\n"));
reply.legacy_query = 1;
reply.tx_id = pkt->tx_id;
reply.cache_flush = 0;
}
else {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: ignore query if (src UDP port != 5353) && (!= legacy query)\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: ignore query if (src UDP port != 5353) && (!= legacy query)\n"));
return;
}
}
@ -1485,7 +1485,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
delay_response = 0;
}
#endif
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: response %s delayed\r\n", (delay_response ? "randomly" : "not")));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: response %s delayed\n", (delay_response ? "randomly" : "not")));
/* Unicast / multicast response:
* Answering to (m)DNS querier via unicast response.
@ -1512,7 +1512,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
|| (reply.probe_query_recv && reply.unicast_reply_requested)) {
send_unicast = 1;
}
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: send response via %s\r\n", (send_unicast ? "unicast" : "multicast")));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: send response via %s\n", (send_unicast ? "unicast" : "multicast")));
/* Send out or put on waiting list */
if (delay_response) {
@ -1523,7 +1523,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
* - no message is in it yet
*/
if (IP_IS_V6_VAL(pkt->source_addr) && !mdns->ipv6.unicast_msg_in_use) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to unicast IPv6 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to unicast IPv6 waiting list\n"));
SMEMCPY(&mdns->ipv6.delayed_msg_unicast.dest_addr, &pkt->source_addr, sizeof(ip_addr_t));
mdns->ipv6.delayed_msg_unicast.dest_port = pkt->source_port;
@ -1539,7 +1539,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
* - no message is in it yet
*/
if (IP_IS_V4_VAL(pkt->source_addr) && !mdns->ipv4.unicast_msg_in_use) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to unicast IPv4 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to unicast IPv4 waiting list\n"));
SMEMCPY(&mdns->ipv4.delayed_msg_unicast.dest_addr, &pkt->source_addr, sizeof(ip_addr_t));
mdns->ipv4.delayed_msg_unicast.dest_port = pkt->source_port;
@ -1562,7 +1562,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
*/
if (IP_IS_V6_VAL(pkt->source_addr) && !mdns->ipv6.multicast_timeout
&& !reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to multicast IPv6 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to multicast IPv6 waiting list\n"));
mdns_add_msg_to_delayed(&mdns->ipv6.delayed_msg_multicast, &reply);
@ -1570,7 +1570,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
&mdns->ipv6.multicast_msg_waiting);
}
else if (IP_IS_V6_VAL(pkt->source_addr) && reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to probe multicast IPv6 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to probe multicast IPv6 waiting list\n"));
mdns_add_msg_to_delayed(&mdns->ipv6.delayed_msg_multicast, &reply);
@ -1588,7 +1588,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
*/
if (IP_IS_V4_VAL(pkt->source_addr) && !mdns->ipv4.multicast_timeout
&& !reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to multicast IPv4 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to multicast IPv4 waiting list\n"));
mdns_add_msg_to_delayed(&mdns->ipv4.delayed_msg_multicast, &reply);
@ -1596,7 +1596,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
&mdns->ipv4.multicast_msg_waiting);
}
else if (IP_IS_V4_VAL(pkt->source_addr) && reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to probe multicast IPv4 waiting list\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: add answers to probe multicast IPv4 waiting list\n"));
mdns_add_msg_to_delayed(&mdns->ipv4.delayed_msg_multicast, &reply);
@ -1613,10 +1613,10 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
/* send answer directly via unicast */
res = mdns_send_outpacket(&reply, netif);
if (res != ERR_OK) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Unicast answer could not be send\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Unicast answer could not be send\n"));
}
else {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Unicast answer send successfully\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Unicast answer send successfully\n"));
}
return;
}
@ -1625,7 +1625,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
#if LWIP_IPV6
if (IP_IS_V6_VAL(pkt->source_addr)) {
if (mdns->ipv6.multicast_timeout && !reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: we just multicasted, ignore question\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: we just multicasted, ignore question\n"));
return;
}
SMEMCPY(&reply.dest_addr, &v6group, sizeof(ip_addr_t));
@ -1634,7 +1634,7 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
#if LWIP_IPV4
if (IP_IS_V4_VAL(pkt->source_addr)) {
if (mdns->ipv4.multicast_timeout && !reply.probe_query_recv) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: we just multicasted, ignore question\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: we just multicasted, ignore question\n"));
return;
}
SMEMCPY(&reply.dest_addr, &v4group, sizeof(ip_addr_t));
@ -1644,10 +1644,10 @@ mdns_handle_question(struct mdns_packet *pkt, struct netif *netif)
/* send answer directly via multicast */
res = mdns_send_outpacket(&reply, netif);
if (res != ERR_OK) {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Multicast answer could not be send\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Multicast answer could not be send\n"));
}
else {
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Multicast answer send successfully\r\n"));
LWIP_DEBUGF(MDNS_DEBUG, ("MDNS: Multicast answer send successfully\n"));
#if LWIP_IPV6
if (IP_IS_V6_VAL(pkt->source_addr)) {
mdns_start_multicast_timeouts_ipv6(netif);
@ -2527,7 +2527,7 @@ mdns_search_stop(s8_t request_id)
* for others ("_udp")
* @param netif The network interface where to send search request
* @param result_fn Callback to send answer received. Will be called for each answer of a
* responce frame matching request sent
* response frame matching request sent.
* @param arg Userdata pointer for result_fn
* @param request_id Returned request identifier to allow stop it.
* @return ERR_OK if the search request was created and sent, an err_t otherwise