Re-init SSDP peer address before every search

This commit is contained in:
Sergey Lyubka committed 2022-01-07 18:28:51 +00:00
1 parent ebda2cb100
commit 6725d61b3f
1 file changed
+3
+3
View File
@@ -14,6 +14,9 @@ static void tfn(void *param) {
struct mg_connection *c = param;
if (c == NULL) return;
LOG(LL_INFO, ("Sending M-SEARCH"));
// Each response to the SSDP socket will change c->peer, so re-initialise
// c->peer to the multicast address before each search request
mg_resolve(c, s_ssdp_url);
mg_printf(c, "%s",
"M-SEARCH * HTTP/1.1\r\n"
"HOST: 239.255.255.250:1900\r\n"