Merge branch 'master' into epg-rewrite
This commit is contained in:
commit
158b782b5a
4 changed files with 21 additions and 6 deletions
|
@ -391,7 +391,8 @@ tdt_add(th_dvb_mux_instance_t *tdmi, struct dmx_sct_filter_params *fparams,
|
||||||
|
|
||||||
#define TDT_CRC 0x1
|
#define TDT_CRC 0x1
|
||||||
#define TDT_QUICKREQ 0x2
|
#define TDT_QUICKREQ 0x2
|
||||||
#define TDT_CA 0x4
|
#define TDT_CA 0x4
|
||||||
|
#define TDT_TDT 0x8
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Satellite configuration
|
* Satellite configuration
|
||||||
|
|
|
@ -168,6 +168,8 @@ dvb_proc_table(th_dvb_mux_instance_t *tdmi, th_dvb_table_t *tdt, uint8_t *sec,
|
||||||
if(tdt->tdt_flags & TDT_CA)
|
if(tdt->tdt_flags & TDT_CA)
|
||||||
ret = tdt->tdt_callback((th_dvb_mux_instance_t *)tdt,
|
ret = tdt->tdt_callback((th_dvb_mux_instance_t *)tdt,
|
||||||
sec, len + 3, tableid, tdt->tdt_opaque);
|
sec, len + 3, tableid, tdt->tdt_opaque);
|
||||||
|
else if(tdt->tdt_flags & TDT_TDT)
|
||||||
|
ret = tdt->tdt_callback(tdmi, ptr, len, tableid, tdt);
|
||||||
else
|
else
|
||||||
ret = tdt->tdt_callback(tdmi, ptr, len, tableid, tdt->tdt_opaque);
|
ret = tdt->tdt_callback(tdmi, ptr, len, tableid, tdt->tdt_opaque);
|
||||||
|
|
||||||
|
|
|
@ -206,14 +206,17 @@ hts_settings_load_one(const char *filename)
|
||||||
static int
|
static int
|
||||||
hts_settings_buildpath(char *dst, size_t dstsize, const char *fmt, va_list ap)
|
hts_settings_buildpath(char *dst, size_t dstsize, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
|
char tmp[256];
|
||||||
char *n = dst;
|
char *n = dst;
|
||||||
|
|
||||||
if(settingspath == NULL)
|
if(settingspath == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
snprintf(dst, dstsize, "%s/", settingspath);
|
vsnprintf(tmp, sizeof(tmp), fmt, ap);
|
||||||
|
if (*tmp != '/')
|
||||||
vsnprintf(dst + strlen(dst), dstsize - strlen(dst), fmt, ap);
|
snprintf(dst, dstsize, "%s/%s", settingspath, tmp);
|
||||||
|
else
|
||||||
|
strncpy(dst, tmp, dstsize);
|
||||||
|
|
||||||
while(*n) {
|
while(*n) {
|
||||||
if(*n == ':' || *n == '?' || *n == '*' || *n > 127 || *n < 32)
|
if(*n == ':' || *n == '?' || *n == '*' || *n > 127 || *n < 32)
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
const char *tvheadend_dataroot(void)
|
const char *tvheadend_dataroot(void)
|
||||||
{
|
{
|
||||||
return "./";
|
static char cwd[256] = { 0 };
|
||||||
|
if (!*cwd) {
|
||||||
|
assert(getcwd(cwd, 254));
|
||||||
|
strcat(cwd, "/");
|
||||||
|
}
|
||||||
|
return cwd;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue