ssdp: Fix service submit to MiniSSDPd.

SubmitServicesToMiniSSDPD(lan_addr[0].str, runtime_vars.port)
is called before lan_addr[0].str get a proper value.
Patch add call to reload_ifaces() in order to fix that
see miniupnp forum post http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=1801

Thanks Thomas Bernard for this fix.
This commit is contained in:
Justin Maggard 2015-07-29 23:42:53 -07:00
parent 30562d0b66
commit edbdd9acb4

View File

@ -1055,6 +1055,7 @@ main(int argc, char **argv)
if (sssdp < 0)
{
DPRINTF(E_INFO, L_GENERAL, "Failed to open socket for receiving SSDP. Trying to use MiniSSDPd\n");
reload_ifaces(0); /* populate lan_addr[0].str */
if (SubmitServicesToMiniSSDPD(lan_addr[0].str, runtime_vars.port) < 0)
DPRINTF(E_FATAL, L_GENERAL, "Failed to connect to MiniSSDPd. EXITING");
}