summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-30 15:40:26 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-30 15:40:26 +0000
commitf291103ee02ce36cb12d443dee8dc3a701661d98 (patch)
tree46b37d23c972f8ba10ab0328d3088c2120fbd0c0 /avahi-core
parenta175f7e7e86c8540e74e679eeecd18f036f20a8c (diff)
don't allow commiting of empty entry groups
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1117 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/entry.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
index 81ce1cd..eb745f2 100644
--- a/avahi-core/entry.c
+++ b/avahi-core/entry.c
@@ -1113,6 +1113,9 @@ int avahi_s_entry_group_commit(AvahiSEntryGroup *g) {
if (g->state != AVAHI_ENTRY_GROUP_UNCOMMITED && g->state != AVAHI_ENTRY_GROUP_COLLISION)
return avahi_server_set_errno(g->server, AVAHI_ERR_BAD_STATE);
+ if (avahi_s_entry_group_is_empty(g))
+ return avahi_server_set_errno(g->server, AVAHI_ERR_BAD_STATE);
+
g->n_register_try++;
avahi_timeval_add(&g->register_time,