Bug #33 - mac port can't bind to an address - fix included
Submitted by: Anonymous
Date submitted: 2011-02-01 02:30:41 UTC
Status: Open
On the mac, I can't get jscoverage-server to bind to an address. When I compile
it and run it, I always get:
jscoverage-server: could not bind to address
Debugging it a bit, I found that the problem is that the sockaddr structure was
not zero'd out and therefore had garbage in it when passed to bind. The quick
fix is to bzero the structure right after declaring it on the stack.
On line 174 of http-server.c add this line:
bzero(&a, sizeof(a));
This fixes the problem and jscoverage is now able to bind to the port.
Greg
Add a comment
Date submitted: 2011-02-01 14:37:08 UTC