aboutsummaryrefslogtreecommitdiffstats
path: root/examples/ipa-stream-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ipa-stream-client.c')
-rw-r--r--examples/ipa-stream-client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index b771fa3..db1ce62 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -96,7 +96,6 @@ static int connect_cb(struct osmo_stream_cli *conn)
static int read_cb(struct osmo_stream_cli *conn)
{
struct msgb *msg;
- struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn);
LOGP(DIPATEST, LOGL_DEBUG, "received message from stream\n");
@@ -105,10 +104,14 @@ static int read_cb(struct osmo_stream_cli *conn)
LOGP(DIPATEST, LOGL_ERROR, "cannot allocate message\n");
return 0;
}
- if (osmo_ipa_msg_recv(ofd->fd, msg) <= 0) {
+ if (osmo_stream_cli_recv(conn, msg) <= 0) {
LOGP(DIPATEST, LOGL_ERROR, "cannot receive message\n");
return 0;
}
+ if (osmo_ipa_process_msg(msg) < 0) {
+ LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n");
+ return 0;
+ }
int num;
struct msg_sent *cur, *tmp, *found = NULL;