76 |
# ifdef HAVE_KRB5_H |
# ifdef HAVE_KRB5_H |
77 |
# include <krb5.h> |
# include <krb5.h> |
78 |
# endif |
# endif |
|
# ifdef HAVE_DES_H |
|
|
# include <des.h> |
|
|
# else |
|
|
# ifdef HAVE_KERBEROSIV_DES_H |
|
|
# include <kerberosIV/des.h> |
|
|
# else |
|
|
# ifdef HAVE_KERBEROS_DES_H |
|
|
# include <kerberos/des.h> |
|
|
# endif |
|
|
# endif |
|
|
# endif |
|
79 |
# ifdef HAVE_KRB_H |
# ifdef HAVE_KRB_H |
80 |
# include <krb.h> |
# include <krb.h> |
81 |
# else |
# else |
1392 |
{ |
{ |
1393 |
#define SENDLINE_ERROR "Error writing to POP server: " |
#define SENDLINE_ERROR "Error writing to POP server: " |
1394 |
int ret; |
int ret; |
1395 |
|
char *buf; |
1396 |
|
|
1397 |
ret = fullwrite (server->file, line, strlen (line)); |
/* Combine the string and the CR-LF into one buffer. Otherwise, two |
1398 |
if (ret >= 0) |
reasonable network stack optimizations, Nagle's algorithm and |
1399 |
{ /* 0 indicates that a blank line was written */ |
delayed acks, combine to delay us a fraction of a second on every |
1400 |
ret = fullwrite (server->file, "\r\n", 2); |
message we send. (Movemail writes line without \r\n, client |
1401 |
} |
kernel sends packet, server kernel delays the ack to see if it |
1402 |
|
can combine it with data, movemail writes \r\n, client kernel |
1403 |
|
waits because it has unacked data already in its outgoing queue, |
1404 |
|
client kernel eventually times out and sends.) |
1405 |
|
|
1406 |
|
This can be something like 0.2s per command, which can add up |
1407 |
|
over a few dozen messages, and is a big chunk of the time we |
1408 |
|
spend fetching mail from a server close by. */ |
1409 |
|
buf = alloca (strlen (line) + 3); |
1410 |
|
strcpy (buf, line); |
1411 |
|
strcat (buf, "\r\n"); |
1412 |
|
ret = fullwrite (server->file, buf, strlen (buf)); |
1413 |
|
|
1414 |
if (ret < 0) |
if (ret < 0) |
1415 |
{ |
{ |