idkwim / ouspg

Automatically exported from code.google.com/p/ouspg
3 stars 0 forks source link

radamsa fails to bind to win32 sockets #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which tool (radamsa, blab, ...)?
radamsa

What steps will reproduce the problem?
1. Start radamsa with -o :4000

What is the expected output? What do you see instead?
Expected radamsa to start, instead fails with "Could not bind to port 4000".

What version of the product are you using? On what operating system?
radamsa git 9febfd8259abc
Windows 7 x64
Windows XP SP3 x32

Please provide any additional information below.
Windows sockets need to be initialized before being used. In addition, to check 
if a socket was created successfully you need to check for INVALID_SOCKET.

The attached patch corrects these issues. You might want to relocate the socket 
initialization and teardown as I'm not sure if main() is the right place for 
them to be...

Regards,
Pedro

Original issue reported on code.google.com by ped...@gmail.com on 17 Jan 2014 at 2:47

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the bug report and patch!

It'll be a few days before I can test this with something that runs Windows. 
Socket initialization could be done lazily if they happen to be needed, but on 
it probably doesn't cause much of a delay to do it at startup, so they will 
probably stay in main().

Original comment by aohelin on 18 Jan 2014 at 5:10

GoogleCodeExporter commented 9 years ago
Grr.. I can't get to test this in Windows until next Tuesday due to floor 
renovation at work. Your patch is now applied to owl lisp trunk and seems to be 
working at least in Wine.

Thanks for the patch :)

Original comment by aohelin on 23 Jan 2014 at 7:57