Skip to content

Commit

Permalink
Improved some error messages in _plug_get_* functions
Browse files Browse the repository at this point in the history
This should make it easier to figure out which one is failing to retrieve
prompt data.
  • Loading branch information
Alexey Melnikov committed Jul 11, 2013
1 parent 9e561a1 commit cf783d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/plugin_common.c
Expand Up @@ -334,7 +334,7 @@ int _plug_get_simple(const sasl_utils_t *utils, unsigned int id, int required,
/* We prompted, and got.*/

if (required && !prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_simple");
return SASL_BADPARAM;
}

Expand Down Expand Up @@ -382,7 +382,7 @@ int _plug_get_password(const sasl_utils_t *utils, sasl_secret_t **password,
/* We prompted, and got.*/

if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_password");
return SASL_BADPARAM;
}

Expand Down Expand Up @@ -441,7 +441,7 @@ int _plug_challenge_prompt(const sasl_utils_t *utils, unsigned int id,
/* We prompted, and got.*/

if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
SETERROR(utils, "Unexpectedly missing a prompt result in _plug_challenge_prompt");
return SASL_BADPARAM;
}

Expand Down Expand Up @@ -487,7 +487,7 @@ int _plug_get_realm(const sasl_utils_t *utils, const char **availrealms,
/* We prompted, and got.*/

if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_realm");
return SASL_BADPARAM;
}

Expand Down

0 comments on commit cf783d7

Please sign in to comment.