diff options
| author | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-04 03:48:17 +0000 |
| commit | fbf349734468d48b421c3d03074bb66dfcf3115b (patch) | |
| tree | 0a7d1ee844b6c591a5a499d23e35931945106e5a /lib-src/pop.c | |
| parent | f0caabd962b662cccbea472995d86af718cc8d0b (diff) | |
| parent | 4b5fa40e1f1ba3cafde672863a0331311d1c2695 (diff) | |
| download | emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.tar.gz emacs-fbf349734468d48b421c3d03074bb66dfcf3115b.zip | |
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
Add CVS metadata files.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
Update from CVS.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
Diffstat (limited to 'lib-src/pop.c')
| -rw-r--r-- | lib-src/pop.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c index 9a85ba3746c..9bc73e90a54 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* pop.c: client routines for talking to a POP3-protocol post-office server | 1 | /* pop.c: client routines for talking to a POP3-protocol post-office server |
| 2 | Copyright (c) 1991, 1993, 1996, 1997, 1999 Free Software Foundation, Inc. | 2 | Copyright (C) 1991, 1993, 1996, 1997, 1999, 2002, 2003, 2004, |
| 3 | 2005 Free Software Foundation, Inc. | ||
| 3 | Written by Jonathan Kamens, jik@security.ov.com. | 4 | Written by Jonathan Kamens, jik@security.ov.com. |
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| @@ -76,17 +77,6 @@ extern struct servent *hes_getservbyname (/* char *, char * */); | |||
| 76 | # ifdef HAVE_KRB5_H | 77 | # ifdef HAVE_KRB5_H |
| 77 | # include <krb5.h> | 78 | # include <krb5.h> |
| 78 | # endif | 79 | # endif |
| 79 | # ifdef HAVE_DES_H | ||
| 80 | # include <des.h> | ||
| 81 | # else | ||
| 82 | # ifdef HAVE_KERBEROSIV_DES_H | ||
| 83 | # include <kerberosIV/des.h> | ||
| 84 | # else | ||
| 85 | # ifdef HAVE_KERBEROS_DES_H | ||
| 86 | # include <kerberos/des.h> | ||
| 87 | # endif | ||
| 88 | # endif | ||
| 89 | # endif | ||
| 90 | # ifdef HAVE_KRB_H | 80 | # ifdef HAVE_KRB_H |
| 91 | # include <krb.h> | 81 | # include <krb.h> |
| 92 | # else | 82 | # else |
| @@ -1403,12 +1393,24 @@ sendline (server, line) | |||
| 1403 | { | 1393 | { |
| 1404 | #define SENDLINE_ERROR "Error writing to POP server: " | 1394 | #define SENDLINE_ERROR "Error writing to POP server: " |
| 1405 | int ret; | 1395 | int ret; |
| 1406 | 1396 | char *buf; | |
| 1407 | ret = fullwrite (server->file, line, strlen (line)); | 1397 | |
| 1408 | if (ret >= 0) | 1398 | /* Combine the string and the CR-LF into one buffer. Otherwise, two |
| 1409 | { /* 0 indicates that a blank line was written */ | 1399 | reasonable network stack optimizations, Nagle's algorithm and |
| 1410 | ret = fullwrite (server->file, "\r\n", 2); | 1400 | delayed acks, combine to delay us a fraction of a second on every |
| 1411 | } | 1401 | message we send. (Movemail writes line without \r\n, client |
| 1402 | kernel sends packet, server kernel delays the ack to see if it | ||
| 1403 | can combine it with data, movemail writes \r\n, client kernel | ||
| 1404 | waits because it has unacked data already in its outgoing queue, | ||
| 1405 | client kernel eventually times out and sends.) | ||
| 1406 | |||
| 1407 | This can be something like 0.2s per command, which can add up | ||
| 1408 | over a few dozen messages, and is a big chunk of the time we | ||
| 1409 | spend fetching mail from a server close by. */ | ||
| 1410 | buf = alloca (strlen (line) + 3); | ||
| 1411 | strcpy (buf, line); | ||
| 1412 | strcat (buf, "\r\n"); | ||
| 1413 | ret = fullwrite (server->file, buf, strlen (buf)); | ||
| 1412 | 1414 | ||
| 1413 | if (ret < 0) | 1415 | if (ret < 0) |
| 1414 | { | 1416 | { |