From 3792c63dc05b74a3e5827d4a20b086da26759a28 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 9 Jul 2020 17:46:45 -0600 Subject: [PATCH] sasl: use mapi_cap_list_v2 correctly --- modules/m_sasl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/m_sasl.c b/modules/m_sasl.c index 3e0c06abb..e8217aa69 100644 --- a/modules/m_sasl.c +++ b/modules/m_sasl.c @@ -109,13 +109,17 @@ static struct ClientCapability capdata_sasl = { .flags = CLICAP_FLAGS_STICKY, }; +mapi_cap_list_av2 sasl_cap_list[] = { + { MAPI_CAP_CLIENT, "sasl", &capdata_sasl, &CLICAP_SASL }, + { 0, NULL, NULL, NULL }, +}; + static int _modinit(void) { memset(mechlist_buf, 0, sizeof mechlist_buf); sasl_agent_present = false; - CLICAP_SASL = capability_put(cli_capindex, "sasl", &capdata_sasl); advertise_sasl_config(NULL); return 0; } @@ -124,10 +128,9 @@ static void _moddeinit(void) { advertise_sasl_cap(false); - capability_orphan(cli_capindex, "sasl"); } -DECLARE_MODULE_AV2(sasl, _modinit, _moddeinit, sasl_clist, NULL, sasl_hfnlist, NULL, NULL, sasl_desc); +DECLARE_MODULE_AV2(sasl, _modinit, _moddeinit, sasl_clist, NULL, sasl_hfnlist, sasl_cap_list, NULL, sasl_desc); static void m_authenticate(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,