]> Pileus Git - ~andy/fetchmail/commitdiff
Michael Warfield's IPv6 fixes.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 3 Jan 1999 21:29:06 +0000 (21:29 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 3 Jan 1999 21:29:06 +0000 (21:29 -0000)
svn path=/trunk/; revision=2314

NEWS
conf.c
driver.c
socket.c

diff --git a/NEWS b/NEWS
index 8cbe566d882f600612dd99c92a9d4289770009a4..11f1b04abe53364cc9cba8a719250041c8f101ca 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,8 +7,9 @@ fetchmail-4.7.4 ():
 * Supply our own strerror() if system doesn't have one.
 * Gunther Leber's cleanup for the plugin/plugout code.
 * Hajimu UMEMOTO's code for localtime in timestamps.
+* Michael Warfield's IPv6 fixes.
 
-There are 248 people on fetchmail-friends and 336 on fetchmail-announce.
+There are 249 people on fetchmail-friends and 335 on fetchmail-announce.
 
 fetchmail-4.7.3 (Thu Dec 31 11:54:01 EST 1998):
 * Added new FAQ item G11 and added material to R1.
diff --git a/conf.c b/conf.c
index 757a0e66f6136336bdd0c1be13a5c8dc78dcb5ec..2db72830aa38c84b78553224fd9b87c175378182 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -230,7 +230,11 @@ void dump_config(struct runctl *runp, struct query *querylist)
 
            using_kpop =
                (ctl->server.protocol == P_POP3 &&
+#if !INET6
                 ctl->server.port == KPOP_PORT &&
+#else
+                0 == strcmp( ctl->server.service, KPOP_PORT ) &&
+#endif
                 ctl->server.preauthenticate == A_KERBEROS_V4);
 
            stringdump("pollname", ctl->server.pollname); 
@@ -238,7 +242,11 @@ void dump_config(struct runctl *runp, struct query *querylist)
            stringdump("via", ctl->server.via); 
            stringdump("protocol", 
                       using_kpop ? "KPOP" : showproto(ctl->server.protocol));
+#if !INET6
            numdump("port",  ctl->server.port);
+#else
+           stringdump("service", ctl->server.service); 
+#endif
            numdump("timeout",  ctl->server.timeout);
            numdump("interval", ctl->server.interval);
 
@@ -322,7 +330,7 @@ void dump_config(struct runctl *runp, struct query *querylist)
            fputs("'lmtp':FALSE,", stdout);
            
 #ifdef INET6
-       stringdump("netsec", ctl->netsec);
+       stringdump("netsec", ctl->server.netsec);
 #endif /* INET6 */
        stringdump("preconnect", ctl->preconnect);
        stringdump("postconnect", ctl->postconnect);
index b9849062cc204d75c585c6047d08fb39df99644b..3650f14b5066168fab436a7f9e765011750a7546 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -1476,7 +1476,7 @@ const struct method *proto;       /* protocol method table */
        char buf[POPBUFSIZE+1], *realhost;
        int len, num, count, new, bytes, deletions = 0, *msgsizes = NULL;
 #if INET6
-       int fetches, dispatches;
+       int fetches, dispatches, oldphase;
 #else /* INET6 */
        int port, fetches, dispatches, oldphase;
 #endif /* INET6 */
@@ -1502,8 +1502,7 @@ const struct method *proto;       /* protocol method table */
 #if INET6
        if ((sock = SockOpen(realhost, 
                             ctl->server.service ? ctl->server.service : protocol->service,
-                            ctl->server.netsec)) == -1, ctl->server.plugin
-           )
+                            ctl->server.netsec, ctl->server.plugin)) == -1)
 #else /* INET6 */
        if ((sock = SockOpen(realhost, port, NULL, ctl->server.plugin)) == -1)
 #endif /* INET6 */
index 5e9602cf636c17e987973311ecaabbb0ae29a086..75a08bd6fa2ab664cbfaf6c6c9650d77726642e1 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -189,7 +189,7 @@ int SockOpen(const char *host, int clientPort, const char *options,
        if(hp->h_length != 4 && hp->h_length != 8)
        {
            h_errno = errno = 0;
-           error(0, 0, _("fetchmail: illegal address length received for host %s"));
+           error(0, 0, _("fetchmail: illegal address length received for host %s"),host);
            return -1;
        }
        /*