From 16639137d0f884ac3401ad3443d50a370cb8f421 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 19 Jun 1997 15:32:08 +0000 Subject: Avoid getting sizes when there is no mail. svn path=/trunk/; revision=1106 --- driver.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/driver.c b/driver.c index a675365c..da87ccc8 100644 --- a/driver.c +++ b/driver.c @@ -1406,22 +1406,6 @@ const struct method *proto; /* protocol method table */ count, count > 1 ? "s" : "", buf); } - /* - * We may need to get sizes in order to check message - * limits. Or it may be forced because the fetch methods - * don't return reliable sizes. - */ - msgsizes = (int *)NULL; - if (proto->getsizes && (proto->force_getsizes || ctl->limit > 0)) - { - msgsizes = (int *)alloca(sizeof(int) * count); - - ok = (proto->getsizes)(sock, count, msgsizes); - if (ok != 0) - goto cleanUp; - set_timeout(ctl->server.timeout); - } - if (check_only) { if (new == -1 || ctl->fetchall) @@ -1457,6 +1441,22 @@ const struct method *proto; /* protocol method table */ */ force_retrieval = !peek_capable && (ctl->errcount > 0); + /* + * We may need to get sizes in order to check message + * limits. Or it may be forced because the fetch methods + * don't return reliable sizes. + */ + msgsizes = (int *)NULL; + if (proto->getsizes && (proto->force_getsizes || ctl->limit > 0)) + { + msgsizes = (int *)alloca(sizeof(int) * count); + + ok = (proto->getsizes)(sock, count, msgsizes); + if (ok != 0) + goto cleanUp; + set_timeout(ctl->server.timeout); + } + /* read, forward, and delete messages */ for (num = 1; num <= count; num++) { -- cgit v1.2.3