]> git.meshlink.io Git - catta/commitdiff
* cap query interval for continious queries to 1h
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Jun 2005 20:33:36 +0000 (20:33 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 28 Jun 2005 20:33:36 +0000 (20:33 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@150 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/browse.c
todo

index 10d71cbc514f9a9ba66c825989ec1ebedeae5a5d..d9da80cf2fa0d156635f339f996d792769096be7 100644 (file)
@@ -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 0be5a5e2d4c84ea3cdbdeeb999eefaa9de3a231e..4bee34e92e727a70810f57224c97e121e965b9bb 100644 (file)
--- 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