[vlc-commits] [Git][videolan/vlc][master] 2 commits: access: amt: report the network error as a string
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Jun 30 12:58:36 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
24a099fa by Steve Lhomme at 2022-06-30T12:38:10+00:00
access: amt: report the network error as a string
It's more useful for debugging and more common.
- - - - -
3f4c1a26 by Steve Lhomme at 2022-06-30T12:38:10+00:00
sout: udp: use the proper return type for sendmsg()
- - - - -
2 changed files:
- modules/access/amt.c
- modules/stream_out/udp.c
Changes:
=====================================
modules/access/amt.c
=====================================
@@ -909,13 +909,12 @@ static void amt_send_relay_discovery_msg( stream_t *p_access, char *relay_ip )
{
char chaSendBuffer[AMT_DISCO_MSG_LEN];
unsigned int ulNonce;
- int nRet;
+ ssize_t nRet;
access_sys_t *sys = p_access->p_sys;
/* initialize variables */
memset( chaSendBuffer, 0, sizeof(chaSendBuffer) );
ulNonce = 0;
- nRet = 0;
/*
* create AMT discovery message format
@@ -940,7 +939,7 @@ static void amt_send_relay_discovery_msg( stream_t *p_access, char *relay_ip )
(struct sockaddr *)&sys->relayDiscoAddr, sizeof(struct sockaddr) );
if( nRet < 0)
- msg_Err( p_access, "Sendto failed to %s with error %d.", relay_ip, errno);
+ msg_Err( p_access, "Sendto failed to %s with error: %s.", relay_ip, vlc_strerror_c(errno));
}
/**
=====================================
modules/stream_out/udp.c
=====================================
@@ -172,7 +172,7 @@ static ssize_t AccessOutWrite(sout_access_out_t *access, block_t *block)
/* Send */
struct msghdr hdr = { .msg_iov = iov, .msg_iovlen = iovlen };
- int val = sendmsg(sys->fd, &hdr, 0);
+ ssize_t val = sendmsg(sys->fd, &hdr, 0);
if (val < 0)
msg_Err(access, "send error: %s", vlc_strerror_c(errno));
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bdc3d6993aec948186aad3eb24dc8dd96ff6f769...3f4c1a2647c2d32f0c00f31a092cd52c7d24cdf0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/bdc3d6993aec948186aad3eb24dc8dd96ff6f769...3f4c1a2647c2d32f0c00f31a092cd52c7d24cdf0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list