sasl_session_find_or_make(const struct sasl_message *const restrict smsg)
{
	struct sasl_session *p;

	if (! (p = sasl_session_find(smsg->uid)))
	{
		p = smalloc(sizeof *p);

		p->server = smsg->server;

		(void) mowgli_strlcpy(p->uid, smsg->uid, sizeof p->uid);
		(void) mowgli_node_add(p, &p->node, &sasl_sessions);
	}

	return p;
}
sasl_session_find_or_make(const struct sasl_message *const restrict smsg)
{
	struct sasl_session *p;

	if (! (p = sasl_session_find(smsg->uid)))
	{
		p = smalloc(sizeof *p);

		p->server = smsg->server;

		(void) mowgli_strlcpy(p->uid, smsg->uid, sizeof p->uid);
		(void) mowgli_node_add(p, &p->node, &sasl_sessions);
	}

	return p;
}