comparison 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
comparison
equal deleted inserted replaced
310:f10a56dc7481 311:e230bcd0f1c6
265 { 265 {
266 gboolean ok = TRUE; 266 gboolean ok = TRUE;
267 GList *msgout_node; 267 GList *msgout_node;
268 268
269 DEBUG(5) debugf("deliver_msglist_host_pipe entered\n"); 269 DEBUG(5) debugf("deliver_msglist_host_pipe entered\n");
270
271 if (route->pipe == NULL) {
272 logwrite(LOG_ALERT, "no pipe command given for route (protocol is pipe!)\n");
273 return FALSE;
274 }
275 270
276 foreach(msgout_list, msgout_node) { 271 foreach(msgout_list, msgout_node) {
277 msg_out *msgout = (msg_out *) (msgout_node->data); 272 msg_out *msgout = (msg_out *) (msgout_node->data);
278 gboolean flag, ok_fail = FALSE; 273 gboolean flag, ok_fail = FALSE;
279 message *msg = msgout->msg; 274 message *msg = msgout->msg;
473 } 468 }
474 469
475 gboolean 470 gboolean
476 deliver_msglist_host(connect_route * route, GList * msgout_list, gchar * host, GList * res_list) 471 deliver_msglist_host(connect_route * route, GList * msgout_list, gchar * host, GList * res_list)
477 { 472 {
478 DEBUG(5) debugf("protocol = %s\n", route->protocol); 473
479 474 if (route->pipe) {
480 if (strcmp(route->protocol, "pipe") == 0) { 475 DEBUG(5) debugf("with pipe\n");
481 return deliver_msglist_host_pipe(route, msgout_list, host, res_list); 476 return deliver_msglist_host_pipe(route, msgout_list, host, res_list);
482 } else { 477 } else {
478 DEBUG(5) debugf("with smtp\n");
483 return deliver_msglist_host_smtp(route, msgout_list, host, res_list); 479 return deliver_msglist_host_smtp(route, msgout_list, host, res_list);
484 } 480 }
485 } 481 }
486 482
487 /* 483 /*