From 7d91324b9a0ebb6a110a5f8284cbe2caf67ea226 Mon Sep 17 00:00:00 2001 From: sperber Date: Mon, 20 Jan 2003 15:12:03 +0000 Subject: [PATCH] Signal correct error (not a CALL-ERROR) from POP3-CHECK-TRANSACTION-STATE!; also pass correct caller to it. --- scheme/lib/pop3.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scheme/lib/pop3.scm b/scheme/lib/pop3.scm index 32824fc..ff020d1 100644 --- a/scheme/lib/pop3.scm +++ b/scheme/lib/pop3.scm @@ -153,7 +153,7 @@ ;; return number of messages and number of bytes waiting at the maildrop ;;: connection -> integer x integer (define (pop3-stat connection) - (pop3-check-transaction-state connection 'pop3-stat) + (pop3-check-transaction-state connection pop3-stat) (let* ((response (pop3-send-command connection "STAT")) (match (regexp-search (rx (posix-string "([0-9]+) ([0-9]+)")) response))) (values (string->number (match:substring match 1)) @@ -162,7 +162,7 @@ ;; dump the message number MSGID to (current-output-port) ;;: connection x integer -> status (define (pop3-get connection msgid) - (pop3-check-transaction-state connection 'pop3-get) + (pop3-check-transaction-state connection pop3-get) (let ((status (pop3-send-command connection (build-command "RETR" (number->string msgid))))) (pop3-dump (socket:inport (pop3-connection-command-socket connection))) @@ -170,7 +170,7 @@ ;;: connection x integer -> status (define (pop3-headers connection msgid) - (pop3-check-transaction-state connection 'pop3-headers) + (pop3-check-transaction-state connection pop3-headers) (let ((status (pop3-send-command connection (build-command "TOP" (number->string msgid) "0")))) (pop3-dump (socket:inport (pop3-connection-command-socket connection))) @@ -180,7 +180,7 @@ ;; ain't in the RFC, but seems to be supported by several servers. ;;: connection -> integer (define (pop3-last connection) - (pop3-check-transaction-state connection 'pop3-last) + (pop3-check-transaction-state connection pop3-last) (let ((response (pop3-send-command connection "LAST"))) (string->number (car ((infix-splitter) response))))) @@ -189,19 +189,19 @@ ;; can be undeleted using the RSET command. ;;: connection x integer -> status (define (pop3-delete connection msgid) - (pop3-check-transaction-state connection 'pop3-delete) + (pop3-check-transaction-state connection pop3-delete) (pop3-send-command connection (build-command "DELE" (number->string msgid)))) ;; any messages which have been marked for deletion are unmarked ;;: connection -> status (define (pop3-reset connection) - (pop3-check-transaction-state connection 'pop3-reset) + (pop3-check-transaction-state connection pop3-reset) (pop3-send-command connection "RSET")) ;;: connection -> status (define (pop3-quit connection) - (pop3-check-transaction-state connection 'pop3-quit) + (pop3-check-transaction-state connection pop3-quit) (let ((status (pop3-send-command connection "QUIT"))) (close-socket (pop3-connection-command-socket connection)) status)) @@ -226,7 +226,7 @@ (define (pop3-check-transaction-state connection caller) (if (not (eq? (pop3-connection-state connection) 'connected)) - (call-error "not in transaction state" caller))) + (error "not in transaction state" caller))) (define (pop3-read-response connection) (let* ((sock (pop3-connection-command-socket connection))