summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-03 22:25:32 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-03 22:25:32 +0000
commitc38b02743d3a21112947af6689f34c1f00853c05 (patch)
treef0107adee4f39baae057db397b33b16838bf1c3b
parentb78eacbd64af799754684e3fe3569f0ba4ec92f3 (diff)
* drop AVAHI_ENTRY_GROUP_SLEEPING
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@218 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-core/core.h3
-rw-r--r--avahi-core/server.c10
-rw-r--r--avahi-utils/Makefile.am5
-rw-r--r--avahi-utils/avahi/__init__.py2
-rw-r--r--configure.ac1
5 files changed, 12 insertions, 9 deletions
diff --git a/avahi-core/core.h b/avahi-core/core.h
index aa6b809..25e9c0a 100644
--- a/avahi-core/core.h
+++ b/avahi-core/core.h
@@ -83,8 +83,7 @@ typedef enum {
AVAHI_ENTRY_GROUP_UNCOMMITED = -1, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */
AVAHI_ENTRY_GROUP_REGISTERING = 0, /**< The entries of the group are currently being registered */
AVAHI_ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */
- AVAHI_ENTRY_GROUP_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
- AVAHI_ENTRY_GROUP_SLEEPING /**< Rate limiting of probe packets is active */
+ AVAHI_ENTRY_GROUP_COLLISION /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
} AvahiEntryGroupState;
/** Prototype for callback functions which are called whenever the state of an AvahiServer object changes */
diff --git a/avahi-core/server.c b/avahi-core/server.c
index e3929db..18459b6 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -1131,10 +1131,12 @@ void avahi_host_rr_entry_group_callback(AvahiServer *s, AvahiEntryGroup *g, Avah
if (state == AVAHI_ENTRY_GROUP_REGISTERING &&
s->state == AVAHI_SERVER_REGISTERING)
avahi_server_increase_host_rr_pending(s);
+
else if (state == AVAHI_ENTRY_GROUP_COLLISION &&
(s->state == AVAHI_SERVER_REGISTERING || s->state == AVAHI_SERVER_RUNNING)) {
withdraw_host_rrs(s);
server_set_state(s, AVAHI_SERVER_COLLISION);
+
} else if (state == AVAHI_ENTRY_GROUP_ESTABLISHED &&
s->state == AVAHI_SERVER_REGISTERING)
avahi_server_decrease_host_rr_pending(s);
@@ -2011,7 +2013,7 @@ static void entry_group_register_time_event_callback(AvahiTimeEvent *e, gpointer
AvahiEntryGroup *g = userdata;
g_assert(g);
- avahi_log_debug("Holdoff passed, waking up and going on.");
+/* avahi_log_debug("Holdoff passed, waking up and going on."); */
avahi_time_event_queue_remove(g->server->time_event_queue, g->register_time_event);
g->register_time_event = NULL;
@@ -2040,14 +2042,14 @@ gint avahi_entry_group_commit(AvahiEntryGroup *g) {
if (avahi_timeval_compare(&g->register_time, &now) <= 0) {
/* Holdoff time passed, so let's start probing */
- avahi_log_debug("Holdoff passed, directly going on.");
+/* avahi_log_debug("Holdoff passed, directly going on."); */
entry_group_commit_real(g);
} else {
- avahi_log_debug("Holdoff not passed, sleeping.");
+/* avahi_log_debug("Holdoff not passed, sleeping."); */
/* Holdoff time has not yet passed, so let's wait */
- avahi_entry_group_change_state(g, AVAHI_ENTRY_GROUP_SLEEPING);
+ avahi_entry_group_change_state(g, AVAHI_ENTRY_GROUP_REGISTERING);
g_assert(!g->register_time_event);
g->register_time_event = avahi_time_event_queue_add(g->server->time_event_queue, &g->register_time, entry_group_register_time_event_callback, g);
diff --git a/avahi-utils/Makefile.am b/avahi-utils/Makefile.am
index ef70928..54ac083 100644
--- a/avahi-utils/Makefile.am
+++ b/avahi-utils/Makefile.am
@@ -20,6 +20,9 @@
SUBDIRS=avahi
avahiscriptsdir = $(bindir)
+
+if HAVE_PYTHON
avahiscripts_SCRIPTS = avahi-publish-address avahi-publish-service avahi-dump-all
+endif
-EXTRA_DIST = $(avahiscripts_SCRIPTS)
+EXTRA_DITS = avahi-publish-address.in avahi-publish-service.in avahi-dump-all.in
diff --git a/avahi-utils/avahi/__init__.py b/avahi-utils/avahi/__init__.py
index 831c173..c68e177 100644
--- a/avahi-utils/avahi/__init__.py
+++ b/avahi-utils/avahi/__init__.py
@@ -22,7 +22,7 @@ import socket
SERVER_INVALID, SERVER_REGISTERING, SERVER_RUNNING, SERVER_COLLISION = range(-1, 3)
-ENTRY_GROUP_UNCOMMITED, ENTRY_GROUP_REGISTERING, ENTRY_GROUP_ESTABLISHED, ENTRY_GROUP_COLLISION, ENTRY_GROUP_SLEEPING = range(-1, 4)
+ENTRY_GROUP_UNCOMMITED, ENTRY_GROUP_REGISTERING, ENTRY_GROUP_ESTABLISHED, ENTRY_GROUP_COLLISION = range(-1, 3)
DOMAIN_BROWSER_REGISTER, DOMAIN_BROWSER_REGISTER_DEFAULT, DOMAIN_BROWSER_BROWSE, DOMAIN_BROWSER_BROWSE_DEFAULT, DOMAIN_BROWSER_BROWSE_LEGACY = range(0, 5)
diff --git a/configure.ac b/configure.ac
index 8b6d4d3..65d771f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,7 +216,6 @@ avahi_socket="${avahi_runtime_dir}/avahi-daemon/socket"
AC_SUBST(avahi_runtime_dir)
AC_SUBST(avahi_socket)
-HAVE_PYTHON=fuck
AM_PATH_PYTHON(2.4, [HAVE_PYTHON=yes], [HAVE_PYTHON=no])
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = xyes ])