library/Osmocom_VTY_Functions: make VTY prompt timeout configurable
Change-Id: Iadec95446b98d9767d08a841fa1c28f8c71c5eea
diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index a9f4c24..9410c9e 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -15,6 +15,7 @@
modulepar {
charstring mp_prompt_prefix := "OpenBSC";
+ float mp_prompt_timeout := 2.0;
}
const charstring VTY_VIEW_SUFFIX := "> ";
@@ -60,9 +61,9 @@
return charstring {
var charstring rx, buf := "";
var integer fd;
- timer T := 2.0;
+ timer T;
- T.start;
+ T.start(mp_prompt_timeout);
alt {
[] pt.receive(pattern "[\w-]+" & VTY_VIEW_SUFFIX) { };
[] pt.receive(pattern "[\w-]+\# ") { };