Re: Fwd: [PATCH] check ip callback
Date: Fri, 21 Sep 2007 12:30:41 +0200 (CEST)
On Thu, 20 Sep 2007, Alexey Pesternikov wrote:
>> I think I would prefer a separate new struct
> Two corrections. First, si_family etc. should not be a pointers.
Oh yes, that was just a mistake when I did a little too much copy n paste to
> Second, it would be better to use sockaddr_storage unless we want to deal
> with memory ownership.
Speaking of that, in your version of this patch how are you dealing with
sockaddr memory ownership? (and painfully enough the sockaddr_storage struct
doesn't exist everywhere)
I mean, assume a case where you want to switch a given IPv4 address into a
> I think it would make the API more complicated and error-prone. It would not
> take too much resources to save the old structure and compare 3 integers
> after return. Anyway most of the time the family will not be provided by
> callback directly but obtained from resolver instead, so callback will have
> to detect the changes by itself and set the flags.
Okay, since you're the guy who's actually using this function (and I am not)
I'll listen to your advice and opinion about this so we're back on the
7-argument callback proto...
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-09-21