Bug in sending advertisment set
Olga Soiko <[email protected]> Thu, 04 May 2006 12:16:20 +0300
| Newsgroups | gmane.linux.upnp-sdk.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------080209080204010406060605
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 7bit
According to UPnP Device Architecture
Section 1.1.2 Discovery: Advertisement: Device available -- NOTIFY
with ssdp:alive
"NT" in NOTIFY message described the next:
NT
Required header defined by GENA. Notification Type.
Must be one of the following. (cf. table above.)
Single URI.
upnp:rootdevice
Sent once for root device.
uuid:device-UUID
Sent once for each device, root or embedded.
Device UUID specified by UPnP vendor.
urn:schemas-upnp-org:device:deviceType:v
Sent once for each device, root or embedded.
Device type and version defined by UPnP Forum working
committee.
urn:schemas-upnp-org:service:serviceType:v
Sent once for each service.
Service type and version defined by UPnP Forum working
committee.
Because of 'while(NUM_COPY)' in the function 'NewRequestHandler'
NOTIFY messages with the same values of 'upnp:rootdevice',
'uuid:device-UUID', 'urn:schemas-upnp-org:device:deviceType:v',
'urn:schemas-upnp-org:service:serviceType:v' are sent more than ones.
I propose to delete 'while'.
--------------080209080204010406060605
Content-Type: text/plain;
name="7.2.4.3_7.2.4.5.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="7.2.4.3_7.2.4.5.diff"
diff -Naur old/upnp/src/ssdp/ssdp_device.c new/upnp/src/ssdp/ssdp_device.c
--- old/upnp/src/ssdp/ssdp_device.c 2006-02-22 23:38:04 +0200
+++ new/upnp/src/ssdp/ssdp_device.c 2006-04-10 16:50:43 +0300
@@ -231,7 +231,7 @@
int rc;
NumCopy = 0;
- while( NumCopy < NUM_COPY ) {
+// while( NumCopy < NUM_COPY ) {
DBGONLY( UpnpPrintf( UPNP_INFO, SSDP, __FILE__, __LINE__,
">>> SSDP SEND >>>\n%s\n",
*( RqPacket + Index ) );
@@ -241,7 +241,7 @@
0, ( struct sockaddr * )DestAddr, socklen );
imillisleep( SSDP_PAUSE );
++NumCopy;
- }
+// }
}
shutdown( ReplySock, SD_BOTH );
--------------080209080204010406060605--
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642