MacOS: TCP Fast Open
[exim.git] / src / src / expand.c
index adc90f63393808328ceb8db93d12fb8f75768727..49e09ecd8e9c3480ec87e9e12847b45015b62fb4 100644 (file)
@@ -5021,6 +5021,7 @@ while (*s != 0)
             port = ntohs(service_info->s_port);
             }
 
+         /*XXX we trust that the request is idempotent.  Hmm. */
          fd = ip_connectedsocket(SOCK_STREAM, server_name, port, port,
                  timeout, &host, &expand_string_message,
                  do_tls ? NULL : &reqstr);
@@ -5051,9 +5052,9 @@ while (*s != 0)
          server_name = US sockun.sun_path;
 
           sigalrm_seen = FALSE;
-          alarm(timeout);
+          ALARM(timeout);
           rc = connect(fd, (struct sockaddr *)(&sockun), sizeof(sockun));
-          alarm(0);
+          ALARM_CLR(0);
           if (sigalrm_seen)
             {
             expand_string_message = US "socket connect timed out";
@@ -5126,13 +5127,13 @@ while (*s != 0)
        if (!tls_ctx)
          fp = fdopen(fd, "rb");
         sigalrm_seen = FALSE;
-        alarm(timeout);
+        ALARM(timeout);
         yield =
 #ifdef SUPPORT_TLS
          tls_ctx ? cat_file_tls(tls_ctx, yield, sub_arg[3]) :
 #endif
                    cat_file(fp, yield, sub_arg[3]);
-        alarm(0);
+        ALARM_CLR(0);
 
 #ifdef SUPPORT_TLS
        if (tls_ctx)
@@ -5265,9 +5266,9 @@ while (*s != 0)
        resetok = FALSE;
         f = fdopen(fd_out, "rb");
         sigalrm_seen = FALSE;
-        alarm(60);
+        ALARM(60);
        lookup_value = string_from_gstring(cat_file(f, NULL, NULL));
-        alarm(0);
+        ALARM_CLR(0);
         (void)fclose(f);
 
         /* Wait for the process to finish, applying the timeout, and inspect its
@@ -5811,7 +5812,7 @@ while (*s != 0)
                }
              if (Ustrcmp(item, sub[0]) == 0)   /*XXX should be a UTF8-compare */
                {
-               s = item + strlen(item) + 1;
+               s = item + Ustrlen(item) + 1;
                while (isspace(*s)) s++;
                if (*s != ':')
                  {