+
+DnsTransaction *dns_scope_find_transaction(DnsScope *scope, DnsQuestion *question) {
+ DnsTransaction *t;
+
+ assert(scope);
+ assert(question);
+
+ /* Try to find an ongoing transaction that is a equal or a
+ * superset of the specified question */
+
+ LIST_FOREACH(transactions_by_scope, t, scope->transactions)
+ if (dns_question_is_superset(t->question, question) > 0)
+ return t;
+
+ return NULL;
+}