[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-serveez] core dump when calling svz:sock:data before svz:sock:s
From: |
stefan |
Subject: |
Re: [bug-serveez] core dump when calling svz:sock:data before svz:sock:server |
Date: |
Sat, 9 Mar 2002 20:25:09 +0100 (CET) |
On Tue, 5 Mar 2002, Neil W. Van Dyke wrote:
> After calling "svz:sock:connect" from Guile, Serveez 0.1.3 appeared to
> consistently dump core when I called "svx:sock:data" to set the data
> before calling "svz:sock:server" to set the managing server.
>
> Serveez stopped dumping core when I changed the code to call
> "svz:sock:server" before "svz:sock:data".
The actual problem was that you did not assign an appropriate
check-request callback or a packet boundary + handle-request callback.
Serveez then "thought" the new connected socket was a listener. This
problem has been fixed in CVS. The core dump should not occur anymore.
> If it's essential that the server be set before the data when creating a
> socket with "svz:sock:connect", then slightly more graceful handling and
> reporting of error conditions would be helpful.
It is essential to assign the check-request and/or handle-request
callback.
A valid sequence may be:
(set! sock (svz:sock:connect ...))
(if sock
(begin
(svz:sock:check-request sock ...))
OR
(svz:sock:boundary sock ...)
(svz:sock:handle-request sock ...))
(display "unable to connect\n"))
Hope this helps,
address@hidden