From b9764e5b6939d2ea1ae2fbe7817d317f02820299 Mon Sep 17 00:00:00 2001 From: phintuka Date: Sun, 4 Jun 2006 05:54:50 +0000 Subject: write replaced with write_cmd use configured RTP address and port in connection test --- frontend_svr.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/frontend_svr.c b/frontend_svr.c index 9d67d267..d372e28e 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.1 2006-06-03 10:01:17 phintuka Exp $ + * $Id: frontend_svr.c,v 1.2 2006-06-04 05:54:50 phintuka Exp $ * */ @@ -621,7 +621,6 @@ bool cXinelibServer::Listen(int listen_port) struct sockaddr_in sin; sin.sin_family = sin.sin_family = AF_INET; sin.sin_port = sin.sin_port = htons(xc.remote_rtp_port); - //sin.sin_addr.s_addr = htonl(0xe0000109); //inet_addr(sAddr); sin.sin_addr.s_addr = inet_addr(xc.remote_rtp_addr); if(connect(fd_multicast, (struct sockaddr *)&sin, sizeof(sin))==-1 && @@ -749,8 +748,8 @@ void cXinelibServer::Handle_Control_DATA(int cli, char *arg) m_iUdpFlowMask &= ~(1< config - //sprintf(buf, "RTP 224.0.1.9:%d\r\n", m_Port); sprintf(buf, "RTP %s:%d\r\n", xc.remote_rtp_addr, xc.remote_rtp_port); - write(fd_control[cli], buf, strlen(buf)); - + write_cmd(fd_control[cli], buf); stream_udp_header_t nullhdr; nullhdr.pos = m_StreamPos; nullhdr.seq = 0xffff;//-1;//m_UdpSeqNo; - //strcpy(buf, "RTP 224.0.1.9:" ); + struct sockaddr_in sin; sin.sin_family = sin.sin_family = AF_INET; - sin.sin_port = sin.sin_port = htons(m_Port); - sin.sin_addr.s_addr = htonl(0xe0000109); //inet_addr(sAddr); + sin.sin_port = sin.sin_port = htons(xc.remote_rtp_port); + sin.sin_addr.s_addr = inet_addr(xc.remote_rtp_addr); if(sizeof(nullhdr) != sendto(fd_multicast, &nullhdr, sizeof(nullhdr), 0, @@ -801,8 +797,8 @@ void cXinelibServer::Handle_Control_RTP(int cli, char *arg) m_iMulticastMask |= (1<