smtp_get_interface(uschar *istring, int host_af, address_item *addr,
BOOL *changed, uschar **interface, uschar *msg)
{
-uschar *expint;
+const uschar * expint;
uschar *iface;
int sep = 0;
timeout timeout value or 0
keepalive TRUE to use keepalive
dscp DSCP value to assign to socket
+ event event expansion
Returns: connected socket number, or -1 with errno set
*/
int
smtp_connect(host_item *host, int host_af, int port, uschar *interface,
- int timeout, BOOL keepalive, const uschar *dscp)
+ int timeout, BOOL keepalive, const uschar *dscp
+#ifdef EXPERIMENTAL_EVENT
+ , uschar * event
+#endif
+ )
{
int on = 1;
int save_errno = 0;
host->address, port, interface);
}
+#ifdef EXPERIMENTAL_EVENT
+ deliver_host_address = host->address;
+ deliver_host_port = port;
+ if (event_raise(event, US"tcp:connect", NULL)) return -1;
+ /* Logging? Debug? */
+#endif
+
/* Create the socket */
if ((sock = ip_socket(SOCK_STREAM, host_af)) < 0) return -1;