diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-06-19 15:32:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-06-19 15:32:08 +0000 |
commit | 16639137d0f884ac3401ad3443d50a370cb8f421 (patch) | |
tree | b6fdfd7c82fda5fe1cb9b65d9c3d552e8795a0c6 /driver.c | |
parent | 79f60011732112c1b4a303fb6046a0fa906ac351 (diff) | |
download | fetchmail-16639137d0f884ac3401ad3443d50a370cb8f421.tar.gz fetchmail-16639137d0f884ac3401ad3443d50a370cb8f421.tar.bz2 fetchmail-16639137d0f884ac3401ad3443d50a370cb8f421.zip |
Avoid getting sizes when there is no mail.
svn path=/trunk/; revision=1106
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -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++) { |