examples/dvbinfo/dvbinfo.c: Handle rename errors (CID 17233)
[email protected] (Jean-Paul Saman) Wed, 16 Apr 2014 15:53:34 +0200 (CEST)
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvbpsi | branch: master | Jean-Paul Saman <[email protected]> | Fri Apr 11 17:02:06 2014 +0200| [a69ffcddda22eb9c5d26adc01c0aaa0207b6fb1e] | committer: Jean-Paul Saman examples/dvbinfo/dvbinfo.c: Handle rename errors (CID 17233) > http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=a69ffcddda22eb9c5d26adc01c0aaa0207b6fb1e --- examples/dvbinfo/dvbinfo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/dvbinfo/dvbinfo.c b/examples/dvbinfo/dvbinfo.c index 223b9c4..5ca7ea0 100644 --- a/examples/dvbinfo/dvbinfo.c +++ b/examples/dvbinfo/dvbinfo.c @@ -398,7 +398,13 @@ static int dvbinfo_process(dvbinfo_capture_t *capture) fflush(fd); fclose(fd); unlink(param->summary.file); - rename(psz_temp, param->summary.file); + int ret = rename(psz_temp, param->summary.file); + if (ret < 0) + { + libdvbpsi_log(param, DVBINFO_LOG_ERROR, + "failed renming summary file (disabling summary logging)\n"); + param->b_summary = false; + } } else { _______________________________________________ libdvbpsi-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvbpsi-devel