emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/async-dns bf4bbfe: Better async error reporting


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] feature/async-dns bf4bbfe: Better async error reporting
Date: Mon, 01 Feb 2016 02:58:12 +0000

branch: feature/async-dns
commit bf4bbfe16d7d676d56cb9ed661684b17318d333f
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Better async error reporting
    
    * process.c (connect_network_socket): Mark failed processes
    with a better error message.
    (check_for_dns): Ditto.
---
 src/process.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/process.c b/src/process.c
index 8849b20..b6721ad 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3311,8 +3311,12 @@ void connect_network_socket (Lisp_Object proc, 
Lisp_Object ip_addresses)
       p->gnutls_boot_parameters = Qnil;
       boot = Fgnutls_boot (proc, XCAR (params), XCDR (params));
       if (NILP (boot) || STRINGP (boot)) {
-       pset_status (p, Qfailed);
        deactivate_process (proc);
+       if (NILP (boot))
+         pset_status (p, list2 (Qfailed,
+                                build_string ("TLS negotiation failed")));
+       else
+         pset_status (p, list2 (Qfailed, boot));
       }
     }
 #endif
@@ -4614,8 +4618,12 @@ check_for_dns (Lisp_Object proc)
   /* The DNS lookup failed. */
   else
     {
-      pset_status (p, Qfailed);
       deactivate_process (proc);
+      pset_status (p, (list2
+                      (Qfailed,
+                       concat3 (build_string ("Name lookup of "),
+                                build_string (p->dns_requests[0]->ar_name),
+                                build_string (" failed")))));
     }
 
   xfree ((void *)p->dns_requests[0]->ar_request);



reply via email to

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