sony / nmos-cpp

An NMOS (Networked Media Open Specifications) Registry and Node in C++ (IS-04, IS-05)
Apache License 2.0
143 stars 80 forks source link

Default Domain looks at all interfaces even though just one is desired #140

Open jwpwh opened 4 years ago

jwpwh commented 4 years ago

I was getting errors similar to #101. Specifying "local" in the settings gets around the error message.

My question is with regards to nmos::details::default_domain() called from nmos::get_domain() which gets a domain name if one is not specified in the settings.

In my settings, I have "host_address" and "host_addresses" set so that only one interface is listed. The get_domain() calls default_domain() which checks all interfaces on my windows system.

Shouldn't the default_domain() or get_domain() functions be limited to looking at just the interfaces listed in "host_addresses" in the settings?

garethsb commented 4 years ago

Yes, that sounds reasonable.

garethsb commented 4 years ago

FWIW, I don't yet have a way of getting per-interface domain on *nix platforms, which means even filtering the host_interfaces by their addresses against the host_addresses isn't going to help there.

https://github.com/sony/nmos-cpp/blob/f115a216252313482ee8392def06e5cafc09fe07/Development/cpprest/host_utils.cpp#L193-L194