On 3/14/2015 1:37 PM, Daniel Stenberg wrote:
On Sun, 8 Mar 2015, Ray Satiro via curl-library wrote:
I've started some work on fixing CURLOPT_RESOLVE. I have fixed it so
that multiple addresses can be stored for each host:port. You can
see a branch comparison at [1].
I didn't get any feedback on this so I just went ahead and wrote it
in the way I think is most correct.
https://github.com/jay/curl/commit/1ae8b1f
Thanks Ray, sorry for being slow to respond to this. Looks great!
Can you figure out some basic unit tests we can add for this so that
we can be reasonable sure the functions all work as intended after
these changes?
Also, you mention support for multiple addresses but I don't see any
change in the docs regarding that and I think it should get some
mention (as then I won't have to ask you how they are supposed to
work...)
I've never written a test for libcurl before but I'll take a shot at it.
Besides the doc issue I also have to look into properly handling this in
multi. Right now the hostpairs in each easy handle are loaded before
that handle's transfer but I think it would make more sense to load them
into the cache when they are added to the multi handle. What do you
think? This weekend I will have some time to look at these things, but I
doubt I will finish by then.
On 3/17/2015 7:05 AM, Stefan Bühler wrote:
you cannot change existing DNS entries after they have been added, because the
entries are possibly shared between multiple threads, and only the access to the
cache itself (and the ->inuse counter) is synchronized.
Best regards,
Stefan Bühler
Thanks I am aware that inuse entries should not be modified and I had
accommodated for that in my implementation. See the comment block at
[1]. What I wrote in that first e-mail was my initial impressions. You
can see all the changes so far at [2].
[1]:
https://github.com/jay/curl/commit/eabea3b#diff-282bc151454349873954250e7f8339fbR856
[2]: https://github.com/bagder/curl/compare/master...jay:fix-curlopt_resolve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html