From: F. Jason Park Date: Fri, 11 Dec 2020 15:36:02 +0000 (+0100) Subject: Append incremental message segments in socks-filter X-Git-Tag: emacs-28.0.90~4781 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=abc8d6b9465fecb989170426756c7ee4b133fd40;p=emacs.git Append incremental message segments in socks-filter * lisp/net/socks.el (socks-filter): Preserve the order data arrive instead of semi-reversing it (bug#45162). Copyright-paperwork-exempt: yes --- diff --git a/lisp/net/socks.el b/lisp/net/socks.el index 9b22a5083fb..cb50a0adbea 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -260,7 +260,7 @@ (setq state (process-get proc 'socks-state)) (cond ((= state socks-state-waiting-for-auth) - (cl-callf (lambda (s) (setq string (concat string s))) + (cl-callf (lambda (s) (setq string (concat s string))) (process-get proc 'socks-scratch)) (if (< (length string) 2) nil ; We need to spin some more @@ -272,7 +272,7 @@ ((= state socks-state-authenticated) ) ((= state socks-state-waiting) - (cl-callf (lambda (s) (setq string (concat string s))) + (cl-callf (lambda (s) (setq string (concat s string))) (process-get proc 'socks-scratch)) (setq version (process-get proc 'socks-server-protocol)) (cond @@ -542,7 +542,7 @@ service)) (process-put proc 'socks-buffer buffer) (process-put proc 'socks-host host) - (process-put proc 'socks-service host) + (process-put proc 'socks-service service) (set-process-filter proc nil) (set-process-buffer proc (if buffer (get-buffer-create buffer))) proc))))