Lines Matching refs:pending

40  * wait for the pending answer events.
86 static int randomize_and_send_udp(struct pending* pend, sldns_buffer* packet,
100 struct pending *p1 = (struct pending*)key1;
101 struct pending *p2 = (struct pending*)key2;
343 reuse->pending->c->fd);
437 pend_tcp->reuse.pending = pend_tcp;
473 key_p.reuse.pending = &key_p;
492 log_assert(&key_p != ((struct reuse_tcp*)result)->pending);
670 pend->reuse.pending = pend;
747 w->next_waiting = (void*)reuse->pending;
749 if(reuse->pending->query) {
755 comm_point_stop_listening(reuse->pending->c);
756 reuse->pending->query = w;
758 reuse->pending->c->fd, reuse->pending,
764 pend->reuse.pending = pend;
874 * and thus have a pending pointer to the struct */
875 log_assert(reuse->lru_prev->pending);
878 log_assert(!reuse->lru_next || reuse->lru_next->pending);
883 * and thus have a pending pointer to the struct */
884 log_assert(reuse->lru_next->pending);
887 log_assert(!reuse->lru_prev || reuse->lru_prev->pending);
959 /** perform callbacks for failure and also decommission pending tcp.
960 * the callbacks remove references in sq->pending to the waiting_tcp
961 * members of the tree_by_id in the pending tcp. The pending_tcp is
1144 struct pending* pend;
1159 /* callback error on pending */
1175 struct pending key;
1176 struct pending* p;
1198 verbose(VERB_ALGO, "lookup size is %d entries", (int)outnet->pending->count);
1199 p = (struct pending*)rbtree_search(outnet->pending, &key);
1240 (void)rbtree_delete(outnet->pending, p->node.key);
1282 struct pending* p = (struct pending*)arg;
1293 struct pending* p = (struct pending*)arg;
1440 !(outnet->pending = rbtree_create(pending_cmp)) ||
1512 /** helper pending delete */
1516 struct pending* pend = (struct pending*)node;
1555 if(outnet->pending) {
1556 /* free pending elements, but do no unlink from tree. */
1557 traverse_postorder(outnet->pending, pending_node_del, NULL);
1558 free(outnet->pending);
1637 /* was allocated in struct pending that was deleted above */
1642 struct pending* p = outnet->udp_wait_first, *np;
1653 pending_delete(struct outside_network* outnet, struct pending* p)
1660 struct pending* prev = NULL, *x = outnet->udp_wait_first;
1675 (void)rbtree_delete(outnet->pending, p->node.key);
1741 select_id(struct outside_network* outnet, struct pending* pend,
1750 while(!rbtree_insert(outnet->pending, &pend->node)) {
1761 verbose(VERB_ALGO, "inserted new pending reply id=%4.4x", pend->id);
1794 select_ifport(struct outside_network* outnet, struct pending* pend,
1896 randomize_and_send_udp(struct pending* pend, sldns_buffer* packet, int timeout)
1943 struct pending*
1947 struct pending* pend = (struct pending*)calloc(1, sizeof(*pend));
2017 pend = outnet->tcp_reuse_last->pending;
2114 verbose(VERB_ALGO, "pending tcp query with too short buffer < 2");
2124 log_assert(reuse->pending);
2125 pend = reuse->pending;
2196 pend->reuse.pending = pend;
2317 sq->pending = NULL;
2400 if(sq->pending) {
2401 /* clear up the pending query */
2406 struct pending* p = (struct pending*)sq->pending;
2416 sq->pending;
2436 sq->pending = NULL;
2569 sq->pending = pending_udp_query(sq, buff, rtt,
2571 if(!sq->pending)
2723 sq->pending = NULL; /* removed after this callback */
2807 sq->pending = pending_tcp_query(sq, buff, TCP_AUTH_QUERY_TIMEOUT,
2809 if(!sq->pending) {
2840 sq->pending = pending_tcp_query(sq, buff, timeout,
2842 return sq->pending != NULL;
2891 sq->pending = NULL; /* removed after callback */
3411 waiting_udp_get_mem(struct pending* w)
3423 struct pending* u;
3450 s += sizeof(*outnet->pending);
3451 s += (sizeof(struct pending) + comm_timer_get_mem(NULL)) *
3452 outnet->pending->count;
3475 s += sizeof(struct pending);