aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-08-17 21:41:34 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-18 14:54:47 +0200
commite7e1b7556492b0c33ea68bdb73ee20b94d2405f8 (patch)
treefd5307c845cf007c9247a80d1f987f1ff15471c6
parentf0d4a2213a27c049df0c579aff0f699273fc7686 (diff)
ipa: ensure updown_cb() gets called on reconnect
If the ipa_client_conn is lost and ther user issues a new ipa_client_conn_open(), then we need to re-set our internal state to IPA_CLIENT_LINK_STATE_CONNECTING, as otherwise we wouldn't call the updown_cb() once the link is up again.
-rw-r--r--src/input/ipa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/input/ipa.c b/src/input/ipa.c
index 056c648..eff01ce 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -353,6 +353,7 @@ int ipa_client_conn_open(struct ipa_client_conn *link)
{
int ret;
+ link->state = IPA_CLIENT_LINK_STATE_CONNECTING;
ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
link->addr, link->port,
OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK);