diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-01-01 18:49:10 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-01-01 18:49:10 +0000 |
commit | cd46961ec2a691ad01a60af6a40314ded4c27e88 (patch) | |
tree | 56feb457e8bacf2a1f8264858b95ff7d1277ad4d /driver.c | |
parent | 74365ea56ca4d32a2e89410ef407327044096373 (diff) | |
download | fetchmail-cd46961ec2a691ad01a60af6a40314ded4c27e88.tar.gz fetchmail-cd46961ec2a691ad01a60af6a40314ded4c27e88.tar.bz2 fetchmail-cd46961ec2a691ad01a60af6a40314ded4c27e88.zip |
This version is good.
svn path=/trunk/; revision=2309
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 54 |
1 files changed, 27 insertions, 27 deletions
@@ -1651,33 +1651,6 @@ const struct method *proto; /* protocol method table */ if (ok != 0) goto cleanUp; - /* - * We need the size of each message before it's - * loaded in order to pass via the ESMTP SIZE - * option. If the protocol has a getsizes method, - * we presume this means it doesn't get reliable - * sizes from message fetch responses. - */ - if (count > 0 && proto->getsizes) - { - int i; - - xalloca(msgsizes, int *, sizeof(int) * count); - for (i = 0; i < count; i++) - msgsizes[i] = -1; - - ok = (proto->getsizes)(sock, count, msgsizes); - if (ok != 0) - goto cleanUp; - - if (bytes == -1) - { - bytes = 0; - for (i = 0; i < count; i++) - bytes += msgsizes[i]; - } - } - /* show user how many messages we downloaded */ if (idp->id) (void) sprintf(buf, _("%s at %s (folder %s)"), @@ -1755,6 +1728,33 @@ const struct method *proto; /* protocol method table */ */ force_retrieval = !peek_capable && (ctl->errcount > 0); + /* + * We need the size of each message before it's + * loaded in order to pass via the ESMTP SIZE + * option. If the protocol has a getsizes method, + * we presume this means it doesn't get reliable + * sizes from message fetch responses. + */ + if (proto->getsizes) + { + int i; + + xalloca(msgsizes, int *, sizeof(int) * count); + for (i = 0; i < count; i++) + msgsizes[i] = -1; + + ok = (proto->getsizes)(sock, count, msgsizes); + if (ok != 0) + goto cleanUp; + + if (bytes == -1) + { + bytes = 0; + for (i = 0; i < count; i++) + bytes += msgsizes[i]; + } + } + /* read, forward, and delete messages */ for (num = 1; num <= count; num++) { |