Skip to content

Commit

Permalink
lib-sasl: Allow plugins to override the default SASL client mechanisms.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jan 29, 2016
1 parent 931bc10 commit 87066db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib-sasl/dsasl-client.c
Expand Up @@ -36,6 +36,12 @@ const char *dsasl_client_mech_get_name(const struct dsasl_client_mech *mech)

void dsasl_client_mech_register(const struct dsasl_client_mech *mech)
{
unsigned int idx;

if (dsasl_client_mech_find_idx(mech->name, &idx) != NULL) {
/* allow plugins to override the default mechanisms */
array_delete(&dsasl_mechanisms, idx, 1);
}
array_append(&dsasl_mechanisms, &mech, 1);
}

Expand Down

0 comments on commit 87066db

Please sign in to comment.