diff options
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stream.c b/src/stream.c index f899a41..f5ead17 100644 --- a/src/stream.c +++ b/src/stream.c @@ -162,8 +162,8 @@ static int osmo_stream_cli_write(struct osmo_stream_cli *cli) #ifdef HAVE_LIBSCTP case IPPROTO_SCTP: memset(&sinfo, 0, sizeof(sinfo)); - sinfo.sinfo_ppid = htonl(msgb_sctp_ppid(msg)); - sinfo.sinfo_stream = htonl(msgb_sctp_stream(msg)); + sinfo.sinfo_ppid = htons(msgb_sctp_ppid(msg)); + sinfo.sinfo_stream = msgb_sctp_stream(msg); ret = sctp_send(cli->ofd.fd, msg->data, msgb_length(msg), &sinfo, MSG_NOSIGNAL); break; @@ -692,8 +692,8 @@ static void osmo_stream_srv_write(struct osmo_stream_srv *conn) #ifdef HAVE_LIBSCTP case IPPROTO_SCTP: memset(&sinfo, 0, sizeof(sinfo)); - sinfo.sinfo_ppid = htonl(msgb_sctp_ppid(msg)); - sinfo.sinfo_stream = htonl(msgb_sctp_stream(msg)); + sinfo.sinfo_ppid = htons(msgb_sctp_ppid(msg)); + sinfo.sinfo_stream = msgb_sctp_stream(msg); ret = sctp_send(conn->ofd.fd, msg->data, msgb_length(msg), &sinfo, MSG_NOSIGNAL); break; @@ -871,8 +871,8 @@ int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg) } return -EAGAIN; } - msgb_sctp_ppid(msg) = ntohl(sinfo.sinfo_ppid); - msgb_sctp_stream(msg) = ntohl(sinfo.sinfo_stream); + msgb_sctp_ppid(msg) = ntohs(sinfo.sinfo_ppid); + msgb_sctp_stream(msg) = sinfo.sinfo_stream; break; #endif case IPPROTO_TCP: |