From: Ted Lemon Date: Wed, 6 Oct 1999 19:07:58 +0000 (+0000) Subject: Fix a glitch in the code to stuff statements into a host's group. X-Git-Tag: BCTEL_SPECIAL_19991124~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67c52770669dbaa68a1c1263433fd587ac6a8072;p=thirdparty%2Fdhcp.git Fix a glitch in the code to stuff statements into a host's group. --- diff --git a/server/omapi.c b/server/omapi.c index 508781e87..7e632573a 100644 --- a/server/omapi.c +++ b/server/omapi.c @@ -29,7 +29,7 @@ #ifndef lint static char copyright[] = -"$Id: omapi.c,v 1.11 1999/10/05 02:48:09 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: omapi.c,v 1.12 1999/10/06 19:07:58 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1070,8 +1070,9 @@ isc_result_t dhcp_host_set_value (omapi_object_t *h, if (!host -> group) host -> group = clone_group (&root_group, "dhcp_host_set_value"); - if (host -> named_group && - host -> group == host -> named_group -> group) { + if (host -> group == &root_group || + (host -> named_group && + host -> named_group -> group == host -> group)) { host -> group = clone_group (host -> group, "dhcp_host_set_value"); }