|
From: Stephen S. <rad...@gm...> - 2011-10-02 21:40:41
|
Thanks Camille! Some comments, - There's a small typo in your sscanf line, an extra unicode double-quotation mark seems to have snuck in there. - In your change to lo_address_resolve(), I think "host" will be NULL in the case that "a->host" is not a dotted quad. In any case, since a dotted-quad can only be a string with a limited length, using the stack instead calloc would avoid the need to deal with free() for the case where host!=a->host. - For SO_NOSIGPIPE, I prefer to just check for the presence of the option itself instead of checking __APPLE__. (i.e. #ifdef SO_NOSIGPIPE) - Regarding your iteration over the addrinfo list in send_data(): in the other thread you mentioned that iterating over addrinfo is necessary, and I agree this should be done, but I wonder if ultimately once the correct addrinfo is found it can be always reused. It would be nice to determine this during lo_address_resolve() instead of on every send. But maybe the correct one cannot be determined until send() is called, in that case maybe the choice could be cached, what do you think? ( e.g. "if (ai!=NULL) a->ai = ai;", of course this would have to be handled correctly in lo_address_free().) The first 3 points I have fixed myself, but just wondering about your opinion on the last point before I commit. thanks, Steve On Fri, Sep 30, 2011 at 6:57 PM, Camille Troillard <ca...@os...> wrote: > Here is a more complete patch that includes the previous fixes, and addresses the 'dotted-quad' issue described below. > > When ENABLE_IPV6 is defined, during lo_address_resolve, we check is the hostname is a dotted-quad, and if it is, prepend ::FFFF: and use the updated hostname as an argument to getaddrinfo. > > This has been tested under Mac OS X 10.6.8. > Feel free to send your suggestions. > > > Cam > > > > On 30 sept. 2011, at 19:35, Camille Troillard wrote: > >> Here your patch Stephen ! >> It was actually easier to implement than I thought. >> >> What this patch does: >> >> 1. Prevent SIGPIPE on Mac OS X. >> 2. Enable dual mode IPv4 + IPv6 listening socket. >> 3. Iterate over addrinfo results. >> >> One important caveat though: >> >> When ENABLE_IPV6 is defined, IPv4 addresses must be mapped to IPv6. getadfrinfo does not that automatically. >> >> For example 127.0.0.1 becomes ::FFFF:127.0.0.1. >> >> Therefore av 4 OSC URL that looks like this: >> >> osc.udp://192.168.1.82:8000 >> >> Will have to be written this way: >> >> osc.udp://[::FFFF:192.168.1.82]:8000 >> >> I think that this is not a big deal. >> We can add some code that automatically detected IP address with dotted notation, and prepend the v6 mapping before passing the host string to getaddrinfo. > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > liblo-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/liblo-devel > > |