From f291103ee02ce36cb12d443dee8dc3a701661d98 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 30 Jan 2006 15:40:26 +0000 Subject: [PATCH] don't allow commiting of empty entry groups git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1117 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/entry.c | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.39.5