diff options
| author | Alan Mackenzie | 2017-02-12 10:59:03 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2017-02-12 10:59:03 +0000 |
| commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
| tree | 4229b13800349032697daae3904dc3773e6b7a80 /src/gnutls.c | |
| parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
| parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
| download | emacs-comment-cache.tar.gz emacs-comment-cache.zip | |
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/gnutls.c')
| -rw-r--r-- | src/gnutls.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index 735d2e35810..d0d7f2dfc84 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -390,7 +390,7 @@ gnutls_try_handshake (struct Lisp_Process *proc) | |||
| 390 | { | 390 | { |
| 391 | ret = gnutls_handshake (state); | 391 | ret = gnutls_handshake (state); |
| 392 | emacs_gnutls_handle_error (state, ret); | 392 | emacs_gnutls_handle_error (state, ret); |
| 393 | QUIT; | 393 | maybe_quit (); |
| 394 | } | 394 | } |
| 395 | while (ret < 0 | 395 | while (ret < 0 |
| 396 | && gnutls_error_is_fatal (ret) == 0 | 396 | && gnutls_error_is_fatal (ret) == 0 |
| @@ -582,8 +582,17 @@ emacs_gnutls_handle_error (gnutls_session_t session, int err) | |||
| 582 | 582 | ||
| 583 | if (gnutls_error_is_fatal (err)) | 583 | if (gnutls_error_is_fatal (err)) |
| 584 | { | 584 | { |
| 585 | int level = 1; | ||
| 586 | /* Mostly ignore "The TLS connection was non-properly | ||
| 587 | terminated" message which just means that the peer closed the | ||
| 588 | connection. */ | ||
| 589 | #ifdef HAVE_GNUTLS3 | ||
| 590 | if (err == GNUTLS_E_PREMATURE_TERMINATION) | ||
| 591 | level = 3; | ||
| 592 | #endif | ||
| 593 | |||
| 594 | GNUTLS_LOG2 (level, max_log_level, "fatal error:", str); | ||
| 585 | ret = 0; | 595 | ret = 0; |
| 586 | GNUTLS_LOG2 (1, max_log_level, "fatal error:", str); | ||
| 587 | } | 596 | } |
| 588 | else | 597 | else |
| 589 | { | 598 | { |