-/* subscription_unlink -- remove from the active list */
-void subscription_unlink(struct subscription *s)
-{
- struct upnp_wps_device_sm *sm = s->sm;
-
- if (s->next == s) {
- /* only one? */
- sm->subscriptions = NULL;
- } else {
- if (sm->subscriptions == s)
- sm->subscriptions = s->next;
- s->next->prev = s->prev;
- s->prev->next = s->next;
- }
- sm->n_subscriptions--;
-}
-
-
-/* subscription_link_to_end -- link to end of active list
- * (should have high expiry time!)
- */
-static void subscription_link_to_end(struct subscription *s)
-{
- struct upnp_wps_device_sm *sm = s->sm;
-
- if (sm->subscriptions) {
- s->next = sm->subscriptions;
- s->prev = s->next->prev;
- s->prev->next = s;
- s->next->prev = s;
- } else {
- sm->subscriptions = s->next = s->prev = s;
- }
- sm->n_subscriptions++;
-}
-
-