Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: pop problems

From: gchiu:compkarori at: 13-Oct-2002 9:06

On Sat, 12 Oct 2002 20:18:11 +1000 "Allen Kamp" <[rebol--optushome--com--au]> wrote:
>Do you have something like norton anti-virus running on >the same machine? It
Hi Allen, No I don't have NAV running. I tried retrieving this message on 3 different PCs with the same result. This suggests that the problem is with Rebol. As an aside, I notice that in the Rebol POP code, there is this function: read-message: func [ "Read a message from the POP server" port n [integer!] /local buf line ][ insert port/sub-port reform [ "RETR" system/words/pick port/locals/msg-nums port/state/index + n] net-utils/confirm port/sub-port write-check read-til-dot port buf: make string! 1024 ; guess at size ] The buffer is created each time a message is read. Since the message size is already known within locals/sizes, presumably this could be sped up a little by allocating the exact amount of memory instead of 1024 each time. read-til-dot: func [port buf][ while [(line: system/words/pick port/sub-port 1) <> "."] [ insert tail buf line insert tail buf newline ] buf ] This function reads from the POP port until it retrieves only a ".". I was thinking of returning the buffer if the expected number of chars are retrieved as an additional check. I'm gonna have to wait till I hit another message I can't download to test this out. I had another one like this last week, and I just deleted it from the pop server so I could download all the other messages. For reference, this troublesome message was 16674 octets long. -- Graham Chiu