mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-19 19:40:56 +00:00
Re-init SSDP peer address before every search
This commit is contained in:
1 parent
ebda2cb100
commit
6725d61b3f
1 file changed
+3
@@ -14,6 +14,9 @@ static void tfn(void *param) {
|
|||||||
struct mg_connection *c = param;
|
struct mg_connection *c = param;
|
||||||
if (c == NULL) return;
|
if (c == NULL) return;
|
||||||
LOG(LL_INFO, ("Sending M-SEARCH"));
|
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",
|
mg_printf(c, "%s",
|
||||||
"M-SEARCH * HTTP/1.1\r\n"
|
"M-SEARCH * HTTP/1.1\r\n"
|
||||||
"HOST: 239.255.255.250:1900\r\n"
|
"HOST: 239.255.255.250:1900\r\n"
|
||||||
|
|||||||
Reference in new issue
Block a user