diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-04 17:04:12 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-04 17:04:18 +0200 |
commit | 962bf9a48eed418354685dc733b8271d2dd62c27 (patch) | |
tree | 9a55f021571970f446e420e3cd545bd9158771c6 /src/stream.c | |
parent | 592057bb33dc0c336a63003cd7a3a67944d92757 (diff) |
stream: Introduce API osmo_stream_cli_is_connected
Can be used by users to fetch current status of the stream.
Change-Id: I5402430e5f39eef22dfa18f33807ab6b1e771f1b
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c index 3d0b665..74fe8b6 100644 --- a/src/stream.c +++ b/src/stream.c @@ -184,6 +184,14 @@ void osmo_stream_cli_reconnect(struct osmo_stream_cli *cli) cli->state = STREAM_CLI_STATE_CONNECTING; } +/*! \brief Check if Osmocom Stream Client is in connected state + * \param[in] cli Osmocom Stream Client + */ +bool osmo_stream_cli_is_connected(struct osmo_stream_cli *cli) +{ + return cli->state == STREAM_CLI_STATE_CONNECTED; +} + /*! \brief Close an Osmocom Stream Client * \param[in] cli Osmocom Stream Client to be closed * We unregister the socket fd from the osmocom select() loop |