Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #351 from ophion-project/upstream/sasl
Browse files Browse the repository at this point in the history
sasl: use mapi_cap_list_v2 correctly
  • Loading branch information
nomis authored Jul 12, 2020
2 parents 7372db9 + 3792c63 commit 373ba19
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/m_sasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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,
Expand Down

0 comments on commit 373ba19

Please sign in to comment.