pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, approved
stream: Set sctp_ppid and sctp_stream when sctp notifciation is received

Let's set these values in all cases.

Change-Id: I99f6098d8d9fc1c06bc28373bf7ee76f15d5f525
---
M src/stream.c
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stream.c b/src/stream.c
index 383103c..604955b 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1474,6 +1474,8 @@
ret = sctp_recvmsg(fd, msgb_data(msg), msgb_tailroom(msg),
NULL, NULL, &sinfo, &flags);
msgb_sctp_msg_flags(msg) = 0;
+ msgb_sctp_ppid(msg) = ntohl(sinfo.sinfo_ppid);
+ msgb_sctp_stream(msg) = sinfo.sinfo_stream;
if (flags & MSG_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *)msgb_data(msg);
LOGP(DLINP, LOGL_DEBUG, "NOTIFICATION %u flags=0x%x\n", notif->sn_header.sn_type, notif->sn_header.sn_flags);
@@ -1514,8 +1516,6 @@
}
return -EAGAIN;
}
- msgb_sctp_ppid(msg) = ntohl(sinfo.sinfo_ppid);
- msgb_sctp_stream(msg) = sinfo.sinfo_stream;
return ret;
}
#endif

To view, visit change 29543. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I99f6098d8d9fc1c06bc28373bf7ee76f15d5f525
Gerrit-Change-Number: 29543
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged