bug-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-serveez] core dump


From: stefan
Subject: Re: [bug-serveez] core dump
Date: Sat, 2 Mar 2002 14:49:51 +0100 (CET)

On Fri, 1 Mar 2002, Bosnjak Zoran    RDVV wrote:

> Hello,

Hi!

> this was my very first attempt on defining a server. I have tryed to run it
> unfinished. I guess it's beginners luck to get the seg.fault on the first
> try. Anyway I am sending you the bug report and the sample program. I hope
> it will help you.

Thank you for this bug report.  An appropriate fix has been applied to the
development CVS tree.  On the other hand it was just a problem because one
of the Guile macros we are using in our code is different in Guile 1.3.4
post and pre version.  The segmentation fault does not occur with Guile
1.4.  Please see the below scheme code which fixes the problem for now:

======================================================================
; sink tcp server
; 1.3.2002 1.test - Zoran Bosnjak (address@hidden)
;
; pogoltne vse pakete, ki jih dobi
; uporabno za merjenje hitrosti prenosa na klientu

(define (sink-info-server server)
  "This is sink server")

(define (sink-handle-request sock request len)
  (begin 
    (svz:sock:final-print sock)
    (svz:sock:print sock "bye!") 
    0))

(define (sink-connect-socket server sock)
  (display "connect socket") (newline)
  (svz:sock:boundary sock "\n")
  (svz:sock:handle-request sock sink-handle-request)
  (svz:sock:print sock "just got in!"))

(define (sink-detect-proto server sock)
  1)

; port configuration
(define-port! 'sink-tcp-port '(
    (proto . tcp) 
    (port . 3001)))

; server conf.
(define-servertype! '(
    (prefix         .   "sink")
    (description    .   "sink tcp server")
    (detect-proto   .   sink-detect-proto)
    (connect-socket .   sink-connect-socket)
    (info-server    .   sink-info-server)
    (configuration  .   ())
    ))

(define-server! 'sink-server)
(bind-server! 'sink-tcp-port 'sink-server)
======================================================================

This modified version of the sink server will work with Guile 1.3.4 (i.e.
your current Serveez/Guile installation).

If you bump into more problems or have difficulties with the documentation
you are welcome to ask.

Cheers,
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]