masqmail

diff src/deliver.c @ 311:e230bcd0f1c6

removed protocol option from route config It was somehow redundant. Now, if `pipe' is set, the protocol will be pipe, otherwise it'll be smtp. That's just natural.
author meillo@marmaro.de
date Sun, 24 Apr 2011 19:37:56 +0200
parents f10a56dc7481
children c98aa884d2cb
line diff
     1.1 --- a/src/deliver.c	Sun Apr 24 19:14:38 2011 +0200
     1.2 +++ b/src/deliver.c	Sun Apr 24 19:37:56 2011 +0200
     1.3 @@ -268,11 +268,6 @@
     1.4  
     1.5  	DEBUG(5) debugf("deliver_msglist_host_pipe entered\n");
     1.6  
     1.7 -	if (route->pipe == NULL) {
     1.8 -		logwrite(LOG_ALERT, "no pipe command given for route (protocol is pipe!)\n");
     1.9 -		return FALSE;
    1.10 -	}
    1.11 -
    1.12  	foreach(msgout_list, msgout_node) {
    1.13  		msg_out *msgout = (msg_out *) (msgout_node->data);
    1.14  		gboolean flag, ok_fail = FALSE;
    1.15 @@ -475,11 +470,12 @@
    1.16  gboolean
    1.17  deliver_msglist_host(connect_route * route, GList * msgout_list, gchar * host, GList * res_list)
    1.18  {
    1.19 -	DEBUG(5) debugf("protocol = %s\n", route->protocol);
    1.20  
    1.21 -	if (strcmp(route->protocol, "pipe") == 0) {
    1.22 +	if (route->pipe) {
    1.23 +		DEBUG(5) debugf("with pipe\n");
    1.24  		return deliver_msglist_host_pipe(route, msgout_list, host, res_list);
    1.25  	} else {
    1.26 +		DEBUG(5) debugf("with smtp\n");
    1.27  		return deliver_msglist_host_smtp(route, msgout_list, host, res_list);
    1.28  	}
    1.29  }