1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Fix: Actually destroy clients on if auth has release callback

This commit is contained in:
Philipp Schafft 2018-09-20 08:13:16 +00:00
parent 1b5572f700
commit f6d269c80d

View File

@ -486,6 +486,13 @@ static void auth_add_client(auth_t *auth, client_t *client, void (*on_no_match)(
queue_auth_client(auth_user);
}
static void __auth_on_result_destroy_client(client_t *client, void *userdata, auth_result result)
{
(void)userdata, (void)result;
client_destroy(client);
}
/* determine whether we need to process this client further. This
* involves any auth exit, typically for external auth servers.
*/
@ -496,6 +503,7 @@ int auth_release_client (client_t *client) {
if (client->auth && client->auth->release_client) {
auth_client *auth_user = auth_client_setup(client);
auth_user->process = auth_remove_client;
auth_user->on_result = __auth_on_result_destroy_client;
queue_auth_client(auth_user);
return 1;
} else if (client->auth) {