summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-06-21 09:08:59 +0000
committerphintuka <phintuka>2007-06-21 09:08:59 +0000
commit922e3abf148f1e987992abd57270585a9efa00bb (patch)
treea63982aaa37ea636f611af76dbbc1ad32b6e9682
parentfd22ecf82a43ee0ed64abad22b33c2049863da2e (diff)
downloadxineliboutput-922e3abf148f1e987992abd57270585a9efa00bb.tar.gz
xineliboutput-922e3abf148f1e987992abd57270585a9efa00bb.tar.bz2
Log error message if local address can't be translated
-rw-r--r--tools/udp_pes_scheduler.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index babb9ab9..c085f1b6 100644
--- a/tools/udp_pes_scheduler.c
+++ b/tools/udp_pes_scheduler.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: udp_pes_scheduler.c,v 1.31 2007-06-11 21:44:02 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.32 2007-06-21 09:08:59 phintuka Exp $
*
*/
@@ -167,6 +167,8 @@ bool cUdpScheduler::AddRtp(void)
struct sockaddr_in name;
name.sin_family = AF_INET;
name.sin_addr.s_addr = inet_addr(xc.remote_local_ip);
+ if(name.sin_addr.s_addr == INADDR_NONE)
+ LOGERR("Local address %s is invalid", xc.remote_local_ip);
name.sin_port = htons(xc.remote_rtp_port);
if (bind(m_fd_rtp.handle(), (struct sockaddr *)&name, sizeof(name)) < 0)
LOGERR("bind(%s:%d) failed for udp/rtp multicast", xc.remote_local_ip, xc.remote_rtp_port);