aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-31 07:01:06 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-31 07:01:06 +0000
commit34548a4d7bf2368ef5dcfe69ec10c1ea5305af5e (patch)
treef458462f57689ddb65272648b03a6551efda4616 /driver.c
parent0318e71e86068a7c1789cb6e1a54a29df112d263 (diff)
downloadfetchmail-34548a4d7bf2368ef5dcfe69ec10c1ea5305af5e.tar.gz
fetchmail-34548a4d7bf2368ef5dcfe69ec10c1ea5305af5e.tar.bz2
fetchmail-34548a4d7bf2368ef5dcfe69ec10c1ea5305af5e.zip
STEP 6: Socket() returns file pointer.
svn path=/trunk/; revision=449
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/driver.c b/driver.c
index c65d330e..612938bd 100644
--- a/driver.c
+++ b/driver.c
@@ -473,7 +473,7 @@ struct query *ctl;
/* if no socket to this host is already set up, try to open one */
if (ctl->smtp_sockfp == (FILE *)NULL)
{
- if ((ctl->smtp_sockfp = fdopen(Socket(ctl->smtphost, SMTP_PORT), "r+")) == (FILE *)NULL)
+ if ((ctl->smtp_sockfp = Socket(ctl->smtphost, SMTP_PORT)) == (FILE *)NULL)
return((FILE *)NULL);
else if (SMTP_ok(ctl->smtp_sockfp, NULL) != SM_OK
|| SMTP_helo(ctl->smtp_sockfp, ctl->servername) != SM_OK)
@@ -854,11 +854,11 @@ const struct method *proto; /* protocol method table */
else
{
char buf [POPBUFSIZE+1];
- int *msgsizes, socket, len, num, count, new, deletions = 0;
+ int *msgsizes, len, num, count, new, deletions = 0;
FILE *sockfp;
/* open a socket to the mail server */
- if ((socket = Socket(ctl->servername,
+ if ((sockfp = Socket(ctl->servername,
ctl->port ? ctl->port : protocol->port))<0)
{
perror("fetchmail, connecting to host");
@@ -866,12 +866,10 @@ const struct method *proto; /* protocol method table */
goto closeUp;
}
- sockfp = fdopen(socket, "r+");
-
#ifdef KERBEROS_V4
if (ctl->authenticate == A_KERBEROS)
{
- ok = (kerberos_auth (socket, ctl->canonical_name));
+ ok = (kerberos_auth (fileno(sockfp), ctl->canonical_name));
vtalarm(ctl->timeout);
if (ok != 0)
goto cleanUp;