mgcp_send_dummy: Check RTP destination is available before attempt tx
Several log messages showing "Failed to send dummy RTP packet." were seen in a osmo-mgw on the field. Let's re-use the function to check and provide more information on what's wrong to ease debugging. Related: SYS#5498 Change-Id: Iee6ac1f4d24c131e3bf40c37e6fdc252e5208ec8
This commit is contained in:
parent
62d9df684f
commit
a24dcc61d7
|
@ -1037,6 +1037,12 @@ int mgcp_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn)
|
|||
LOGPCONN(conn->conn, DRTP, LOGL_DEBUG, "sending dummy packet... %s\n",
|
||||
mgcp_conn_dump(conn->conn));
|
||||
|
||||
/* Before we try to deliver the packet, we check if the destination
|
||||
* port and IP-Address make sense at all. If not, we will be unable
|
||||
* to deliver the packet. */
|
||||
if (check_rtp_destin(conn) != 0)
|
||||
goto failed;
|
||||
|
||||
rc = mgcp_udp_send(conn->end.rtp.fd, &conn->end.addr,
|
||||
conn->end.rtp_port, rtp_dummy_payload, sizeof(rtp_dummy_payload));
|
||||
|
||||
|
|
|
@ -634,6 +634,10 @@ ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
|
|||
dummy_packets += 1;
|
||||
}
|
||||
|
||||
/* Make sure address+port are valid */
|
||||
OSMO_ASSERT(dest_host);
|
||||
OSMO_ASSERT(dest_port);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing MDCX4_PT1
|
||||
|
@ -142,7 +141,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing MDCX4_PT2
|
||||
|
@ -166,7 +164,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing MDCX4_PT3
|
||||
|
@ -190,7 +187,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing MDCX4_PT4
|
||||
|
@ -214,7 +210,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing MDCX4_SO
|
||||
|
@ -253,7 +248,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing DLCX
|
||||
|
@ -441,7 +435,6 @@ checking response:
|
|||
using message with patched conn_id for comparison
|
||||
Response matches our expectations.
|
||||
(response contains a connection id)
|
||||
Dummy packets: 2
|
||||
|
||||
================================================
|
||||
Testing CRCX
|
||||
|
|
Loading…
Reference in New Issue