From f93c4009fd022577c8fe989343172b849e792aa2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 28 Jun 2005 20:33:36 +0000 Subject: [PATCH] * cap query interval for continious queries to 1h git-svn-id: file:///home/lennart/svn/public/avahi/trunk@150 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/browse.c | 8 ++++---- todo | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/avahi-core/browse.c b/avahi-core/browse.c index 10d71cb..d9da80c 100644 --- a/avahi-core/browse.c +++ b/avahi-core/browse.c @@ -33,7 +33,6 @@ struct AvahiRecordBrowser { AvahiKey *key; gint interface; guchar protocol; - gint n_query; guint sec_delay; AvahiTimeEvent *time_event; @@ -55,8 +54,10 @@ static void elapse(AvahiTimeEvent *e, void *userdata) { avahi_server_post_query(s->server, s->interface, s->protocol, s->key); - if (s->n_query++ <= 8) - s->sec_delay *= 2; + s->sec_delay *= 2; + + if (s->sec_delay >= 60*60) /* 1h */ + s->sec_delay = 60*60; /* avahi_log_debug("%i. Continuous querying for %s", s->n_query, t = avahi_key_to_string(s->key)); */ /* g_free(t); */ @@ -132,7 +133,6 @@ AvahiRecordBrowser *avahi_record_browser_new(AvahiServer *server, gint interface b->protocol = protocol; b->callback = callback; b->userdata = userdata; - b->n_query = 1; b->sec_delay = 1; avahi_server_post_query(b->server, b->interface, b->protocol, b->key); diff --git a/todo b/todo index 0be5a5e..4bee34e 100644 --- a/todo +++ b/todo @@ -1,7 +1,6 @@ todo: * release! * support for special domain PTR records based on local IP subnet address -* Introduce AvahiProtocol * drop trailing dot on avahi_normalize_name() * c++ support -- 2.39.5