--- control.c.org	2002-04-10 22:09:33.000000000 +0200
+++ control.c	2003-07-31 19:55:22.000000000 +0200
@@ -381,7 +381,7 @@
          c->needclose = -1;
          return -EINVAL;
          }  */
-        if (!strlen (t->hostname))
+        if ((!strlen (t->hostname)) && ((t->chal_us.state) || ((t->lns->challenge))))
         {
             if (DEBUG)
                 log (LOG_DEBUG,
@@ -494,7 +494,7 @@
          c->needclose = -1;
          return -EINVAL;
          } */
-        if (!strlen (t->hostname))
+        if ((!strlen (t->hostname)) && ((t->chal_them.state) || ((t->chal_us.state))))
         {
             if (DEBUG)
                 log (LOG_DEBUG,

