[Erc-discuss] /dcc send produces process errors near end of transmission
From:
Brent Goodrick
Subject:
[Erc-discuss] /dcc send produces process errors near end of transmission
Date:
Sun, 16 Dec 2007 20:59:23 -0500
Hi,
I tried to send a file with DCC SEND from a ERC 5.2 client running under GNU Emacs 22.1 to a Chatzilla client. Both were running on the same machine, but I did not specify any special hostnames. I issued the
/dcc send <nick> <filepath> command from the ERC client (from a "address@hidden" buffer). I accepted the file on the Chatzilla client and was able to save that file from Chatzilla without error. However, once I accepted it from the Chatzilla client, in Emacs I then I immediately received Elisp errors (as taken from the *Messages* buffer):
error in process sentinel: erc-dcc-send-sentinel: Wrong type argument: markerp, nil
error in process sentinel: Wrong type argument: markerp, nil error in process sentinel: erc-dcc-send-sentinel: Wrong type argument: markerp, nil
error in process sentinel: Wrong type argument: markerp, nil
I think that the problem lies in erc-dcc-send-sentinel in that it uses the nil value returned from erc-dcc-member. The version of that function I see in my setup is:
(defun erc-dcc-send-sentinel (proc event) (let* ((elt (erc-dcc-member :peer proc)) (buf (marker-buffer (plist-get elt :sent))))
(cond ((string-match "^open from " event) (when elt (with-current-buffer buf (set-process-buffer proc buf) (setq erc-dcc-entry-data elt))
(run-hook-with-args 'erc-dcc-send-connect-hook proc))))))
As a fix, I changed that function to test for that condition: (defun erc-dcc-send-sentinel (proc event)
(let ((elt (erc-dcc-member :peer proc))) ;; erc-dcc-send-filter will delete the entry that erc-dcc-member would normally return when sending is finshed, resulting ;; in elt being nil: (when elt
(let ((buf (marker-buffer (plist-get elt :sent)))) (cond ((string-match "^open from " event) (with-current-buffer buf (set-process-buffer proc buf)
(setq erc-dcc-entry-data elt)) (run-hook-with-args 'erc-dcc-send-connect-hook proc)))))))
The change above avoids passing a nil value to marker-buffer.
Perhaps the above change would be suitable for the mainline version?
Thanks, Brent
[Prev in Thread]
Current Thread
[Next in Thread]
[Erc-discuss] /dcc send produces process errors near end of transmission,
Brent Goodrick<=