same fix as 827fc6f04 for SendSSDPGoodbye()

see #459
This commit is contained in:
Thomas Bernard 2020-06-02 09:08:59 +02:00
parent b8c8cec26b
commit bc645c108d
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C
1 changed files with 2 additions and 1 deletions

View File

@ -1449,7 +1449,8 @@ SendSSDPGoodbye(int * sockets, int n_sockets)
known_service_types[i].s, ver_str, /* NT: */
known_service_types[i].uuid, "::",
known_service_types[i].s); /* ver_str, USN: */
if(0==memcmp(known_service_types[i].s,
if(i > 0 && /* only known_service_types[0].s is shorter than "urn:schemas-upnp-org:device" */
0==memcmp(known_service_types[i].s,
"urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
{
ret += SendSSDPbyebye(sockets[j],