fukamachi / woo

A fast non-blocking HTTP server on top of libev
http://ultra.wikia.com/wiki/Woo_(kaiju)
MIT License
1.28k stars 98 forks source link

The value 3375638364 is not of type (SIGNED-BYTE 32) #39

Closed triclops200 closed 8 years ago

triclops200 commented 8 years ago

This is an issue with the call to inet_ntoa. The cffi defun declares the type of the argument as an int64. This is incorrect. The actual call to inet_ntoa takes in a struct, not a pointer to a struct. The value inside of that struct is a single uint32. You can, thus, declare the type as a uint32, but an int64 is wrong. Also, one should be using inet_ntop and inet_pton instead of inet_ntoa and inet_aton.

For references to the solution to this issue see: http://www.retran.com/beej/inet_ntoaman.html http://man7.org/linux/man-pages/man7/ip.7.html

fukamachi commented 8 years ago

Had been resolved via #35. Closing.