View previous topic :: View next topic |
Author |
Message |
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Fri Jun 07, 2013 4:57 pm Post subject: UUID |
|
|
until I hear back from upnp.org about some of the other issues, the UUID being unique for each device is the only thing left to fix for certification.
would an easy fix be to just increment the last digit of the UUID for each device, thus making them unique... might be the easiest solution for now. I'm going to take a look at the code and see if I can't help you out |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Sat Jun 08, 2013 8:23 am Post subject: |
|
|
I don't thing there is such thing as an "easy thing" to fix that. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Tue Jun 11, 2013 10:22 pm Post subject: |
|
|
Not an easy fix, just easier. This should be the last bit to pass certification though.
I'm tracing through everything to give myself a better idea, and hopefully help you out. For the alive message broadcast, sent via the "SendSSDPAnnounce2" function which is called multiple times (for each service/device), from ProcessSSDPData. So you could change the SendSSDPAnnounce2 function to accept the UUID and have an array of UUID read in from the conf file which would simply be incremented in the ProcessSSDPData function.
For the byebye functionality, you pretty much already have this, all you have to do is increment the UUID value within the for loop in SendSSDPbyebye.
I can code it up if you want, so you can take a look and tell me |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Jun 12, 2013 8:37 am Post subject: |
|
|
SSDP is not the only place where UUID is processed. The UUIDs have to match the XML descriptions _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Wed Jun 12, 2013 6:33 pm Post subject: |
|
|
where are the xml descriptions? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
|
Back to top |
|
|
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Fri Jun 14, 2013 4:37 pm Post subject: |
|
|
I tested it and the only issue, after talking to the upnp.org group is that the message:
Quote: | NT: uuid: 1935ead7-1886-4384-a7db-e7a0193091e6\r\n
USN: uuid: 1935ead7-1886-4384-a7db-e7a0193091e6\r\n |
needs to be sent for every UUID. Which I'm guesing just means removing the if(i==0) /* root device */ line in SendSSDPNotifies.
can you confirm? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Fri Jun 14, 2013 4:57 pm Post subject: |
|
|
I think you are right. see the following patch
Code: | --- minissdp.c 13 Jun 2013 13:21:29 -0000 1.52
+++ minissdp.c 14 Jun 2013 16:56:11 -0000
@@ -537,11 +537,14 @@ SendSSDPNotifies(int s, const char * hos
known_service_types[i].uuid, "::",
known_service_types[i].s, /* ver_str, USN: */
lifetime, ipv6);
- if(i==0) /* rootdevice */
+ if(0==memcmp(known_service_types[i].s,
+ "urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
+ {
SendSSDPNotify(s, (struct sockaddr *)&sockname, host, port,
- uuidvalue_igd, "", /* NT: */
- uuidvalue_igd, "", "", /* ver_str, USN: */
+ known_service_types[i].uuid, "", /* NT: */
+ known_service_types[i].uuid, "", "", /* ver_str, USN: */
lifetime, ipv6);
+ }
i++;
}
}
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
twear
Joined: 01 Nov 2012 Posts: 80
|
Posted: Fri Jun 14, 2013 6:13 pm Post subject: |
|
|
should of caught this before, but ut needs to go in the byebye messages as well |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Sat Jun 15, 2013 12:49 pm Post subject: |
|
|
Code: | --- minissdp.c 14 Jun 2013 16:58:00 -0000 1.53
+++ minissdp.c 15 Jun 2013 12:49:06 -0000
@@ -922,7 +922,8 @@ SendSSDPGoodbye(int * sockets, int n_soc
known_service_types[i].uuid, "::",
known_service_types[i].s, /* ver_str, USN: */
ipv6);
- if(i==0) /* root device */
+ if(0==memcmp(known_service_types[i].s,
+ "urn:schemas-upnp-org:device", sizeof("urn:schemas-upnp-org:device")-1))
{
ret += SendSSDPbyebye(sockets[j],
#ifdef ENABLE_IPV6
@@ -930,8 +931,8 @@ SendSSDPGoodbye(int * sockets, int n_soc
#else
(struct sockaddr *)&sockname,
#endif
- uuidvalue_igd, "", /* NT: */
- uuidvalue_igd, "", "", /* ver_str, USN: */
+ known_service_types[i].uuid, "", /* NT: */
+ known_service_types[i].uuid, "", "", /* ver_str, USN: */
ipv6);
}
}
|
_________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
© 2007 Thomas Bernard, author of MiniUPNP.
|