summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-context.c5
-rw-r--r--src/afb-context.h1
2 files changed, 6 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;
+}
+
diff --git a/src/afb-context.h b/src/afb-context.h
index 40adeb5b..f1402382 100644
--- a/src/afb-context.h
+++ b/src/afb-context.h
@@ -57,4 +57,5 @@ extern void afb_context_refresh(struct afb_context *context);
extern int afb_context_check(struct afb_context *context);
extern int afb_context_check_loa(struct afb_context *context, unsigned loa);
extern int afb_context_change_loa(struct afb_context *context, unsigned loa);
+extern unsigned afb_context_get_loa(struct afb_context *context);