Mercurial > masqmail-0.2
comparison src/deliver.c @ 114:a80ebfa16cd5
better debugging output (thanks to Paolo)
author | meillo@marmaro.de |
---|---|
date | Wed, 30 Jun 2010 15:00:59 +0200 |
parents | 3b344bf57162 |
children | 349518b940db |
comparison
equal
deleted
inserted
replaced
113:c93023f58cc7 | 114:a80ebfa16cd5 |
---|---|
691 GList *rcpt_list; | 691 GList *rcpt_list; |
692 GList *local_rcpt_list = NULL; | 692 GList *local_rcpt_list = NULL; |
693 GList *localnet_rcpt_list = NULL; | 693 GList *localnet_rcpt_list = NULL; |
694 GList *other_rcpt_list; | 694 GList *other_rcpt_list; |
695 | 695 |
696 if (!spool_lock(msgout->msg->uid)) | 696 if (!spool_lock(msgout->msg->uid)) { |
697 DEBUG(5) debugf("spool_lock(%s) failed.\n", msgout->msg->uid); | |
697 continue; | 698 continue; |
699 } | |
700 DEBUG(5) debugf("spool_lock(%s)\n", msgout->msg->uid); | |
698 | 701 |
699 rcpt_list = g_list_copy(msgout->msg->rcpt_list); | 702 rcpt_list = g_list_copy(msgout->msg->rcpt_list); |
700 if (conf.log_user) { | 703 if (conf.log_user) { |
701 address *addr = create_address_qualified(conf.log_user, TRUE, conf.host_name); | 704 address *addr = create_address_qualified(conf.log_user, TRUE, conf.host_name); |
702 if (addr) | 705 if (addr) |
749 if (alias_table) | 752 if (alias_table) |
750 destroy_table(alias_table); | 753 destroy_table(alias_table); |
751 | 754 |
752 /* actual delivery */ | 755 /* actual delivery */ |
753 if (local_msgout_list != NULL) { | 756 if (local_msgout_list != NULL) { |
757 DEBUG(5) debugf("local_msgout_list\n"); | |
754 foreach(local_msgout_list, msgout_node) { | 758 foreach(local_msgout_list, msgout_node) { |
755 msg_out *msgout = (msg_out *) (msgout_node->data); | 759 msg_out *msgout = (msg_out *) (msgout_node->data); |
756 if (!deliver_local(msgout)) | 760 if (!deliver_local(msgout)) |
757 ok = FALSE; | 761 ok = FALSE; |
758 } | 762 } |
761 | 765 |
762 if (localnet_msgout_list != NULL) { | 766 if (localnet_msgout_list != NULL) { |
763 GList *route_list = NULL; | 767 GList *route_list = NULL; |
764 GList *route_node; | 768 GList *route_node; |
765 | 769 |
770 DEBUG(5) debugf("localnet_msgout_list\n"); | |
766 if (conf.local_net_routes) | 771 if (conf.local_net_routes) |
767 route_list = read_route_list(conf.local_net_routes, TRUE); | 772 route_list = read_route_list(conf.local_net_routes, TRUE); |
768 else | 773 else |
769 route_list = g_list_append(NULL, create_local_route()); | 774 route_list = g_list_append(NULL, create_local_route()); |
770 | 775 |
776 destroy_msg_out_list(localnet_msgout_list); | 781 destroy_msg_out_list(localnet_msgout_list); |
777 destroy_route_list(route_list); | 782 destroy_route_list(route_list); |
778 } | 783 } |
779 | 784 |
780 if (other_msgout_list != NULL) { | 785 if (other_msgout_list != NULL) { |
786 DEBUG(5) debugf("other_msgout_list\n"); | |
781 if (!deliver_msgout_list_online(other_msgout_list)) | 787 if (!deliver_msgout_list_online(other_msgout_list)) |
782 ok = FALSE; | 788 ok = FALSE; |
783 destroy_msg_out_list(other_msgout_list); | 789 destroy_msg_out_list(other_msgout_list); |
784 } | 790 } |
785 | 791 |
786 foreach(msgout_list, msgout_node) { | 792 foreach(msgout_list, msgout_node) { |
787 msg_out *msgout = (msg_out *) (msgout_node->data); | 793 msg_out *msgout = (msg_out *) (msgout_node->data); |
788 spool_unlock(msgout->msg->uid); | 794 if (spool_unlock(msgout->msg->uid)) { |
795 DEBUG(5) debugf("spool_unlock(%s)\n", msgout->msg->uid); | |
796 } else { | |
797 DEBUG(5) debugf("spool_unlock(%s) failed.\n", msgout->msg->uid); | |
798 } | |
799 | |
789 } | 800 } |
790 | 801 |
791 destroy_msg_out_list(msgout_list); | 802 destroy_msg_out_list(msgout_list); |
792 | 803 |
793 return ok; | 804 return ok; |