]> cvs.zerfleddert.de Git - record-dvb/blobdiff - mcast.c
fix some bugs
[record-dvb] / mcast.c
diff --git a/mcast.c b/mcast.c
index fc72056cb239f0e244208d054f6154fe2d5e41a5..fd88569f2b09521026644934892b1864092c1a74 100644 (file)
--- a/mcast.c
+++ b/mcast.c
@@ -22,7 +22,7 @@ int is_mcast(char *url)
 
 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;
@@ -31,10 +31,8 @@ int open_mcast(char *url)
        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;
Impressum, Datenschutz