X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fqueue.c;h=c9ce3a2c8dbddad62fb1c0740137e76f43978e4d;hb=ecce6d9ac4fa63cc7e011c21a033f5b6c54a3995;hp=60bf2ce77c39b67f2ef40a6670ea7a8a32a01127;hpb=32dfdf8baa8ccf091a0d5d4d75e8627424898756;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/queue.c b/src/src/queue.c index 60bf2ce77..c9ce3a2c8 100644 --- a/src/src/queue.c +++ b/src/src/queue.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions that operate on the input queue. */ @@ -80,7 +80,11 @@ queue_filename *first = NULL; queue_filename **append = &first; while (a && b) - if (Ustrcmp(a->text, b->text) < 0) + { + int d; + if ((d = Ustrncmp(a->text, b->text, 6)) == 0) + d = Ustrcmp(a->text + 14, b->text + 14); + if (d < 0) { *append = a; append= &a->next; @@ -92,6 +96,7 @@ while (a && b) append= &b->next; b = b->next; } + } *append = a ? a : b; return first; @@ -278,7 +283,7 @@ for (; i <= *subcount; i++) if (root[j]) { next = merge_queue_lists(next, root[j]); - root[j] = (j == LOG2_MAXNODES - 1)? next : NULL; + root[j] = j == LOG2_MAXNODES - 1 ? next : NULL; } else { @@ -450,8 +455,8 @@ subsequent iterations. When the first argument of queue_get_spool_list() is -1 (for queue_run_in_ order), it scans all directories and makes a single message list. */ -for (i = (queue_run_in_order? -1 : 0); - i <= (queue_run_in_order? -1 : subcount); +for (i = queue_run_in_order ? -1 : 0; + i <= (queue_run_in_order ? -1 : subcount); i++) { queue_filename *f; @@ -596,9 +601,7 @@ for (i = (queue_run_in_order? -1 : 0); /* Recover store used when reading the header */ - received_protocol = NULL; - sender_address = sender_ident = NULL; - authenticated_id = authenticated_sender = NULL; + spool_clear_header_globals(); store_reset(reset_point2); if (!wanted) continue; /* With next message */ } @@ -694,6 +697,7 @@ for (i = (queue_run_in_order? -1 : 0); } } /* End loop for list of messages */ + tree_nonrecipients = NULL; store_reset(reset_point1); /* Scavenge list of messages */ /* If this was the first time through for random order processing, and @@ -1133,7 +1137,7 @@ switch(action) { case MSG_SHOW_COPY: { - transport_ctx tctx = {0}; + transport_ctx tctx = {{0}}; deliver_in_buffer = store_malloc(DELIVER_IN_BUFFER_SIZE); deliver_out_buffer = store_malloc(DELIVER_OUT_BUFFER_SIZE); tctx.u.fd = 1;