mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
main: Simplify sim_auth_init
There's no real reason why sim_auth_init should fail, so simplify the procedure and move declarations to iwd.h
This commit is contained in:
parent
8cf44499d1
commit
6b58ab1a08
@ -34,3 +34,6 @@ void iwd_shutdown(void);
|
|||||||
|
|
||||||
void network_init();
|
void network_init();
|
||||||
void network_exit();
|
void network_exit();
|
||||||
|
|
||||||
|
void sim_auth_init(void);
|
||||||
|
void sim_auth_exit(void);
|
||||||
|
@ -409,12 +409,6 @@ int main(int argc, char *argv[])
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sim_auth_init()) {
|
|
||||||
l_error("Failed to start sim auth module");
|
|
||||||
exit_status = EXIT_FAILURE;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
plugin_init(plugins, noplugins);
|
plugin_init(plugins, noplugins);
|
||||||
|
|
||||||
genl = l_genl_new_default();
|
genl = l_genl_new_default();
|
||||||
@ -455,10 +449,12 @@ int main(int argc, char *argv[])
|
|||||||
network_init();
|
network_init();
|
||||||
known_networks_init();
|
known_networks_init();
|
||||||
rfkill_init();
|
rfkill_init();
|
||||||
|
sim_auth_init();
|
||||||
|
|
||||||
exit_status = EXIT_SUCCESS;
|
exit_status = EXIT_SUCCESS;
|
||||||
l_main_run();
|
l_main_run();
|
||||||
|
|
||||||
|
sim_auth_exit();
|
||||||
rfkill_exit();
|
rfkill_exit();
|
||||||
known_networks_exit();
|
known_networks_exit();
|
||||||
network_exit();
|
network_exit();
|
||||||
@ -466,7 +462,6 @@ int main(int argc, char *argv[])
|
|||||||
eapol_exit();
|
eapol_exit();
|
||||||
eap_exit();
|
eap_exit();
|
||||||
plugin_exit();
|
plugin_exit();
|
||||||
sim_auth_exit();
|
|
||||||
|
|
||||||
l_genl_family_unref(nl80211);
|
l_genl_family_unref(nl80211);
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
|
#include "iwd.h"
|
||||||
#include "watchlist.h"
|
#include "watchlist.h"
|
||||||
#include "simauth.h"
|
#include "simauth.h"
|
||||||
|
|
||||||
@ -174,14 +175,9 @@ void sim_auth_cancel_request(struct iwd_sim_auth *auth, int id)
|
|||||||
auth->driver->cancel_request(auth, id);
|
auth->driver->cancel_request(auth, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sim_auth_init(void)
|
void sim_auth_init(void)
|
||||||
{
|
{
|
||||||
auth_providers = l_queue_new();
|
auth_providers = l_queue_new();
|
||||||
|
|
||||||
if (!auth_providers)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sim_auth_exit(void)
|
void sim_auth_exit(void)
|
||||||
|
@ -147,7 +147,3 @@ int sim_auth_run_gsm(struct iwd_sim_auth *auth, const uint8_t *rands,
|
|||||||
int num_rands, sim_auth_run_gsm_cb_t cb, void *data);
|
int num_rands, sim_auth_run_gsm_cb_t cb, void *data);
|
||||||
|
|
||||||
void sim_auth_cancel_request(struct iwd_sim_auth *auth, int id);
|
void sim_auth_cancel_request(struct iwd_sim_auth *auth, int id);
|
||||||
|
|
||||||
bool sim_auth_init(void);
|
|
||||||
|
|
||||||
void sim_auth_exit(void);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user