]> cvs.zerfleddert.de Git - record-dvb/commitdiff
'connection-loss recovery'
authormichael <michael>
Sat, 1 Jul 2006 17:05:25 +0000 (17:05 +0000)
committermichael <michael>
Sat, 1 Jul 2006 17:05:25 +0000 (17:05 +0000)
record-dvb.c

index aa48bb47e65cad44608941feca173d80d8a81a25..b673d83894565d265a7e0f4b6ada6433c298069e 100644 (file)
@@ -39,8 +39,8 @@ void record(int(*open_fn)(char *), char *url, char *outfile, int duration)
 
        do {
                if ((bytes = recv(in, buffer, CHUNKSIZE, 0)) < 1) {
-                       perror("recv");
-                       exit(EXIT_FAILURE);
+                       /* TODO: Insert better connection-loss recovery here */
+                       in = (*open_fn)(url);
                }
 
                written = 0;
Impressum, Datenschutz