Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/36631?usp=email
to look at the new patch set (#2).
Change subject: Fix IuUP RTP hdr seqnr field not incremented
......................................................................
Fix IuUP RTP hdr seqnr field not incremented
Previous commit add osmo_io changed mgcp_udp_send() implementation from
"return sendto()", which is documented as:
"return the number of bytes sent. Otherwise, -1 shall be returned"
to "return mgcp_udp_send_msg()", which in turn calls
"return osmo_iofd_sendto_msgb()", and which is documented as:
"\returns 0 in case of success (takes msgb ownership), -1 on error
(doesn't take msgb ownership)."
So successful return code changed from >0 (bytes sent) to ==0,
but forgot to update mgcp_send_iuup() return code path check (and also
some related function documentation calling mgcp_udp_send()".
This commit fixes all the related aspects of that return code change.
Related: SYS#6907
Fixes: 352b967d1bee4b3bc51ecc383306bad0fc5b7fbf
Change-Id: I154e1e41cd02fd4d9b88ad98fc7c4d657246c589
---
M src/libosmo-mgcp/mgcp_iuup.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
3 files changed, 36 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/31/36631/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I154e1e41cd02fd4d9b88ad98fc7c4d657246c589
Gerrit-Change-Number: 36631
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36631?usp=email )
Change subject: Fix IuUP RTP hdr seqnr field not incremented
......................................................................
Fix IuUP RTP hdr seqnr field not incremented
Previous commit add osmo_io changed mgcp_udp_send() implementation from
"return sendto()", which is documented as:
"return the number of bytes sent. Otherwise, -1 shall be returned"
to "return mgcp_udp_send_msg()", which in turn calls
"return osmo_iofd_sendto_msgb()", and which is documented as:
"\returns 0 in case of success (takes msgb ownership), -1 on error
(doesn't take msgb ownership)."
So successful return code changed from >0 (bytes sent) to ==0,
but forgot to update mgcp_send_iuup() return code path check (and also
some related function documentation calling mgcp_udp_send()".
This commit fixes all the related aspects of that return code change.
Fixes: 352b967d1bee4b3bc51ecc383306bad0fc5b7fbf
Change-Id: I154e1e41cd02fd4d9b88ad98fc7c4d657246c589
---
M src/libosmo-mgcp/mgcp_iuup.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_osmux.c
3 files changed, 35 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/31/36631/1
diff --git a/src/libosmo-mgcp/mgcp_iuup.c b/src/libosmo-mgcp/mgcp_iuup.c
index 7531e42..d6f164d 100644
--- a/src/libosmo-mgcp/mgcp_iuup.c
+++ b/src/libosmo-mgcp/mgcp_iuup.c
@@ -468,7 +468,7 @@
struct rtp_hdr *hdr = (struct rtp_hdr *)msgb_data(msg);
int buflen = msgb_length(msg);
char *dest_name;
- int len;
+ int rc;
OSMO_ASSERT(conn_src);
OSMO_ASSERT(conn_dst);
@@ -514,16 +514,16 @@
/* Forward a copy of the RTP data to a debug ip/port */
forward_data_tap(rtp_end->rtp, &conn_src->tap_out, msg);
- len = mgcp_udp_send(rtp_end->rtp, &rtp_end->addr, (char *)hdr, buflen);
+ rc = mgcp_udp_send(rtp_end->rtp, &rtp_end->addr, (char *)hdr, buflen);
- if (len <= 0)
- return len;
+ if (rc < 0)
+ return rc;
rtpconn_rate_ctr_add(conn_dst, endp, RTP_PACKETS_TX_CTR, 1);
- rtpconn_rate_ctr_add(conn_dst, endp, RTP_OCTETS_TX_CTR, len);
+ rtpconn_rate_ctr_add(conn_dst, endp, RTP_OCTETS_TX_CTR, buflen);
rtp_state->alt_rtp_tx_sequence++;
- return len;
+ return 0;
}
/* Received TNL primitive from IuUP layer FSM, transmit it further down to the
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 1fc2c56..58d85df 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1062,7 +1062,7 @@
* \param[in] addr destination ip-address.
* \param[in] buf buffer that holds the data to be send.
* \param[in] len length of the data to be sent.
- * \returns bytes sent, -1 on error. */
+ * \returns 0 in case of success, -1 on error. */
int mgcp_udp_send(struct osmo_io_fd *iofd, const struct osmo_sockaddr *addr, const char *buf, int len)
{
struct msgb *msg = msgb_alloc_c(iofd, len, "mgcp_udp_send");
@@ -1077,7 +1077,7 @@
/*! send RTP dummy packet (to keep NAT connection open).
* \param[in] endp mcgp endpoint that holds the RTP connection.
* \param[in] conn associated RTP connection.
- * \returns bytes sent, -1 on error. */
+ * \returns 0 in case of success, -1 on error. */
int mgcp_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn)
{
int rc;
@@ -1113,7 +1113,7 @@
rc = mgcp_udp_send(conn->end.rtcp, &rtcp_addr,
rtp_dummy_payload, sizeof(rtp_dummy_payload));
- if (rc >= 0)
+ if (rc == 0)
return rc;
failed:
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index df91dbc..f8383d6 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -695,7 +695,7 @@
/*! send RTP dummy packet to OSMUX connection port.
* \param[in] conn associated RTP connection
- * \returns bytes sent, -1 on error */
+ * \returns 0 in case of success, -1 on error */
int osmux_send_dummy(struct mgcp_conn_rtp *conn)
{
char ipbuf[INET6_ADDRSTRLEN];
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I154e1e41cd02fd4d9b88ad98fc7c4d657246c589
Gerrit-Change-Number: 36631
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: msuraev, osmith.
osmith has uploaded a new patch set (#3) to the change originally created by msuraev. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email )
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: .deb/.rpm: add osmocom user during package install
......................................................................
.deb/.rpm: add osmocom user during package install
Create osmocom user & group during package installation.
Fix the configuration dir/files permission to match.
Related: OS#4107
Tweaked-By: Oliver Smith <osmith(a)sysmocom.de>
Change-Id: I63e147961f93d62904ae64f5f3794839d047e4a6
---
M contrib/libosmo-sccp.spec.in
M contrib/systemd/osmo-stp.service
M debian/control
A debian/osmo-stp.postinst
4 files changed, 74 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/22/29722/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/29722?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I63e147961f93d62904ae64f5f3794839d047e4a6
Gerrit-Change-Number: 29722
Gerrit-PatchSet: 3
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: msuraev, osmith, pespin.
osmith has uploaded a new patch set (#3) to the change originally created by msuraev. ( https://gerrit.osmocom.org/c/osmo-cbc/+/29717?usp=email )
The following approvals got outdated and were removed:
Code-Review-1 by pespin, Verified+1 by Jenkins Builder
Change subject: .deb/.rpm: add osmocom user during package install
......................................................................
.deb/.rpm: add osmocom user during package install
Create osmocom user & group during package installation.
Fix the configuration dir/files permission to match.
Related: OS#4107
Tweaked-By: Oliver Smith <osmith(a)sysmocom.de>
Change-Id: Ifcc882125a22d8f2e1bfcd19622aed4e8a723e6c
---
M contrib/osmo-cbc.spec.in
M contrib/systemd/osmo-cbc.service
M debian/control
A debian/postinst
4 files changed, 71 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/17/29717/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/29717?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ifcc882125a22d8f2e1bfcd19622aed4e8a723e6c
Gerrit-Change-Number: 29717
Gerrit-PatchSet: 3
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: newpatchset