* Use MiniSSDPd if it is available. (Thanks Thomas Bernard)

This commit is contained in:
Justin Maggard
2011-07-22 23:03:38 +00:00
parent a818f5db33
commit 0b3295b701
8 changed files with 87 additions and 4 deletions

View File

@ -588,6 +588,9 @@ init(int argc, char * * argv)
break;
}
break;
case UPNPMINISSDPDSOCKET:
minissdpdsocketpath = ary_options[i].value;
break;
default:
fprintf(stderr, "Unknown option in file %s\n",
optionsfile);
@ -974,7 +977,11 @@ main(int argc, char * * argv)
sudp = OpenAndConfSSDPReceiveSocket(n_lan_addr, lan_addr);
if(sudp < 0)
{
DPRINTF(E_FATAL, L_GENERAL, "Failed to open socket for receiving SSDP. EXITING\n");
DPRINTF(E_INFO, L_GENERAL, "Failed to open socket for receiving SSDP. Trying to use MiniSSDPd\n");
if(SubmitServicesToMiniSSDPD(lan_addr[0].str, runtime_vars.port) < 0) {
DPRINTF(E_FATAL, L_GENERAL, "Failed to connect to MiniSSDPd. EXITING");
return 1;
}
}
/* open socket for HTTP connections. Listen on the 1st LAN address */
shttpl = OpenAndConfHTTPSocket(runtime_vars.port);