1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Moved Socket creation to before thread activation

This commit is contained in:
Antti Seppälä 2007-09-12 18:58:39 +00:00
parent c71599d81d
commit 41d459dbf6

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: streamer.c,v 1.5 2007/09/12 18:34:43 rahrenbe Exp $
* $Id: streamer.c,v 1.6 2007/09/12 18:58:39 ajhseppa Exp $
*/
#include <sys/types.h>
@ -143,13 +143,13 @@ bool cIptvStreamer::Activate()
return true;
}
// Ensure that socket is valid
CheckAndCreateSocket(dataPort);
// Start thread
if (!Running())
Start();
// Ensure that socket is valid
CheckAndCreateSocket(dataPort);
// Join a new multicast group
mreq.imr_multiaddr.s_addr = inet_addr(stream);
mreq.imr_interface.s_addr = htonl(INADDR_ANY);