SF Tracker [ 1628636 ] SSDP packet copy patch

Submitted By: 
Fredrik Svensson - svefredrik
Summary:
Changed NUM_COPY to 1 since, according to section 9.2 of the HTTPU/MU spec,
we should never send more than one copy of a reply to an SSDP request.

Ref: section 9.2 of http://www.upnp.org/download/draft-goland-http-udp-04.txt



git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@117 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
Marcelo Roberto Jimenez 2007-01-06 20:46:55 +00:00
parent 436bc8fc6d
commit 5c4e45fb4d
2 changed files with 12 additions and 2 deletions

View File

@ -80,7 +80,7 @@ typedef enum SsdpCmdType{SSDP_ERROR=-1,
#define SSDP_IP "239.255.255.250"
#define SSDP_PORT 1900
#define NUM_TRY 3
#define NUM_COPY 2
#define NUM_COPY 1
#define THREAD_LIMIT 50
#define COMMAND_LEN 300

View File

@ -234,7 +234,17 @@ NewRequestHandler( IN struct sockaddr_in *DestAddr,
for( Index = 0; Index < NumPacket; Index++ ) {
int rc;
// The reason to keep this loop is purely historical/documentation,
// according to section 9.2 of HTTPU spec:
//
// "If a multicast resource would send a response(s) to any copy of the
// request, it SHOULD send its response(s) to each copy of the request
// it receives. It MUST NOT repeat its response(s) per copy of the
// reuqest."
//
// http://www.upnp.org/download/draft-goland-http-udp-04.txt
//
// So, NUM_COPY has been changed from 2 to 1.
NumCopy = 0;
while( NumCopy < NUM_COPY ) {
DBGONLY( UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,