mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
network: remove unused return code
The function that forwards the tapped (voice ebug) traffic returns its status (sendto) to the caller. However, none of the callers seem need this info. Remove the return code and print an error message on failure Fixes: Coverity CID#178666 Change-Id: I16c12c4565bccbc0d75c412b43469bf70b6b7ea5
This commit is contained in:
committed by
Harald Welte
parent
b969455941
commit
e6f172dd57
@@ -627,14 +627,20 @@ void mgcp_patch_and_count(struct mgcp_endpoint *endp,
|
||||
|
||||
/* Forward data to a debug tap. This is debug function that is intended for
|
||||
* debugging the voice traffic with tools like gstreamer */
|
||||
static int forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf,
|
||||
int len)
|
||||
static void forward_data(int fd, struct mgcp_rtp_tap *tap, const char *buf,
|
||||
int len)
|
||||
{
|
||||
if (!tap->enabled)
|
||||
return 0;
|
||||
int rc;
|
||||
|
||||
return sendto(fd, buf, len, 0,
|
||||
(struct sockaddr *)&tap->forward, sizeof(tap->forward));
|
||||
if (!tap->enabled)
|
||||
return;
|
||||
|
||||
rc = sendto(fd, buf, len, 0, (struct sockaddr *)&tap->forward,
|
||||
sizeof(tap->forward));
|
||||
|
||||
if (rc < 0)
|
||||
LOGP(DRTP, LOGL_ERROR,
|
||||
"Forwarding tapped (debug) voice data failed.\n");
|
||||
}
|
||||
|
||||
/*! Send RTP/RTCP data to a specified destination connection.
|
||||
|
Reference in New Issue
Block a user