aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-context.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-05-04 17:04:39 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-05-04 17:04:39 +0200
commitab4955d02a15b13d5dcfdfe8de1529db6538ac27 (patch)
tree941581ce7034053a38a50da7e60ff2b4200ac9e4 /src/afb-context.c
parent863d6041e2ff2daa97fb1befb79dc3a69093e112 (diff)
add function to get the current LOA
Change-Id: I0f2a0eae8b4de982549fa4a87e2e0f8150c7d6cc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-context.c')
-rw-r--r--src/afb-context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afb-context.c b/src/afb-context.c
index 174ac163..87346b5d 100644
--- a/src/afb-context.c
+++ b/src/afb-context.c
@@ -177,4 +177,9 @@ int afb_context_change_loa(struct afb_context *context, unsigned loa)
return 1;
}
+unsigned afb_context_get_loa(struct afb_context *context)
+{
+ return context->loa_changing || context->loa_changed ? context->loa_out : context->loa_in;
+}
+