Thanks for the patch. Another user reported this same issue, but I haven't gotten a chance to look at it yet. Actually, it appears ##sys#scan-buffer-line may have changed its signature recently to return multiple values. I still need to verify that and if so, make sure the code works with both versions.
Jim On Jul 6, 2014, at 6:55 PM, Jonathan Chan <j...@fastmail.fm> wrote: > Hello, > > First of all, thanks again for the useful eggs and Scheme implementation. I > was trying to write a script using the intarweb egg and ran into a problem > where read-line on a socket would return a number instead of a string. I > looked into it and believe I have found a fix, which is attached. > > The problem had two parts: first, socket's implementation of read-line > returned the result of a call to ##sys#scan-buffer-line, which returns > multiple values, whereas read-line seems to be supposed to return only the > string that was read. Second, the bufindex variable representing the position > within the socket was updated within the eos-handler lambda, although it is > possible for the eos-handler procedure to never be called within > ##sys#scan-buffer-line. To fix the bug all that is needed is to unpack the > values returned from ##sys#scan-buffer-line and use those to set the buffer > index then return. > > Thanks, > -- > Jonathan Chan > j...@fastmail.fm > <fix_socket_read_line.diff>_______________________________________________ > Chicken-hackers mailing list > Chicken-hackers@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-hackers _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers