From 88bdd46ec39c918794e3e2eef5451a3c5b8cee58 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 2 Nov 2015 21:38:45 -0600 Subject: [PATCH] eap: Add eap_unregister_method --- src/eap.c | 11 +++++++++++ src/eap.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/eap.c b/src/eap.c index 5754faef..fc231413 100644 --- a/src/eap.c +++ b/src/eap.c @@ -401,6 +401,17 @@ int eap_register_method(struct eap_method *method) return 0; } +int eap_unregister_method(struct eap_method *method) +{ + bool r; + + r = l_queue_remove(eap_methods, method); + if (r) + return 0; + + return -ENOENT; +} + void eap_init(void) { eap_methods = l_queue_new(); } diff --git a/src/eap.h b/src/eap.h index c237f667..a352ca90 100644 --- a/src/eap.h +++ b/src/eap.h @@ -96,6 +96,7 @@ struct eap_method { }; int eap_register_method(struct eap_method *method); +int eap_unregister_method(struct eap_method *method); void eap_set_data(struct eap_state *eap, void *data); void *eap_get_data(struct eap_state *eap);