comparison src/conf.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 55b7bde95d37
comparison
equal deleted inserted replaced
310:f10a56dc7481 311:e230bcd0f1c6
618 DEBUG(5) debugf("read_route, filename = %s\n", filename); 618 DEBUG(5) debugf("read_route, filename = %s\n", filename);
619 619
620 route->filename = g_strdup(filename); 620 route->filename = g_strdup(filename);
621 route->name = g_strdup(filename); /* quick hack */ 621 route->name = g_strdup(filename); /* quick hack */
622 622
623 route->protocol = g_strdup("smtp");
624 route->expand_h_sender_address = TRUE; 623 route->expand_h_sender_address = TRUE;
625 624
626 route->is_local_net = is_local_net; 625 route->is_local_net = is_local_net;
627 626
628 route->do_pipelining = TRUE; 627 route->do_pipelining = TRUE;
633 return NULL; 632 return NULL;
634 } 633 }
635 634
636 gchar lval[256], rval[2048]; 635 gchar lval[256], rval[2048];
637 while (read_statement(in, lval, 256, rval, 2048)) { 636 while (read_statement(in, lval, 256, rval, 2048)) {
638 if (strcmp(lval, "protocol") == 0) 637 if (strcmp(lval, "mail_host") == 0)
639 route->protocol = g_strdup(rval);
640 else if (strcmp(lval, "mail_host") == 0)
641 route->mail_host = parse_interface(rval, 25); 638 route->mail_host = parse_interface(rval, 25);
642 else if (strcmp(lval, "helo_name") == 0) 639 else if (strcmp(lval, "helo_name") == 0)
643 route->helo_name = g_strdup(rval); 640 route->helo_name = g_strdup(rval);
644 else if (strcmp(lval, "wrapper") == 0) 641 else if (strcmp(lval, "wrapper") == 0)
645 route->wrapper = g_strdup(rval); 642 route->wrapper = g_strdup(rval);
801 void 798 void
802 destroy_route(connect_route * r) 799 destroy_route(connect_route * r)
803 { 800 {
804 if (r->filename) 801 if (r->filename)
805 g_free(r->filename); 802 g_free(r->filename);
806 if (r->protocol)
807 g_free(r->protocol);
808 if (r->mail_host) { 803 if (r->mail_host) {
809 g_free(r->mail_host->address); 804 g_free(r->mail_host->address);
810 g_free(r->mail_host); 805 g_free(r->mail_host);
811 } 806 }
812 if (r->wrapper) 807 if (r->wrapper)
888 route = g_malloc(sizeof(connect_route)); 883 route = g_malloc(sizeof(connect_route));
889 if (!route) { 884 if (!route) {
890 return NULL; 885 return NULL;
891 } 886 }
892 memset(route, 0, sizeof(connect_route)); 887 memset(route, 0, sizeof(connect_route));
893 route->protocol = g_strdup("smtp");
894 route->is_local_net = TRUE; 888 route->is_local_net = TRUE;
895 route->name = g_strdup("default local_net_route"); 889 route->name = g_strdup("default local_net_route");
896 route->expand_h_sender_address = TRUE; 890 route->expand_h_sender_address = TRUE;
897 route->resolve_list = g_list_append(NULL, resolve_byname); 891 route->resolve_list = g_list_append(NULL, resolve_byname);
898 route->connect_error_fail = TRUE; 892 route->connect_error_fail = TRUE;