]> git.meshlink.io Git - catta/commitdiff
don't allow commiting of empty entry groups
authorLennart Poettering <lennart@poettering.net>
Mon, 30 Jan 2006 15:40:26 +0000 (15:40 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 30 Jan 2006 15:40:26 +0000 (15:40 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1117 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/entry.c

index 81ce1cd2ccd555a39e5e914b963cdf0824cb686b..eb745f208aab5e7d35959672f98603a5e74a6df9 100644 (file)
@@ -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,