[LEDE-DEV] [PATCH] umdns: Add debug output for service_timeout

Philipp Meier philipp.meier at neratec.com
Tue Sep 26 02:01:45 PDT 2017


Debug output for case where no response is sent out due to service_timeout.
This would have saved me some ours in finding out why an mDNS query did 
not get any response.

Signed-off-by: Philipp Meier <philipp.meier at neratec.com>
---
  service.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/service.c b/service.c
index 0a9e25d..97b6f91 100644
--- a/service.c
+++ b/service.c
@@ -121,8 +121,10 @@ service_timeout(struct service *s)
  {
          time_t t = monotonic_time();

-        if (t - s->t <= TOUT_LOOKUP)
+        if (t - s->t <= TOUT_LOOKUP) {
+                DBG(2, "t=%lu, s->t=%lu, t - s->t = %lu\n", t, s->t, t 
- s->t);
                  return 0;
+        }

          return t;
  }
-- 
2.7.4



More information about the Lede-dev mailing list