From ea0f1bd49e730aa17e48d4946414d66cfa24beb3 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 20 May 2021 21:01:23 +0200 Subject: ipaccess: do not block ipaccess_line_update on failure The function ipaccess_line_update (called when the API user calls e1inp_line_update and the line is of type ipaccess) internally sets the line_already_initialized regardless whether the initalization is successful or not. This also means that if the initalization fails the API user is unable to retry the initalition with corrected line options. Change-Id: I90d330e2864f85b964628502afdb0c38eb54f15d Related: SYS#4971 --- src/input/ipaccess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index e876790..a584e0d 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -1025,8 +1025,6 @@ static int ipaccess_line_update(struct e1inp_line *line) if (il->line_already_initialized) return 0; - il->line_already_initialized = true; - switch(line->ops->cfg.ipa.role) { case E1INP_LINE_R_BSC: { struct ipa_server_link *oml_link, *rsl_link; @@ -1112,6 +1110,8 @@ static int ipaccess_line_update(struct e1inp_line *line) default: break; } + + il->line_already_initialized = true; return ret; } -- cgit v1.2.3