Skip to content

Commit

Permalink
lib-auth: auth-client - Add optional reason argument to auth_client_r…
Browse files Browse the repository at this point in the history
…equest_abort().

It is not actually used yet in this commit.
  • Loading branch information
stephanbosch committed Feb 3, 2019
1 parent a91862d commit ae9b4d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib-auth/auth-client-request.c
Expand Up @@ -173,7 +173,8 @@ static void auth_client_request_free(struct auth_client_request **_request)
pool_unref(&request->pool);
}

void auth_client_request_abort(struct auth_client_request **_request)
void auth_client_request_abort(struct auth_client_request **_request,
const char *reason ATTR_UNUSED)
{
struct auth_client_request *request = *_request;

Expand Down
3 changes: 2 additions & 1 deletion src/lib-auth/auth-client.h
Expand Up @@ -107,7 +107,8 @@ auth_client_request_new(struct auth_client *client,
void auth_client_request_continue(struct auth_client_request *request,
const char *data_base64);
/* Abort ongoing authentication request. */
void auth_client_request_abort(struct auth_client_request **request);
void auth_client_request_abort(struct auth_client_request **request,
const char *reason) ATTR_NULL(2);
/* Return ID of this request. */
unsigned int auth_client_request_get_id(struct auth_client_request *request);
/* Return the PID of the server that handled this request. */
Expand Down
2 changes: 1 addition & 1 deletion src/login-common/sasl-server.c
Expand Up @@ -422,7 +422,7 @@ sasl_server_auth_cancel(struct client *client, const char *reason,

client->authenticating = FALSE;
if (client->auth_request != NULL)
auth_client_request_abort(&client->auth_request);
auth_client_request_abort(&client->auth_request, reason);

if (code != NULL) {
const char *args[2];
Expand Down

0 comments on commit ae9b4d8

Please sign in to comment.