emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b60761a 1/3: Merge from origin/emacs-26


From: Paul Eggert
Subject: [Emacs-diffs] master b60761a 1/3: Merge from origin/emacs-26
Date: Fri, 1 Feb 2019 11:42:53 -0500 (EST)

branch: master
commit b60761acfa3c0070efd53056040524f05b35c07f
Merge: 94245b9 7ba8f80
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-26
    
    7ba8f80398 Avoid errors in 'rmail-get-new-mail'
    9c8412a0b8 Fix process-contact bug with TCP connections
    
    # Conflicts:
    #   src/process.c
---
 lisp/mail/rmail.el |  3 ++-
 src/process.c      | 14 ++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index c416421..0f89e0e 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2072,7 +2072,8 @@ Value is the size of the newly read mail after 
conversion."
                   ;; If we just read the password, most likely it is
                   ;; wrong.  Otherwise, see if there is a specific
                   ;; reason to think that the problem is a wrong passwd.
-                  (if (and (rmail-remote-proto-p proto)
+                  (if (and proto
+                            (rmail-remote-proto-p proto)
                            (or got-password
                                (re-search-forward rmail-remote-password-error
                                                   nil t)))
diff --git a/src/process.c b/src/process.c
index c074140..728c14a 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4741,19 +4741,24 @@ server_accept_connection (Lisp_Object server, int 
channel)
   service = Qnil;
   Lisp_Object args[11];
   int nargs = 0;
-  AUTO_STRING (procname_format_in, "%s <%d.%d.%d.%d:%d>");
-  AUTO_STRING (procname_format_in6, "%s <[%x:%x:%x:%x:%x:%x:%x:%x]:%d>");
+  #define HOST_FORMAT_IN "%d.%d.%d.%d"
+  #define HOST_FORMAT_IN6 "%x:%x:%x:%x:%x:%x:%x:%x"
+  AUTO_STRING (host_format_in, HOST_FORMAT_IN);
+  AUTO_STRING (host_format_in6, HOST_FORMAT_IN6);
+  AUTO_STRING (procname_format_in, "%s <"HOST_FORMAT_IN":%d>");
+  AUTO_STRING (procname_format_in6, "%s <["HOST_FORMAT_IN6"]:%d>");
   AUTO_STRING (procname_format_default, "%s <%d>");
   switch (saddr.sa.sa_family)
     {
     case AF_INET:
       {
        args[nargs++] = procname_format_in;
-       nargs++;
+       args[nargs++] = host_format_in;
        unsigned char *ip = (unsigned char *)&saddr.in.sin_addr.s_addr;
        service = make_fixnum (ntohs (saddr.in.sin_port));
        for (int i = 0; i < 4; i++)
          args[nargs++] = make_fixnum (ip[i]);
+       host = Fformat (5, args + 1);
        args[nargs++] = service;
       }
       break;
@@ -4762,11 +4767,12 @@ server_accept_connection (Lisp_Object server, int 
channel)
     case AF_INET6:
       {
        args[nargs++] = procname_format_in6;
-       nargs++;
+       args[nargs++] = host_format_in6;
        DECLARE_POINTER_ALIAS (ip6, uint16_t, &saddr.in6.sin6_addr);
        service = make_fixnum (ntohs (saddr.in.sin_port));
        for (int i = 0; i < 8; i++)
          args[nargs++] = make_fixnum (ip6[i]);
+       host = Fformat (9, args + 1);
        args[nargs++] = service;
       }
       break;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]