anyone has updated POP3 library?

Started by winger, August 08, 2012, 10:15:31 AM

Previous topic - Next topic

winger

Now it's not work even a simple login test.


(print (POP3:get-mail-status ""user" "password" "my-isp.com"))

==!
Welcome to a newlisper home:)

http://www.cngrayhat.org\">//http://www.cngrayhat.org

hotcore

#1
I don't know anything about that library, but there is a syntax error in your statement: unbalanced double quotes. Maybe that is the problem?

/Arie

winger

#2
Quote from: "hotcore"I don't know anything about that library, but there is a syntax error in your statement: unbalanced double quotes. Maybe that is the problem?

/Arie

--!

@hotcore

I just copied the original code on pop3.lsp.

hah.

I found several problems and fix them.

Now they can run at least.



code:

http://code.google.com/p/winger-newlisp-toy/source/browse/modules/pop3.lsp">//http://code.google.com/p/winger-newlisp-toy/source/browse/modules/pop3.lsp



and have a bug:



;package return from POP Server.

;00000000: 2B 4F 4B 20 0D 0A +OK ..



but

(net-receive socket status 256 "+OK ")

;(net-receive socket status 256 " ")

The entire function will wait indefinitely if the last stromg parameter to the end with a space.

A temporary solution is :
:old code
(net-confirm-request)
(net-receive socket status 256)

;change to
(net-confirm-request)
;add follow code
(if (and (net-receive socket status 256) (= " " status))
 (net-receive socket status 256)
 status
)

;With a separate macro
(define-macro (net-receive_blank int_socket sym-buffer max-bytes wait-string)
    (letex (int_socket (eval int_socket)
            sym-buffer  sym-buffer
            max-bytes max-bytes
            )
            (if (and (net-receive int_socket sym-buffer max-bytes) (= " " sym-buffer))
                (net-receive  int_socket sym-buffer  max-bytes)
            )
    )
)
Welcome to a newlisper home:)

http://www.cngrayhat.org\">//http://www.cngrayhat.org