diff options
| author | Lars Ingebrigtsen | 2016-02-01 03:58:03 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-01 03:58:03 +0100 |
| commit | bf4bbfe16d7d676d56cb9ed661684b17318d333f (patch) | |
| tree | b6a1758341cee6291c13b98053c42b167621b8cf /src/process.c | |
| parent | 9de7d90184a88887e1a2262f097cd9278d0bcf16 (diff) | |
| download | emacs-bf4bbfe16d7d676d56cb9ed661684b17318d333f.tar.gz emacs-bf4bbfe16d7d676d56cb9ed661684b17318d333f.zip | |
Better async error reporting
* process.c (connect_network_socket): Mark failed processes
with a better error message.
(check_for_dns): Ditto.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c index 8849b20172f..b6721ada607 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3311,8 +3311,12 @@ void connect_network_socket (Lisp_Object proc, Lisp_Object ip_addresses) | |||
| 3311 | p->gnutls_boot_parameters = Qnil; | 3311 | p->gnutls_boot_parameters = Qnil; |
| 3312 | boot = Fgnutls_boot (proc, XCAR (params), XCDR (params)); | 3312 | boot = Fgnutls_boot (proc, XCAR (params), XCDR (params)); |
| 3313 | if (NILP (boot) || STRINGP (boot)) { | 3313 | if (NILP (boot) || STRINGP (boot)) { |
| 3314 | pset_status (p, Qfailed); | ||
| 3315 | deactivate_process (proc); | 3314 | deactivate_process (proc); |
| 3315 | if (NILP (boot)) | ||
| 3316 | pset_status (p, list2 (Qfailed, | ||
| 3317 | build_string ("TLS negotiation failed"))); | ||
| 3318 | else | ||
| 3319 | pset_status (p, list2 (Qfailed, boot)); | ||
| 3316 | } | 3320 | } |
| 3317 | } | 3321 | } |
| 3318 | #endif | 3322 | #endif |
| @@ -4614,8 +4618,12 @@ check_for_dns (Lisp_Object proc) | |||
| 4614 | /* The DNS lookup failed. */ | 4618 | /* The DNS lookup failed. */ |
| 4615 | else | 4619 | else |
| 4616 | { | 4620 | { |
| 4617 | pset_status (p, Qfailed); | ||
| 4618 | deactivate_process (proc); | 4621 | deactivate_process (proc); |
| 4622 | pset_status (p, (list2 | ||
| 4623 | (Qfailed, | ||
| 4624 | concat3 (build_string ("Name lookup of "), | ||
| 4625 | build_string (p->dns_requests[0]->ar_name), | ||
| 4626 | build_string (" failed"))))); | ||
| 4619 | } | 4627 | } |
| 4620 | 4628 | ||
| 4621 | xfree ((void *)p->dns_requests[0]->ar_request); | 4629 | xfree ((void *)p->dns_requests[0]->ar_request); |