Only remove UPnP Events subscription once it is no longer in use by any active services
authorRich Tibbett <richt@opera.com>
Tue, 05 Feb 2013 15:21:33 +0100
changeset 378 89d1cef16d35
parent 377 a311e7fe116c
child 379 7a9a351e1577
Only remove UPnP Events subscription once it is no longer in use by any active services
discovery-api/Overview.src.html
--- a/discovery-api/Overview.src.html	Tue Feb 05 13:20:57 2013 +0100
+++ b/discovery-api/Overview.src.html	Tue Feb 05 15:21:33 2013 +0100
@@ -1094,11 +1094,7 @@
             identifier</var> then skip any remaining sub-steps for the current <var>existing service record</var> and
             continue at the next available <var>existing service record</var>.
             </li>
-            <li>If the <var>existing service record</var>'s <code>type</code> property begins with the DOMString
-            "<code>upnp:</code>" and <var>existing service record</var>'s <code>eventsURL</code> property is set then
-            run the rule to <a>terminate an existing UPnP Events Subscription</a>, if one is currently active (as a
-            result of having previously called <a>setup a UPnP Events Subscription</a> against the current
-            <var>existing service record</var>).
+            <li>Let <var>'service type in use' flag</var> be <code>false</code>.
             </li>
             <li>For each <var>service manager</var> in the <a>list of active service managers</a> run the following
             steps:
@@ -1128,8 +1124,9 @@
                     <var>requested control type</var> then abort any remaining sub-steps and continue at the next
                     available <var>requested control type</var>.
                     </li>
-                    <li>Set the <var>'service type in current service manager' flag</var> to <code>true</code>, abort
-                    any remaining sub-steps and continue.
+                    <li>Set the <var>'service type in current service manager' flag</var> to <code>true</code> and the
+                    <var>'service type in use' flag</var> to <code>true</code>, abort any remaining sub-steps and
+                    continue.
                     </li>
                   </ol>
                 </li>
@@ -1146,6 +1143,12 @@
                 </li>
               </ol>
             </li>
+            <li>If the <var>'service type in use' flag</var> is <code>false</code> and the <var>existing service
+            record</var>'s <code>type</code> property begins with the DOMString "<code>upnp:</code>" and <var>existing
+            service record</var>'s <code>eventsURL</code> property is set then run the rule to <a>terminate an existing
+            UPnP Events Subscription</a>, if one is currently active (as a result of having previously called <a>setup
+            a UPnP Events Subscription</a> against the current <var>existing service record</var>).
+            </li>
             <li>Remove <var>existing service record</var> from the current <a>list of available service records</a>.
             </li>
           </ol>