From 41d459dbf69d29826188878dfaaad1a453c301be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Wed, 12 Sep 2007 18:58:39 +0000 Subject: [PATCH] Moved Socket creation to before thread activation --- streamer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/streamer.c b/streamer.c index 2d151ec..5075170 100644 --- a/streamer.c +++ b/streamer.c @@ -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 @@ -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);