Exemplo n.º 1
0
static void conn_close(struct sip_conn *conn, int err)
{
	struct le *le;

	conn->sc = mem_deref(conn->sc);
	conn->tc = mem_deref(conn->tc);
	tmr_cancel(&conn->tmr_ka);
	tmr_cancel(&conn->tmr);
	hash_unlink(&conn->he);

	le = list_head(&conn->ql);

	while (le) {

		struct sip_connqent *qent = le->data;
		le = le->next;

		if (qent->qentp) {
			*qent->qentp = NULL;
			qent->qentp = NULL;
		}

		qent->transph(err, qent->arg);
		list_unlink(&qent->le);
		mem_deref(qent);
	}

	sip_keepalive_signal(&conn->kal, err);
}
Exemplo n.º 2
0
static void udpconn_close(struct sip_udpconn *uc, int err)
{
	sip_keepalive_signal(&uc->kal, err);
	hash_unlink(&uc->he);
	tmr_cancel(&uc->tmr_ka);
	uc->ct = mem_deref(uc->ct);
	uc->us = mem_deref(uc->us);
	uc->stun = mem_deref(uc->stun);
}