if (!access(dst, R_OK | W_OK))
return;
- hts_settings_makedirs(dst);
+ if (hts_settings_makedirs(dst))
+ return;
+
hts_settings_buildpath(src, sizeof(src), "input/linuxdvb/networks");
rename(src, dst);
}
{
th_descrambler_runtime_t *dr;
+ if (t == NULL)
+ return;
+
lock_assert(&t->s_stream_mutex);
- if (t == NULL || (dr = t->s_descramble) == NULL)
+ if ((dr = t->s_descramble) == NULL)
return;
dr->dr_external = state ? 1 : 0;
service_reset_streaming_status_flags(t, TSS_NO_DESCRAMBLER);
pthread_join(lca->lca_en50221_thread, NULL);
}
- ioctl(lca->lca_ca_fd, CA_RESET, NULL);
+ if (ioctl(lca->lca_ca_fd, CA_RESET, NULL))
+ tvherror(LS_LINUXDVB, "unable to reset ca%u %s",
+ lca->lca_number, lca->lca_ca_path);
close(lca->lca_ca_fd);
lca->lca_ca_fd = -1;
( linuxdvb_en50494_t *le, int freq, int *rfreq, uint16_t *t )
{
/* transponder value - t */
- *t = round(freq / 1000) - 100;
+ *t = round((double)freq / 1000) - 100;
if (*t > 2047) {
tvherror(LS_EN50494, "transponder value bigger then 2047 for freq %d (%d)", freq, le->le_frequency);
return -1;