]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TRUCLUSTER support: isc_interfaceiter_first() should set clua_context.
authorMark Andrews <marka@isc.org>
Tue, 2 Jul 2002 05:51:43 +0000 (05:51 +0000)
committerMark Andrews <marka@isc.org>
Tue, 2 Jul 2002 05:51:43 +0000 (05:51 +0000)
lib/isc/unix/ifiter_ioctl.c
lib/isc/unix/interfaceiter.c

index 961d265bff4ff738ecc0c851f17962f2194f28ae..79d501271b73f71ba96746b67b200c46893f9b19 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ifiter_ioctl.c,v 1.31 2002/07/01 23:00:37 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.32 2002/07/02 05:51:42 marka Exp $ */
 
 /*
  * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -152,9 +152,6 @@ getbuf4(isc_interfaceiter_t *iter) {
  unexpected:
        isc_mem_put(iter->mctx, iter->buf, iter->bufsize);
        iter->buf = NULL;
-#ifdef HAVE_TRUCLUSTER
-       iter->clua_context = 0;
-#endif
        return (ISC_R_UNEXPECTED);
 }
 
@@ -317,6 +314,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
         * A newly created iterator has an undefined position
         * until isc_interfaceiter_first() is called.
         */
+       iter->clua_context = -1;
        iter->pos = (unsigned int) -1;
        iter->result = ISC_R_FAILURE;
 
index 3ffd2ddd29016e68617fea99dbb9e65b0669a298..0f9734c788b2bff4f0d226b009798214478bb6f5 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: interfaceiter.c,v 1.26 2002/07/01 23:00:38 marka Exp $ */
+/* $Id: interfaceiter.c,v 1.27 2002/07/02 05:51:43 marka Exp $ */
 
 #include <config.h>
 
@@ -109,6 +109,9 @@ isc_interfaceiter_first(isc_interfaceiter_t *iter) {
        REQUIRE(VALID_IFITER(iter));
 
        iter->pos = 0;
+#ifdef HAVE_TRUCLUSTER
+       iter->clua_context = 0;
+#endif
        for (;;) {
                result = internal_current(iter);
                if (result != ISC_R_IGNORE)