changeset 372:b0708fac99dd

Fixed a problem with psb->remote_host, introduced in changeset 412385b57dc4
author markus schnalke <meillo@marmaro.de>
date Tue, 25 Oct 2011 14:31:28 +0200
parents f122535c589e
children 4cab237ce923
files src/deliver.c src/smtp_out.c src/smtp_out.h
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/deliver.c	Tue Oct 25 13:51:43 2011 +0200
+++ b/src/deliver.c	Tue Oct 25 14:31:28 2011 +0200
@@ -368,7 +368,10 @@
 	}
 
 	if (route->wrapper) {
-		psb = smtp_out_open_child(route->wrapper, host);
+		psb = smtp_out_open_child(route->wrapper);
+		if (psb) {
+			psb->remote_host = host;
+		}
 	} else {
 		psb = smtp_out_open(host, port, res_list);
 	}
--- a/src/smtp_out.c	Tue Oct 25 13:51:43 2011 +0200
+++ b/src/smtp_out.c	Tue Oct 25 14:31:28 2011 +0200
@@ -511,13 +511,12 @@
 }
 
 smtp_base*
-smtp_out_open_child(gchar *cmd, char *host)
+smtp_out_open_child(gchar *cmd)
 {
 	smtp_base *psb;
 	gint sock;
 
 	DEBUG(5) debugf("smtp_out_open_child entered, cmd = %s\n", cmd);
-	psb->remote_host = host;
 	sock = child(cmd);
 	if (sock <= 0) {
 		return NULL;
--- a/src/smtp_out.h	Tue Oct 25 13:51:43 2011 +0200
+++ b/src/smtp_out.h	Tue Oct 25 14:31:28 2011 +0200
@@ -76,7 +76,7 @@
 gboolean set_auth(smtp_base *psb, gchar *name, gchar *login, gchar *secret);
 void destroy_smtpbase(smtp_base *psb);
 smtp_base *smtp_out_open(gchar *host, gint port, GList *resolve_list);
-smtp_base *smtp_out_open_child(gchar *cmd, char *host);
+smtp_base *smtp_out_open_child(gchar *cmd);
 gboolean smtp_out_rset(smtp_base *psb);
 gboolean smtp_out_init(smtp_base *psb, gboolean instant_helo);
 gint smtp_out_msg(smtp_base *psb, message *msg, address *return_path, GList *rcpt_list, GList *hdr_list);