minissdp.c: Also send byebye with all UUIDs

This commit is contained in:
Thomas Bernard 2013-06-15 14:51:28 +02:00
parent 04dec5cf7b
commit 87a7f05be6
1 changed files with 5 additions and 4 deletions
miniupnpd

View File

@ -1,4 +1,4 @@
/* $Id: minissdp.c,v 1.53 2013/06/14 16:58:00 nanard Exp $ */ /* $Id: minissdp.c,v 1.54 2013/06/15 12:50:10 nanard Exp $ */
/* MiniUPnP project /* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2013 Thomas Bernard * (c) 2006-2013 Thomas Bernard
@ -922,7 +922,8 @@ SendSSDPGoodbye(int * sockets, int n_sockets)
known_service_types[i].uuid, "::", known_service_types[i].uuid, "::",
known_service_types[i].s, /* ver_str, USN: */ known_service_types[i].s, /* ver_str, USN: */
ipv6); ipv6);
if(i==0) /* root device */ if(0==memcmp(known_service_types[i].s,
"urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
{ {
ret += SendSSDPbyebye(sockets[j], ret += SendSSDPbyebye(sockets[j],
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
@ -930,8 +931,8 @@ SendSSDPGoodbye(int * sockets, int n_sockets)
#else #else
(struct sockaddr *)&sockname, (struct sockaddr *)&sockname,
#endif #endif
uuidvalue_igd, "", /* NT: */ known_service_types[i].uuid, "", /* NT: */
uuidvalue_igd, "", "", /* ver_str, USN: */ known_service_types[i].uuid, "", "", /* ver_str, USN: */
ipv6); ipv6);
} }
} }