pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/29543 )


Change subject: stream: Set sctp_ppid and sctp_stream when sctp notifciation is 
received
......................................................................

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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/43/29543/1

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 https://gerrit.osmocom.org/c/libosmo-netif/+/29543
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I99f6098d8d9fc1c06bc28373bf7ee76f15d5f525
Gerrit-Change-Number: 29543
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to