htsmsg_destroy(m);
/* Move muxes */
- hts_settings_buildpath(src, sizeof(src),
- "input/iptv/muxes");
- hts_settings_buildpath(dst, sizeof(dst),
- "input/iptv/networks/%s/muxes", ubuf);
- rename(src, dst);
+ if (!hts_settings_buildpath(src, sizeof(src),
+ "input/iptv/muxes") &&
+ !hts_settings_buildpath(dst, sizeof(dst),
+ "input/iptv/networks/%s/muxes", ubuf))
+ rename(src, dst);
}
}
char src[1024], dst[1024];
/* Due to having to potentially run this twice! */
- hts_settings_buildpath(dst, sizeof(dst), "input/dvb/networks");
+ if (hts_settings_buildpath(dst, sizeof(dst), "input/dvb/networks"))
+ return;
if (!access(dst, R_OK | W_OK))
return;
if (hts_settings_makedirs(dst))
return;
- hts_settings_buildpath(src, sizeof(src), "input/linuxdvb/networks");
+ if (hts_settings_buildpath(src, sizeof(src), "input/linuxdvb/networks"))
+ return;
rename(src, dst);
}
hts_settings_init(config.confdir);
/* Lock it */
- hts_settings_buildpath(config_lock, sizeof(config_lock), ".lock");
+ if (hts_settings_buildpath(config_lock, sizeof(config_lock), ".lock"))
+ exit(78); /* config error */
if ((config_lock_fd = file_lock(config_lock, 3)) < 0)
exit(78); /* config error */
atomic_set(&skel->sock, -1);
/* Pass through */
- hts_settings_buildpath(path, sizeof(path), "epggrab/%s.sock", sockid);
+ if (hts_settings_buildpath(path, sizeof(path), "epggrab/%s.sock", sockid))
+ path[0] = '\0';
epggrab_module_int_create((epggrab_module_int_t*)skel,
cls ?: &epggrab_mod_ext_class,
id, subsys, saveid, name, priority, path,
mpegts_add_listener(&ml);
/* Delete old config */
- hts_settings_buildpath(path, sizeof(path), "epggrab/otamux");
- if (!lstat(path, &st))
- if (!S_ISDIR(st.st_mode))
- hts_settings_remove("epggrab/otamux");
+ if (!hts_settings_buildpath(path, sizeof(path), "epggrab/otamux"))
+ if (!lstat(path, &st))
+ if (!S_ISDIR(st.st_mode))
+ hts_settings_remove("epggrab/otamux");
atomic_set(&epggrab_ota_running, 1);