# HG changeset patch # User markus schnalke # Date 1291667655 10800 # Node ID 5f559921391a6a145c7560e05e13b0c496abf210 # Parent 1abc1faeb45ddcbea75acc2208e58088c2710d0c minor refactorings and cleanups diff -r 1abc1faeb45d -r 5f559921391a src/queue.c --- a/src/queue.c Fri Dec 03 21:05:34 2010 -0300 +++ b/src/queue.c Mon Dec 06 17:34:15 2010 -0300 @@ -92,13 +92,11 @@ gboolean ok = TRUE; logwrite(LOG_NOTICE, "Starting queue run.\n"); - msg_list = read_queue(FALSE); - - if (msg_list != NULL) { + if (msg_list) { ok = deliver_msg_list(msg_list, DLVR_ALL); + DEBUG(5) debugf(" deliver_msg_list() returned: %d\n", ok); destroy_msg_list(msg_list); - DEBUG(5) debugf(" deliver_msg_list() returned: %d\n", ok); } logwrite(LOG_NOTICE, "Finished queue run.\n"); @@ -108,12 +106,14 @@ gboolean queue_run_online() { - GList *msg_list = read_queue(FALSE); + GList *msg_list; gboolean ok = TRUE; logwrite(LOG_NOTICE, "Starting online queue run.\n"); - if (msg_list != NULL) { + msg_list = read_queue(FALSE); + if (msg_list) { ok = deliver_msg_list(msg_list, DLVR_ONLINE); + DEBUG(5) debugf(" deliver_msg_list() returned: %d\n", ok); destroy_msg_list(msg_list); } logwrite(LOG_NOTICE, "Finished online queue run.\n");