[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/pop.c
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/pop.c |
Date: |
Wed, 13 Jul 2005 17:44:17 -0400 |
Index: emacs/lib-src/pop.c
diff -c emacs/lib-src/pop.c:1.35 emacs/lib-src/pop.c:1.36
*** emacs/lib-src/pop.c:1.35 Mon Jul 4 15:24:11 2005
--- emacs/lib-src/pop.c Wed Jul 13 21:44:17 2005
***************
*** 76,92 ****
# ifdef HAVE_KRB5_H
# include <krb5.h>
# 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
# ifdef HAVE_KRB_H
# include <krb.h>
# else
--- 76,81 ----
***************
*** 1403,1414 ****
{
#define SENDLINE_ERROR "Error writing to POP server: "
int ret;
! ret = fullwrite (server->file, line, strlen (line));
! if (ret >= 0)
! { /* 0 indicates that a blank line was written */
! ret = fullwrite (server->file, "\r\n", 2);
! }
if (ret < 0)
{
--- 1392,1415 ----
{
#define SENDLINE_ERROR "Error writing to POP server: "
int ret;
+ char *buf;
! /* Combine the string and the CR-LF into one buffer. Otherwise, two
! reasonable network stack optimizations, Nagle's algorithm and
! delayed acks, combine to delay us a fraction of a second on every
! message we send. (Movemail writes line without \r\n, client
! kernel sends packet, server kernel delays the ack to see if it
! can combine it with data, movemail writes \r\n, client kernel
! waits because it has unacked data already in its outgoing queue,
! client kernel eventually times out and sends.)
!
! This can be something like 0.2s per command, which can add up
! over a few dozen messages, and is a big chunk of the time we
! spend fetching mail from a server close by. */
! buf = alloca (strlen (line) + 3);
! strcpy (buf, line);
! strcat (buf, "\r\n");
! ret = fullwrite (server->file, buf, strlen (buf));
if (ret < 0)
{