X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/record-dvb/blobdiff_plain/fbc24ab023eb1ae6572fccff3fa1140c3e01c8b7..6a3dc096fef9e1206f945640bd44ac3077096e54:/record-dvb.c diff --git a/record-dvb.c b/record-dvb.c index b27ce74..45d2fcb 100644 --- a/record-dvb.c +++ b/record-dvb.c @@ -40,8 +40,10 @@ void record(int(*open_fn)(char *), char *url, char *outfile, int duration) do { if ((bytes = recv(in, buffer, CHUNKSIZE, 0)) < 1) { /* TODO: Insert better connection-loss recovery here */ - if ((in = (*open_fn)(url)) < 0) + if ((in = (*open_fn)(url)) < 0) { sleep(1); + continue; + } } written = 0; do { @@ -69,7 +71,7 @@ int main(int argc, char **argv) if (argc == 4) { url = argv[1]; - duration = atol(argv[2])*60; + duration = atoi(argv[2])*60; outfile = argv[3]; } else { fprintf(stderr,"Syntax: %s URL duration_in_minutes outfile\n", argv[0]);