mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Fix another place with UIDL check too
Calculate UIDL size and lines number properly now
This commit is contained in:
parent
76441fe1da
commit
ee32660240
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=11620
@ -1,7 +1,28 @@
|
||||
*** pop_dropcopy.c.orig Sun Jun 28 21:46:27 1998
|
||||
--- pop_dropcopy.c Mon Jun 29 01:05:25 1998
|
||||
*** pop_dropcopy.c.orig Tue Jun 30 10:27:00 1998
|
||||
--- pop_dropcopy.c Tue Jun 30 10:27:04 1998
|
||||
***************
|
||||
*** 484,495 ****
|
||||
*** 463,470 ****
|
||||
*cp++ = '\n';
|
||||
*cp = '\0';
|
||||
|
||||
! mp->length += strlen("X-UIDL: ") + strlen(mp->uidl_str) + 1;
|
||||
! p->drop_size += strlen("X-UIDL: ") + strlen(mp->uidl_str)+1;
|
||||
|
||||
/* New UIDs do not dirty the mailspool if NO_STATUS is set. They
|
||||
are just recalculated each time the popper is run or LMOS is
|
||||
--- 463,472 ----
|
||||
*cp++ = '\n';
|
||||
*cp = '\0';
|
||||
|
||||
! i = strlen("X-UIDL: ") + (DIG_SIZE * 2) + 2;
|
||||
! mp->length += i;
|
||||
! p->drop_size += i;
|
||||
! mp->lines++;
|
||||
|
||||
/* New UIDs do not dirty the mailspool if NO_STATUS is set. They
|
||||
are just recalculated each time the popper is run or LMOS is
|
||||
***************
|
||||
*** 488,506 ****
|
||||
} else if (!strncasecmp("X-UIDL:", buffer, 7)) {
|
||||
if (!uidl_found) {
|
||||
char *cp;
|
||||
@ -14,18 +35,107 @@
|
||||
{
|
||||
uidl_found--; /*roll over as though it hasn't seen anything*/
|
||||
continue;
|
||||
--- 484,497 ----
|
||||
}
|
||||
mp->uidl_str = (char *)strdup(cp);
|
||||
! mp->length += nchar + 1;
|
||||
! p->drop_size += nchar + 1;
|
||||
}
|
||||
continue; /* Do not include this value in the message size */
|
||||
} else if ((strncasecmp(buffer,"Status:",7) == 0)) {
|
||||
--- 490,514 ----
|
||||
} else if (!strncasecmp("X-UIDL:", buffer, 7)) {
|
||||
if (!uidl_found) {
|
||||
char *cp;
|
||||
+ int l;
|
||||
+ int i;
|
||||
|
||||
uidl_found++;
|
||||
/* Skip over header string */
|
||||
cp = &buffer[7];
|
||||
while (*cp && (*cp == ' ' || *cp == '\t')) cp++;
|
||||
! l = strlen(cp);
|
||||
! if(l < DIG_SIZE || l > 70/*rfc1939*/+1) /* To account for the empty UIDL string */
|
||||
! i = strlen(cp);
|
||||
! /* UIDLs: >=DIG_SIZE-1 (pop_bull.c), DIG_SIZE*2 */
|
||||
! if (i < DIG_SIZE || i > (DIG_SIZE * 2) + 1)
|
||||
{
|
||||
uidl_found--; /*roll over as though it hasn't seen anything*/
|
||||
continue;
|
||||
}
|
||||
+
|
||||
mp->uidl_str = (char *)strdup(cp);
|
||||
! i += strlen("X-UIDL: ") + 1;
|
||||
! mp->length += i;
|
||||
! p->drop_size += i;
|
||||
! mp->lines++;
|
||||
}
|
||||
continue; /* Do not include this value in the message size */
|
||||
} else if ((strncasecmp(buffer,"Status:",7) == 0)) {
|
||||
***************
|
||||
*** 711,718 ****
|
||||
*cp++ = '\n';
|
||||
*cp = '\0';
|
||||
|
||||
! mp->length += strlen("X-UIDL: ") + strlen(mp->uidl_str) + 1;
|
||||
! p->drop_size += strlen("X-UIDL: ") + strlen(mp->uidl_str)+1;
|
||||
|
||||
/* New UIDs do not dirty the mailspool if NO_STATUS is set. They
|
||||
are just recalculated each time the popper is run or LMOS is
|
||||
--- 719,728 ----
|
||||
*cp++ = '\n';
|
||||
*cp = '\0';
|
||||
|
||||
! i = strlen("X-UIDL: ") + (DIG_SIZE * 2) + 2;
|
||||
! mp->length += i;
|
||||
! p->drop_size += i;
|
||||
! mp->lines++;
|
||||
|
||||
/* New UIDs do not dirty the mailspool if NO_STATUS is set. They
|
||||
are just recalculated each time the popper is run or LMOS is
|
||||
***************
|
||||
*** 737,757 ****
|
||||
} else if (!strncasecmp("X-UIDL:", buffer, 7)) {
|
||||
if (!uidl_found) {
|
||||
char *cp;
|
||||
|
||||
uidl_found++;
|
||||
|
||||
/* Skip over header */
|
||||
cp = &buffer[7];
|
||||
while (*cp && (*cp == ' ' || *cp == '\t')) cp++;
|
||||
! if(strlen(cp) < DIG_SIZE) /* To account for the empty UIDL string */
|
||||
{
|
||||
uidl_found--; /*roll over as though it hasn't seen anything*/
|
||||
continue;
|
||||
}
|
||||
|
||||
mp->uidl_str = (char *)strdup(cp);
|
||||
! mp->length += nchar + 1;
|
||||
! p->drop_size += nchar + 1;
|
||||
}
|
||||
continue; /* Do not include this value in the message size */
|
||||
} else if (!strncasecmp(buffer,"Status:",7)) {
|
||||
--- 747,772 ----
|
||||
} else if (!strncasecmp("X-UIDL:", buffer, 7)) {
|
||||
if (!uidl_found) {
|
||||
char *cp;
|
||||
+ int i;
|
||||
|
||||
uidl_found++;
|
||||
|
||||
/* Skip over header */
|
||||
cp = &buffer[7];
|
||||
while (*cp && (*cp == ' ' || *cp == '\t')) cp++;
|
||||
! i = strlen(cp);
|
||||
! /* UIDLs: >=DIG_SIZE-1 (pop_bull.c), DIG_SIZE*2 */
|
||||
! if (i < DIG_SIZE || i > (DIG_SIZE * 2) + 1)
|
||||
{
|
||||
uidl_found--; /*roll over as though it hasn't seen anything*/
|
||||
continue;
|
||||
}
|
||||
|
||||
mp->uidl_str = (char *)strdup(cp);
|
||||
! i += strlen("X-UIDL: ") + 1;
|
||||
! mp->length += i;
|
||||
! p->drop_size += i;
|
||||
! mp->lines++;
|
||||
}
|
||||
continue; /* Do not include this value in the message size */
|
||||
} else if (!strncasecmp(buffer,"Status:",7)) {
|
||||
|
Loading…
Reference in New Issue
Block a user