@@ -1395,11 +1395,18 @@ namespace MDNSImplementation
1395
1395
{
1396
1396
if ((bResult = _sendHostProbe ()))
1397
1397
{
1398
- DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1399
- PSTR (" [MDNSResponder] _updateProbeStatus: Did sent host probe\n\n " )););
1400
- m_HostProbeInformation.m_Timeout .reset (MDNS_PROBE_DELAY);
1401
- ++m_HostProbeInformation.m_u8SentCount ;
1398
+ DEBUG_EX_INFO (
1399
+ DEBUG_OUTPUT.printf_P (PSTR (" [MDNSResponder] _updateProbeStatus: Did sent "
1400
+ " host probe to all links \n\n " )););
1401
+ }
1402
+ else
1403
+ {
1404
+ DEBUG_EX_INFO (
1405
+ DEBUG_OUTPUT.printf_P (PSTR (" [MDNSResponder] _updateProbeStatus: Did not "
1406
+ " sent host probe to all links\n\n " )););
1402
1407
}
1408
+ m_HostProbeInformation.m_Timeout .reset (MDNS_PROBE_DELAY);
1409
+ ++m_HostProbeInformation.m_u8SentCount ;
1403
1410
}
1404
1411
else // Probing finished
1405
1412
{
@@ -1422,23 +1429,22 @@ namespace MDNSImplementation
1422
1429
else if ((ProbingStatus_Done == m_HostProbeInformation.m_ProbingStatus )
1423
1430
&& (m_HostProbeInformation.m_Timeout .expired ()))
1424
1431
{
1425
- if ((bResult = _announce (true , false ))) // Don't announce services here
1426
- {
1427
- ++m_HostProbeInformation.m_u8SentCount ;
1432
+ _announce (true , false ); // Don't announce services here
1428
1433
1429
- if (MDNS_ANNOUNCE_COUNT > m_HostProbeInformation.m_u8SentCount )
1430
- {
1431
- m_HostProbeInformation.m_Timeout .reset (MDNS_ANNOUNCE_DELAY);
1432
- DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1433
- PSTR (" [MDNSResponder] _updateProbeStatus: Announcing host (%d).\n\n " ),
1434
- m_HostProbeInformation.m_u8SentCount ););
1435
- }
1436
- else
1437
- {
1438
- m_HostProbeInformation.m_Timeout .resetToNeverExpires ();
1439
- DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1440
- PSTR (" [MDNSResponder] _updateProbeStatus: Done host announcing.\n\n " )););
1441
- }
1434
+ ++m_HostProbeInformation.m_u8SentCount ;
1435
+
1436
+ if (MDNS_ANNOUNCE_COUNT > m_HostProbeInformation.m_u8SentCount )
1437
+ {
1438
+ m_HostProbeInformation.m_Timeout .reset (MDNS_ANNOUNCE_DELAY);
1439
+ DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1440
+ PSTR (" [MDNSResponder] _updateProbeStatus: Announcing host (%d).\n\n " ),
1441
+ m_HostProbeInformation.m_u8SentCount ););
1442
+ }
1443
+ else
1444
+ {
1445
+ m_HostProbeInformation.m_Timeout .resetToNeverExpires ();
1446
+ DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1447
+ PSTR (" [MDNSResponder] _updateProbeStatus: Done host announcing.\n\n " )););
1442
1448
}
1443
1449
}
1444
1450
@@ -1464,12 +1470,21 @@ namespace MDNSImplementation
1464
1470
if ((bResult = _sendServiceProbe (*pService)))
1465
1471
{
1466
1472
DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1467
- PSTR (" [MDNSResponder] _updateProbeStatus: Did sent service probe "
1473
+ PSTR (" [MDNSResponder] _updateProbeStatus: Did sent service probe to "
1474
+ " all links "
1468
1475
" (%u)\n\n " ),
1469
1476
(pService->m_ProbeInformation .m_u8SentCount + 1 )););
1470
- pService->m_ProbeInformation .m_Timeout .reset (MDNS_PROBE_DELAY);
1471
- ++pService->m_ProbeInformation .m_u8SentCount ;
1472
1477
}
1478
+ else
1479
+ {
1480
+ DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1481
+ PSTR (" [MDNSResponder] _updateProbeStatus: Did not sent service probe "
1482
+ " to all links"
1483
+ " (%u)\n\n " ),
1484
+ (pService->m_ProbeInformation .m_u8SentCount + 1 )););
1485
+ }
1486
+ pService->m_ProbeInformation .m_Timeout .reset (MDNS_PROBE_DELAY);
1487
+ ++pService->m_ProbeInformation .m_u8SentCount ;
1473
1488
}
1474
1489
else // Probing finished
1475
1490
{
@@ -1495,28 +1510,27 @@ namespace MDNSImplementation
1495
1510
else if ((ProbingStatus_Done == pService->m_ProbeInformation .m_ProbingStatus )
1496
1511
&& (pService->m_ProbeInformation .m_Timeout .expired ()))
1497
1512
{
1498
- if ((bResult = _announceService (*pService))) // Announce service
1499
- {
1500
- ++pService->m_ProbeInformation .m_u8SentCount ;
1513
+ _announceService (*pService); // Announce service
1501
1514
1502
- if (MDNS_ANNOUNCE_COUNT > pService->m_ProbeInformation .m_u8SentCount )
1503
- {
1504
- pService->m_ProbeInformation .m_Timeout .reset (MDNS_ANNOUNCE_DELAY);
1505
- DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1506
- PSTR (" [MDNSResponder] _updateProbeStatus: Announcing service %s.%s.%s "
1507
- " (%d)\n\n " ),
1508
- (pService->m_pcName ?: m_pcHostname), pService->m_pcService ,
1509
- pService->m_pcProtocol , pService->m_ProbeInformation .m_u8SentCount ););
1510
- }
1511
- else
1512
- {
1513
- pService->m_ProbeInformation .m_Timeout .resetToNeverExpires ();
1514
- DEBUG_EX_INFO (
1515
- DEBUG_OUTPUT.printf_P (PSTR (" [MDNSResponder] _updateProbeStatus: Done "
1516
- " service announcing for %s.%s.%s\n\n " ),
1517
- (pService->m_pcName ?: m_pcHostname),
1518
- pService->m_pcService , pService->m_pcProtocol ););
1519
- }
1515
+ ++pService->m_ProbeInformation .m_u8SentCount ;
1516
+
1517
+ if (MDNS_ANNOUNCE_COUNT > pService->m_ProbeInformation .m_u8SentCount )
1518
+ {
1519
+ pService->m_ProbeInformation .m_Timeout .reset (MDNS_ANNOUNCE_DELAY);
1520
+ DEBUG_EX_INFO (DEBUG_OUTPUT.printf_P (
1521
+ PSTR (" [MDNSResponder] _updateProbeStatus: Announcing service %s.%s.%s "
1522
+ " (%d)\n\n " ),
1523
+ (pService->m_pcName ?: m_pcHostname), pService->m_pcService ,
1524
+ pService->m_pcProtocol , pService->m_ProbeInformation .m_u8SentCount ););
1525
+ }
1526
+ else
1527
+ {
1528
+ pService->m_ProbeInformation .m_Timeout .resetToNeverExpires ();
1529
+ DEBUG_EX_INFO (
1530
+ DEBUG_OUTPUT.printf_P (PSTR (" [MDNSResponder] _updateProbeStatus: Done "
1531
+ " service announcing for %s.%s.%s\n\n " ),
1532
+ (pService->m_pcName ?: m_pcHostname),
1533
+ pService->m_pcService , pService->m_pcProtocol ););
1520
1534
}
1521
1535
}
1522
1536
}
0 commit comments