ingar
Joined: 20 May 2015 Posts: 1 Location: Kongsberg
|
Posted: Wed May 20, 2015 11:06 am Post subject: upnpDiscoverDevices only return one device |
|
|
Hi,
I'm adding upnp discovery to one of my applications using the static linked library. My problem is that I am searching for 2 (for now) different types of devices, but the upnpDiscoverDevices only return one. upnpDiscoverAll returns all devices on my network as expected.
I run the following code:
Code: |
int main(void)
{
const char * multicastif = 0;
const char * minissdpdpath = 0;
int error = 0;
struct UPNPDev * devlist = 0;
struct UPNPDev * dev;
char type[64];
char * const devList[] = {
"urn:schemas-upnp-org:device:ZonePlayer:1",
"urn:schemas-upnp-org:device:Y-cam Cube HD720 White:1",
0
};
devlist = upnpDiscoverDevices((const char * const *)devList, 4000, multicastif, minissdpdpath, 0, 0, &error);
if (devlist)
{
for (dev=devlist;dev!=NULL; dev = dev->pNext)
{
printf("%-48s\t%s\n", dev->st, dev->descURL);
}
freeUPNPDevlist(devlist);
}
else
{
printf("No devices found\n");
}
return 0;
}
|
Both devices are normally connected to my network, in which case only the one that is connected first is found. If I disconnect the first one, the other one is found. Reconnect both, the one connected last is not found.
error does not indicate an error...
Anything I'm missing here?
Thanks,
Ingar |
|