OSDN Git Service

(epg-reset): Clear "operation" and "operation-data" slots.
authorDaiki Ueno <ueno@unixuser.org>
Sun, 11 Nov 2007 01:25:53 +0000 (01:25 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sun, 11 Nov 2007 01:25:53 +0000 (01:25 +0000)
ChangeLog
epg.el

index e0f5bde..28b52c3 100644 (file)
--- 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  <ueno@unixuser.org>
 
diff --git a/epg.el b/epg.el
index a7e85da..f0f57c8 100644 (file)
--- a/epg.el
+++ b/epg.el
                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."