[Libevent-users] [Patch] http server high port/getaddrinfo bug
Philip Lewis
philip at esper-digital.net
Fri Jan 12 03:10:19 EST 2007
make_socket() in http.c takes the port as a short instead of an
unsigned short, so ports higher than 32767 become a negative number in
the string given to getaddrinfo(), which fails.
Also, getaddrinfo() uses the return code instead of errno, so it fails
with "[warn] getaddrinfo: Success". getnameinfo() also returns errors
this way.
Patch fixes both.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-highport-test.patch
Type: application/octet-stream
Size: 769 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070112/ca3e5378/http-highport-test-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-highport-fix.patch
Type: application/octet-stream
Size: 2821 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070112/ca3e5378/http-highport-fix-0001.obj
More information about the Libevent-users
mailing list