diff --git a/authd/provider.c b/authd/provider.c index d05fffb8..49fd5007 100644 --- a/authd/provider.c +++ b/authd/provider.c @@ -220,7 +220,7 @@ provider_done(struct auth_client *auth, uint32_t id) if(auth->providers_active == 0 && !auth->providers_starting) { /* All done */ - accept_client(auth, UINT32_MAX); + accept_client(auth); return; } @@ -261,16 +261,11 @@ reject_client(struct auth_client *auth, uint32_t id, const char *data, const cha cancel_providers(auth); } -/* Accept a client and cancel outstanding providers if any - * WARNING: do not use auth instance after calling! */ +/* Accept a client and cancel outstanding providers if any */ void -accept_client(struct auth_client *auth, uint32_t id) +accept_client(struct auth_client *auth) { rb_helper_write(authd_helper, "A %x %s %s", auth->cid, auth->username, auth->hostname); - - if(id != UINT32_MAX) - set_provider_done(auth, id); - cancel_providers(auth); } @@ -333,7 +328,7 @@ start_auth(const char *cid, const char *l_ip, const char *l_port, const char *c_ /* If no providers are running, accept the client */ if(auth->providers_active == 0) - accept_client(auth, UINT32_MAX); + accept_client(auth); done: auth_client_unref(auth); diff --git a/authd/provider.h b/authd/provider.h index fa606d50..9bcb7421 100644 --- a/authd/provider.h +++ b/authd/provider.h @@ -117,7 +117,7 @@ void destroy_providers(void); void cancel_providers(struct auth_client *auth); void provider_done(struct auth_client *auth, uint32_t id); -void accept_client(struct auth_client *auth, uint32_t id); +void accept_client(struct auth_client *auth); void reject_client(struct auth_client *auth, uint32_t id, const char *data, const char *fmt, ...); void handle_new_connection(int parc, char *parv[]);