aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-10-01 16:05:25 +0200
committerLars Magne Ingebrigtsen2010-10-01 16:05:25 +0200
commit6ca26f1d7fd69a2d02c689295b952f54857d7827 (patch)
tree481c6f291810ee186d7e22580ccaf8500da2d5e6
parent4cacd822d198d85848348ae85c08fb56f6525116 (diff)
downloademacs-6ca26f1d7fd69a2d02c689295b952f54857d7827.tar.gz
emacs-6ca26f1d7fd69a2d02c689295b952f54857d7827.zip
(url-http-async-sentinel): Check that the buffer is still alive before
switching to it.
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-http.el29
2 files changed, 20 insertions, 14 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index cddfa38cc00..f5a0a2f4b5d 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * url-http.el (url-http-async-sentinel): Check that the buffer is
4 still alive before switching to it.
5
12010-09-25 Julien Danjou <julien@danjou.info> 62010-09-25 Julien Danjou <julien@danjou.info>
2 7
3 * url-cache.el (url-cache-create-filename): Ensure no-port and 8 * url-cache.el (url-cache-create-filename): Ensure no-port and
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index bd0a3de98a5..655ea387c8d 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1244,20 +1244,21 @@ CBARGS as the arguments."
1244 (declare (special url-callback-arguments)) 1244 (declare (special url-callback-arguments))
1245 ;; We are performing an asynchronous connection, and a status change 1245 ;; We are performing an asynchronous connection, and a status change
1246 ;; has occurred. 1246 ;; has occurred.
1247 (with-current-buffer (process-buffer proc) 1247 (when (buffer-name (process-buffer proc))
1248 (cond 1248 (with-current-buffer (process-buffer proc)
1249 (url-http-connection-opened 1249 (cond
1250 (url-http-end-of-document-sentinel proc why)) 1250 (url-http-connection-opened
1251 ((string= (substring why 0 4) "open") 1251 (url-http-end-of-document-sentinel proc why))
1252 (setq url-http-connection-opened t) 1252 ((string= (substring why 0 4) "open")
1253 (process-send-string proc (url-http-create-request))) 1253 (setq url-http-connection-opened t)
1254 (t 1254 (process-send-string proc (url-http-create-request)))
1255 (setf (car url-callback-arguments) 1255 (t
1256 (nconc (list :error (list 'error 'connection-failed why 1256 (setf (car url-callback-arguments)
1257 :host (url-host (or url-http-proxy url-current-object)) 1257 (nconc (list :error (list 'error 'connection-failed why
1258 :service (url-port (or url-http-proxy url-current-object)))) 1258 :host (url-host (or url-http-proxy url-current-object))
1259 (car url-callback-arguments))) 1259 :service (url-port (or url-http-proxy url-current-object))))
1260 (url-http-activate-callback))))) 1260 (car url-callback-arguments)))
1261 (url-http-activate-callback))))))
1261 1262
1262;; Since Emacs 19/20 does not allow you to change the 1263;; Since Emacs 19/20 does not allow you to change the
1263;; `after-change-functions' hook in the midst of running them, we fake 1264;; `after-change-functions' hook in the midst of running them, we fake