int open_mcast(char *url)
{
- static struct dvb_host *dvbhost = NULL;
+ struct dvb_host *dvbhost = NULL;
struct sockaddr_in server;
struct ip_mreq mreq;
int val;
if(!is_mcast(url))
return -1;
- if (!dvbhost) {
- dvbhost = parse(&(url[6]), "2000");
- dvbhost->socktype = SOCK_DGRAM;
- }
+ dvbhost = parse(&(url[6]), "2000");
+ dvbhost->socktype = SOCK_DGRAM;
if (resolve(dvbhost, &server) < 0) {
return -1;