masqmail
diff src/deliver.c @ 344:0410c8aabac2
improved comments and debug messages
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 03 Sep 2011 18:32:37 +0200 |
parents | 9149d893eb52 |
children | 332999b1303f |
line diff
1.1 --- a/src/deliver.c Sat Sep 03 18:25:02 2011 +0200 1.2 +++ b/src/deliver.c Sat Sep 03 18:32:37 2011 +0200 1.3 @@ -692,11 +692,13 @@ 1.4 1.5 connect_name = online_query(); 1.6 if (!connect_name) { 1.7 + DEBUG(5) debugf("online query returned false\n"); 1.8 return FALSE; 1.9 } 1.10 1.11 /* we are online! */ 1.12 - logwrite(LOG_NOTICE, "detected online configuration %s\n", connect_name); 1.13 + DEBUG(5) debugf("processing query_routes\n"); 1.14 + logwrite(LOG_NOTICE, "detected online configuration `%s'\n", connect_name); 1.15 1.16 rf_list = (GList *) table_find(conf.connect_routes, connect_name); 1.17 if (!rf_list) { 1.18 @@ -710,13 +712,13 @@ 1.19 return FALSE; 1.20 } 1.21 1.22 - /* TODO: Should we stop if the mail was delivered? Dig deeper! */ 1.23 foreach(route_list, route_node) { 1.24 connect_route *route = (connect_route *) (route_node->data); 1.25 /* TODO: ok gets overwritten */ 1.26 ok = deliver_route_msg_list(route, msgout_list); 1.27 } 1.28 destroy_route_list(route_list); 1.29 + 1.30 return ok; 1.31 } 1.32 1.33 @@ -850,6 +852,7 @@ 1.34 destroy_msg_out_list(other_msgout_list); 1.35 } 1.36 1.37 + /* unlock spool files */ 1.38 foreach(msgout_list, msgout_node) { 1.39 msg_out *msgout = (msg_out *) (msgout_node->data); 1.40 if (spool_unlock(msgout->msg->uid)) { 1.41 @@ -857,17 +860,17 @@ 1.42 } else { 1.43 DEBUG(5) debugf("spool_unlock(%s) failed.\n", msgout->msg->uid); 1.44 } 1.45 - 1.46 } 1.47 - 1.48 destroy_msg_out_list(msgout_list); 1.49 1.50 return ok; 1.51 } 1.52 1.53 /* 1.54 - deliver() is called when a message has just been received and should 1.55 - be delivered immediately. 1.56 + deliver() is called when a message has just been received 1.57 + (mode_accept and smtp_in) and should be delivered immediately 1.58 + (neither -odq nor do_queue). Only this one message will be tried to 1.59 + deliver then. 1.60 */ 1.61 gboolean 1.62 deliver(message * msg)