Lines Matching refs:state

181                 if (t->state != DNS_TRANSACTION_NULL)  in dns_query_candidate_go()
199 DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS; in dns_query_candidate_state() local
209 switch (t->state) { in dns_query_candidate_state()
228 state = t->state; in dns_query_candidate_state()
232 if (state != DNS_TRANSACTION_SUCCESS) in dns_query_candidate_state()
233 state = t->state; in dns_query_candidate_state()
238 return state; in dns_query_candidate_state()
300 DnsTransactionState state; in dns_query_candidate_notify() local
308 state = dns_query_candidate_state(c); in dns_query_candidate_notify()
310 if (DNS_TRANSACTION_IS_LIVE(state)) in dns_query_candidate_notify()
313 if (state != DNS_TRANSACTION_SUCCESS && c->search_domain) { in dns_query_candidate_notify()
577 void dns_query_complete(DnsQuery *q, DnsTransactionState state) { in dns_query_complete() argument
579 assert(!DNS_TRANSACTION_IS_LIVE(state)); in dns_query_complete()
580 assert(DNS_TRANSACTION_IS_LIVE(q->state)); in dns_query_complete()
585 q->state = state; in dns_query_complete()
631 static int dns_query_synthesize_reply(DnsQuery *q, DnsTransactionState *state) { in dns_query_synthesize_reply() argument
636 assert(state); in dns_query_synthesize_reply()
642 if (!IN_SET(*state, in dns_query_synthesize_reply()
667 *state = DNS_TRANSACTION_RCODE_FAILURE; in dns_query_synthesize_reply()
682 *state = DNS_TRANSACTION_SUCCESS; in dns_query_synthesize_reply()
724 if (q->state != DNS_TRANSACTION_NULL) in dns_query_go()
748 DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS; in dns_query_go() local
750 r = dns_query_synthesize_reply(q, &state); in dns_query_go()
754 dns_query_complete(q, state); in dns_query_go()
787 q->state = DNS_TRANSACTION_PENDING; in dns_query_go()
810 DnsTransactionState state = DNS_TRANSACTION_NO_SERVERS; in dns_query_accept() local
819 r = dns_query_synthesize_reply(q, &state); in dns_query_accept()
823 dns_query_complete(q, state); in dns_query_accept()
829 state = DNS_TRANSACTION_ERRNO; in dns_query_accept()
840 switch (t->state) { in dns_query_accept()
845 if (state == DNS_TRANSACTION_SUCCESS) { in dns_query_accept()
875 state = DNS_TRANSACTION_SUCCESS; in dns_query_accept()
888 if (state == DNS_TRANSACTION_SUCCESS) in dns_query_accept()
903 state = t->state; in dns_query_accept()
908 if (state == DNS_TRANSACTION_SUCCESS) { in dns_query_accept()
920 r = dns_query_synthesize_reply(q, &state); in dns_query_accept()
924 dns_query_complete(q, state); in dns_query_accept()
937 assert(DNS_TRANSACTION_IS_LIVE(q->state)); in dns_query_ready()
948 DnsTransactionState state; in dns_query_ready() local
950 state = dns_query_candidate_state(c); in dns_query_ready()
951 switch (state) { in dns_query_ready()
1034 q->state = DNS_TRANSACTION_NULL; in dns_query_cname_redirect()
1065 if (!IN_SET(q->state, DNS_TRANSACTION_SUCCESS, DNS_TRANSACTION_NULL)) in dns_query_process_cname_one()