Lines Matching refs:tail

104 		lwsl_info(" peer %d: %p: tail: %p, filt 0x%x\n",
105 n++, pr, pr->tail, pr->_class_filter);
173 if (xpr->tail == msg) {
175 "we are about to destroy as tail", xpr, msg);
236 * Any peer with no active tail needs to check our class to see if we
237 * should become his tail
244 !pr->tail && _lws_smd_msg_peer_interested_in_msg(pr, msg)) {
245 pr->tail = msg;
246 /* tail message has to actually be of interest to the peer */
247 assert(!pr->tail || (pr->tail->_class & pr->_class_filter));
474 while (pr->tail) {
476 lws_smd_msg_t *m1 = lws_container_of(pr->tail->list.next,
479 if (_lws_smd_msg_peer_interested_in_msg(pr, pr->tail)) {
480 if (!--pr->tail->refcount)
481 _lws_smd_msg_destroy(pr->ctx, smd, pr->tail);
484 pr->tail = m1;
495 lws_dll2_t *tail = &pr->tail->list;
499 tail = tail->next;
500 if (!tail)
503 msg = lws_container_of(tail, lws_smd_msg_t, list);
513 * Delivers only one message to the peer and advances the tail, or sets to NULL
514 * if no more filtered queued messages. Returns nonzero if tail non-NULL.
517 * tail.
531 if (!pr->tail)
534 msg = lws_container_of(pr->tail, lws_smd_msg_t, list);
551 pr->tail = _lws_smd_msg_next_matching_filter(pr);
553 /* tail message has to actually be of interest to the peer */
554 assert(!pr->tail || (pr->tail->_class & pr->_class_filter));
563 return !!pr->tail;
716 * there might be peers that point to it as their tail.
727 if (pr->tail == msg)
728 pr->tail = _lws_smd_msg_next_matching_filter(pr);
733 * No peer should fall foul of the peer tail checks
750 if (pr->tail)
795 pr->tail = NULL; /* we just nuked all the messages, ignore */