path: root/include
diff options
authorMax <msuraev@sysmocom.de>2019-02-06 17:27:18 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-19 13:40:55 +0000
commitb3e34435b3bde227805c8dcac39c28e57144e500 (patch)
tree66553c23c3392dd1cb6733ad9693048d8d97136f /include
parent1ab218d28f684a431cd9de972499b987b63a507a (diff)
Deprecate osmo_stream_cli_open2()
This supposed to be variant of osmo_stream_cli_open() with explicit control over reconnection logic but it's plain broken: doxygen docs contradict the code, actual reconnection logic is affected by timeout parameter directly which is set in different function. It seems like we haven't been affected by this so far because we always use it in auto-reconnection mode which is triggered by default due to positive reconnection timeout value (5 sec) automatically used in the absense of explicitly set timeout. Looking at commit history, this function already been source of confusion in the past. Instead of trying to fix this mess, let's just deprecate it entirely and properly document use of osmo_stream_cli_set_reconnect_timeout() to control reconnection logic. The only known user is libosmo-sccp which won't use it as of 0a93a683f3cb8e5977eb4a666ab207db6e7d7af9 commit. Change-Id: Id988ed0274b363db049f59cbf6a193727c8c3c8a
Diffstat (limited to 'include')
1 files changed, 2 insertions, 1 deletions
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 56162e4..f1c160c 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -72,7 +72,8 @@ struct osmo_stream_cli *osmo_stream_cli_create(void *ctx);
void osmo_stream_cli_destroy(struct osmo_stream_cli *cli);
int osmo_stream_cli_open(struct osmo_stream_cli *cli);
-int osmo_stream_cli_open2(struct osmo_stream_cli *cli, int reconnect);
+int osmo_stream_cli_open2(struct osmo_stream_cli *cli, int reconnect) \
+ OSMO_DEPRECATED("Use osmo_stream_cli_set_reconnect_timeout() or osmo_stream_cli_reconnect() instead");
void osmo_stream_cli_close(struct osmo_stream_cli *cli);
void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg);