Opened 13 years ago

Closed 12 years ago

#764 closed defect (fixed)

unix-sockets: port-data is set incorrectly

Reported by: Moritz Heidkamp Owned by: felix winkelmann
Priority: major Milestone:
Component: extensions Version: 4.7.x
Keywords: Cc:
Estimated difficulty:

Description

The data slot of ports returned by unix-sockets's io-ports procedure is set incorrectly:

#;1> (use unix-sockets)
; loading /usr/lib/chicken/6/unix-sockets.import.so ...
; loading /usr/lib/chicken/6/easyffi.import.so ...
; loading /usr/lib/chicken/6/unix-sockets.so ...
#;2> (unix-connect "/tmp/foo.sock")
#<input port "(unix)">
#<output port "(unix)">
; 2 values
#;3> (##sys#port-data #2)
#(#(3 #f #f))

The attached patch fixes this by using ##sys#set-port-data!. I hope this procedure isn't too recent!

By the way, it looks like unix-sockets depends on easyffi merely for the #> <# read syntax. Maybe this dependency could be gotten rid of?

Attachments (1)

fix-setting-of-port-data.patch (526 bytes) - added by Moritz Heidkamp 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Moritz Heidkamp

comment:1 Changed 13 years ago by felix winkelmann

Milestone: 4.8.0

comment:2 Changed 12 years ago by sjamaan

Owner: set to felix winkelmann
Status: newassigned

comment:3 in reply to:  description Changed 12 years ago by felix winkelmann

Replying to syn:

By the way, it looks like unix-sockets depends on easyffi merely for the #> <# read syntax. Maybe this dependency could be gotten rid of?

It actually uses "#>! ... <#".

comment:4 Changed 12 years ago by felix winkelmann

Resolution: fixed
Status: assignedclosed

Patch applied (1.8), thanks very much.

Note: See TracTickets for help on using tickets.