- session = sessions.heads[hashidx];
- while (session && strcmp(uuid, session->uuid))
+ session = sessions.first;
+ while (session && hashidx != session->hash && strcmp(uuid, session->uuid))
+ session = session->next;
+
+ return session;
+}
+
+/*
+ * search within the set of sessions the session of 'id'.
+ * return the session or NULL
+ */
+static struct afb_session *sessionset_search_id(uint16_t id)
+{
+ struct afb_session *session;
+
+ session = sessions.first;
+ while (session && id != session->id)