New $callout_address variable to record spamd (etc) address. Bug 1652
[exim.git] / src / src / ip.c
index 2d717051e52083ef311a46edd34c77afa6b1e08e..1e3875aef51e388034af1c3f68d3bf805ab9b220 100644 (file)
@@ -237,7 +237,11 @@ if (running_in_test_harness  && save_errno == ECONNREFUSED && timeout == 999999)
 
 /* Success */
 
-if (rc >= 0) return 0;
+if (rc >= 0)
+  {
+  callout_address = string_sprintf("[%s]:%d", address, port);
+  return 0;
+  }
 
 /* A failure whose error code is "Interrupted system call" is in fact
 an externally applied timeout if the signal handler has been run. */
@@ -400,6 +404,7 @@ if (connect(sock, (struct sockaddr *) &server, sizeof(server)) < 0)
                path, strerror(err));
   return -1;
   }
+callout_address = string_copy(path);
 return sock;
 }