]> code.citadel.org Git - citadel.git/blobdiff - webcit/smtpqueue.c
* the number of messages available are unequal to those in scope of the list.
[citadel.git] / webcit / smtpqueue.c
index dc8eb3eff26df1dff76dbad50b2b97866b4dc2a1..c73e9a25613502cb228768a58cde1414679e8044 100644 (file)
@@ -1,6 +1,4 @@
 /* 
- * $Id$
- *
  * Display the outbound SMTP queue
  */
 
@@ -183,7 +181,7 @@ void display_smtpqueue_inner_div(void) {
                Stat.maxload = 10000;
                Stat.lowest_found = (-1);
                Stat.highest_found = (-1);
-               num_msgs = load_msg_ptrs("MSGS ALL", &Stat);
+               num_msgs = load_msg_ptrs("MSGS ALL", &Stat, NULL);
                if (num_msgs > 0) {
                         wc_printf("<table class=\"mailbox_summary\" rules=rows "
                                "cellpadding=2 style=\"width:100%%;\">"
@@ -201,7 +199,7 @@ void display_smtpqueue_inner_div(void) {
                        wc_printf(_("Recipients"));
                        wc_printf("</i></b></td></tr>\n");
 
-                       for (i=0; i<num_msgs; ++i) {
+                       for (i=0; (i < num_msgs) && (i < Stat.maxload); ++i) {
                                Msg = GetMessagePtrAt(i, WCC->summ);
                                if (Msg != NULL) {
                                        display_queue_msg(Msg->msgnum);