From cd21a15f3a432ea62341717ef535132d62a482f0 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 11 Nov 2007 01:25:53 +0000 Subject: [PATCH] (epg-reset): Clear "operation" and "operation-data" slots. --- ChangeLog | 1 + epg.el | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0f5bde..28b52c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ (epg--process-filter): Pick up status handler from "operation-data". (epg-start-edit-key): New function. (epg-edit-key): New function. + (epg-reset): Clear "operation" and "operation-data" slots. 2007-09-05 Daiki Ueno diff --git a/epg.el b/epg.el index a7e85da..f0f57c8 100644 --- a/epg.el +++ b/epg.el @@ -190,7 +190,8 @@ cipher-algorithm digest-algorithm compress-algorithm #'epg-passphrase-callback-function nil - nil nil nil nil nil nil nil))) + nil nil nil nil nil nil + (make-vector 31 0)))) (defun epg-context-protocol (context) "Return the protocol used within CONTEXT." @@ -391,12 +392,6 @@ This function is for internal use only." (signal 'wrong-type-argument (list 'epg-context-p context))) (aset (cdr context) 14 operation)) -(defun epg-context-set-operation-data (context operation-data) - "Set the name of the current cryptographic operation." - (unless (eq (car-safe context) 'epg-context) - (signal 'wrong-type-argument (list 'epg-context-p context))) - (aset (cdr context) 15 operation-data)) - (defun epg-make-signature (status &optional key-id) "Return a signature object." (cons 'epg-signature (vector status key-id nil nil nil nil nil nil nil nil @@ -1203,7 +1198,9 @@ This function is for internal use only." (if (and (epg-context-process context) (buffer-live-p (process-buffer (epg-context-process context)))) (kill-buffer (process-buffer (epg-context-process context)))) - (epg-context-set-process context nil)) + (epg-context-set-process context nil) + (epg-context-set-operation nil) + (fillarray (epg-context-operation-data context))) (defun epg-delete-output-file (context) "Delete the output file of CONTEXT." -- 2.11.0