Fix testcase 0373
[users/jgh/exim.git] / src / src / expand.c
index 9afc036fa1e6141ef51817ae34914214537802fa..b02ea30a29fb4b183128c6b6b2cddc8829af10d0 100644 (file)
@@ -4667,6 +4667,9 @@ while (*s != 0)
 
         DEBUG(D_expand) debug_printf("connected to socket %s\n", sub_arg[0]);
 
+       /* Allow sequencing of test actions */
+       if (running_in_test_harness) millisleep(100);
+
         /* Write the request string, if not empty */
 
         if (sub_arg[1][0] != 0)
@@ -4690,6 +4693,8 @@ while (*s != 0)
         shutdown(fd, SHUT_WR);
         #endif
 
+       if (running_in_test_harness) millisleep(100);
+
         /* Now we need to read from the socket, under a timeout. The function
         that reads a file can be used. */
 
@@ -5762,6 +5767,7 @@ while (*s != 0)
            s = s1+1;
            break;
            }
+         vp = NULL;
          }
         /*FALLTHROUGH*/
 #endif