This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/2113
stream: Export osmo_stream_cli_reconnect()
In case the application is using the read-callback and a read returns 0,
then the application itself would want to trigger the reconnect. This
is different from the osmo_stream_cli_recv() case where the reconnect
can be handled internally to the library.
Change-Id: I41314bad4a9f44e8a61b9d2ba33d1a76b25bd145
---
M include/osmocom/netif/stream.h
M src/stream.c
2 files changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/13/2113/1
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 3981e41..819f1ce 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -44,6 +44,7 @@
struct osmo_fd *osmo_stream_cli_get_ofd(struct osmo_stream_cli *cli);
void osmo_stream_cli_set_connect_cb(struct osmo_stream_cli *cli, int (*connect_cb)(struct osmo_stream_cli *cli));
void osmo_stream_cli_set_read_cb(struct osmo_stream_cli *cli, int (*read_cb)(struct osmo_stream_cli *cli));
+void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli);
struct osmo_stream_cli *osmo_stream_cli_create(void *ctx);
void osmo_stream_cli_destroy(struct osmo_stream_cli *cli);
diff --git a/src/stream.c b/src/stream.c
index 2fca7be..f5408f8 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -85,7 +85,7 @@
void osmo_stream_cli_close(struct osmo_stream_cli *cli);
-static void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli)
+void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli)
{
if (cli->reconnect_timeout < 0) {
LOGP(DLINP, LOGL_DEBUG, "not reconnecting, disabled.\n");
--
To view, visit https://gerrit.osmocom.org/2113
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I41314bad4a9f44e8a61b9d2ba33d1a76b25bd145
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>