Use only re-entrant idnode_uuid_as_str() fcn.
{
idnode_list_mapping_t *ilm;
const char *s;
+ char ubuf[UUID_HEX_SIZE];
switch (ae->ae_conn_limit_type) {
case ACCESS_CONN_LIMIT_TYPE_ALL:
if(pro && pro->pro_name[0] != '\0') {
if (a->aa_profiles == NULL)
a->aa_profiles = htsmsg_create_list();
- htsmsg_add_str_exclusive(a->aa_profiles, idnode_uuid_as_sstr(&pro->pro_id));
+ htsmsg_add_str_exclusive(a->aa_profiles, idnode_uuid_as_str(&pro->pro_id, ubuf));
}
}
if(dvr && dvr->dvr_config_name[0] != '\0') {
if (a->aa_dvrcfgs == NULL)
a->aa_dvrcfgs = htsmsg_create_list();
- htsmsg_add_str_exclusive(a->aa_dvrcfgs, idnode_uuid_as_sstr(&dvr->dvr_id));
+ htsmsg_add_str_exclusive(a->aa_dvrcfgs, idnode_uuid_as_str(&dvr->dvr_id, ubuf));
}
}
if (ilm == NULL) {
if (a->aa_chtags == NULL)
a->aa_chtags = htsmsg_create_list();
- htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_sstr(&ct->ct_id));
+ htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_str(&ct->ct_id, ubuf));
}
}
}
if(ct && ct->ct_name[0] != '\0') {
if (a->aa_chtags == NULL)
a->aa_chtags = htsmsg_create_list();
- htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_sstr(&ct->ct_id));
+ htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_str(&ct->ct_id, ubuf));
}
}
}
access_entry_save(access_entry_t *ae)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&ae->ae_id, c);
- hts_settings_save(c, "accesscontrol/%s", idnode_uuid_as_sstr(&ae->ae_id));
+ hts_settings_save(c, "accesscontrol/%s", idnode_uuid_as_str(&ae->ae_id, ubuf));
htsmsg_destroy(c);
}
access_entry_class_delete(idnode_t *self)
{
access_entry_t *ae = (access_entry_t *)self;
+ char ubuf[UUID_HEX_SIZE];
- hts_settings_remove("accesscontrol/%s", idnode_uuid_as_sstr(&ae->ae_id));
+ hts_settings_remove("accesscontrol/%s", idnode_uuid_as_str(&ae->ae_id, ubuf));
access_entry_destroy(ae);
}
passwd_entry_save(passwd_entry_t *pw)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&pw->pw_id, c);
- hts_settings_save(c, "passwd/%s", idnode_uuid_as_sstr(&pw->pw_id));
+ hts_settings_save(c, "passwd/%s", idnode_uuid_as_str(&pw->pw_id, ubuf));
htsmsg_destroy(c);
}
passwd_entry_class_delete(idnode_t *self)
{
passwd_entry_t *pw = (passwd_entry_t *)self;
+ char ubuf[UUID_HEX_SIZE];
- hts_settings_remove("passwd/%s", idnode_uuid_as_sstr(&pw->pw_id));
+ hts_settings_remove("passwd/%s", idnode_uuid_as_str(&pw->pw_id, ubuf));
passwd_entry_destroy(pw);
}
ipblock_entry_save(ipblock_entry_t *ib)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&ib->ib_id, c);
- hts_settings_save(c, "ipblock/%s", idnode_uuid_as_sstr(&ib->ib_id));
+ hts_settings_save(c, "ipblock/%s", idnode_uuid_as_str(&ib->ib_id, ubuf));
htsmsg_destroy(c);
}
ipblock_entry_class_delete(idnode_t *self)
{
ipblock_entry_t *ib = (ipblock_entry_t *)self;
+ char ubuf[UUID_HEX_SIZE];
- hts_settings_remove("ipblock/%s", idnode_uuid_as_sstr(&ib->ib_id));
+ hts_settings_remove("ipblock/%s", idnode_uuid_as_str(&ib->ib_id, ubuf));
ipblock_entry_destroy(ib);
}
{
bouquet_t *bq;
htsmsg_t *l, *e;
+ char ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
pthread_mutex_lock(&global_lock);
RB_FOREACH(bq, &bouquets, bq_link) {
e = htsmsg_create_map();
- htsmsg_add_str(e, "key", idnode_uuid_as_sstr(&bq->bq_id));
+ htsmsg_add_str(e, "key", idnode_uuid_as_str(&bq->bq_id, ubuf));
htsmsg_add_str(e, "val", bq->bq_name ?: "");
htsmsg_add_msg(l, NULL, e);
}
{
caclient_t *cac;
htsmsg_t *l, *e;
+ char ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
pthread_mutex_lock(&global_lock);
TAILQ_FOREACH(cac, &caclients, cac_link) {
e = htsmsg_create_map();
- htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(&cac->cac_id));
+ htsmsg_add_str(e, "uuid", idnode_uuid_as_str(&cac->cac_id, ubuf));
htsmsg_add_str(e, "title", idnode_get_title(&cac->cac_id, perm->aa_lang_ui));
htsmsg_add_str(e, "status", caclient_get_status(cac));
htsmsg_add_msg(l, NULL, e);
channel_t *ch;
htsmsg_t *l;
int cfg = api_channel_is_all(perm, args);
- char buf[128];
+ char buf[128], ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
pthread_mutex_lock(&global_lock);
if (!cfg && !channel_access(ch, perm, 0)) continue;
if (!ch->ch_enabled) {
snprintf(buf, sizeof(buf), "{%s}", channel_get_name(ch));
- api_channel_key_val(l, idnode_uuid_as_sstr(&ch->ch_id), buf);
+ api_channel_key_val(l, idnode_uuid_as_str(&ch->ch_id, ubuf), buf);
} else {
- api_channel_key_val(l, idnode_uuid_as_sstr(&ch->ch_id), channel_get_name(ch));
+ api_channel_key_val(l, idnode_uuid_as_str(&ch->ch_id, ubuf), channel_get_name(ch));
}
}
pthread_mutex_unlock(&global_lock);
channel_tag_t *ct;
htsmsg_t *l;
int cfg = api_channel_is_all(perm, args);
- char buf[128];
+ char buf[128], ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
pthread_mutex_lock(&global_lock);
TAILQ_FOREACH(ct, &channel_tags, ct_link)
if (cfg || channel_tag_access(ct, perm, 0)) {
if (ct->ct_enabled) {
- api_channel_key_val(l, idnode_uuid_as_sstr(&ct->ct_id), ct->ct_name);
+ api_channel_key_val(l, idnode_uuid_as_str(&ct->ct_id, ubuf), ct->ct_name);
} else {
snprintf(buf, sizeof(buf), "{%s}", ct->ct_name);
- api_channel_key_val(l, idnode_uuid_as_sstr(&ct->ct_id), buf);
+ api_channel_key_val(l, idnode_uuid_as_str(&ct->ct_id, ubuf), buf);
}
}
pthread_mutex_unlock(&global_lock);
char *s, *lang;
const char *s1;
int res = EPERM;
+ char ubuf[UUID_HEX_SIZE];
if (!(conf = htsmsg_get_map(args, "conf")))
return EINVAL;
s1 = htsmsg_get_str(conf, "config_name");
cfg = dvr_config_find_by_list(perm->aa_dvrcfgs, s1);
if (cfg) {
- htsmsg_set_str(conf, "config_name", idnode_uuid_as_sstr(&cfg->dvr_id));
+ htsmsg_set_str(conf, "config_name", idnode_uuid_as_str(&cfg->dvr_id, ubuf));
htsmsg_set_str(conf, "owner", perm->aa_username ?: "");
htsmsg_set_str(conf, "creator", perm->aa_representative ?: "");
dvr_config_t *cfg;
dvr_autorec_entry_t *dae;
const char *s1;
+ char ubuf[UUID_HEX_SIZE];
if (!(conf = htsmsg_get_map(args, "conf")))
return EINVAL;
pthread_mutex_lock(&global_lock);
cfg = dvr_config_find_by_list(perm->aa_dvrcfgs, s1);
if (cfg) {
- htsmsg_set_str(conf, "config_name", idnode_uuid_as_sstr(&cfg->dvr_id));
+ htsmsg_set_str(conf, "config_name", idnode_uuid_as_str(&cfg->dvr_id, ubuf));
dae = dvr_autorec_create(NULL, conf);
if (dae) {
dvr_autorec_save(dae);
api_epg_add_channel ( htsmsg_t *m, channel_t *ch )
{
int64_t chnum;
- char buf[32];
+ char buf[32], ubuf[UUID_HEX_SIZE];
const char *s;
htsmsg_add_str(m, "channelName", channel_get_name(ch));
- htsmsg_add_str(m, "channelUuid", channel_get_suuid(ch));
+ htsmsg_add_str(m, "channelUuid", channel_get_uuid(ch, ubuf));
if ((chnum = channel_get_number(ch)) >= 0) {
uint32_t maj = chnum / CHANNEL_SPLIT;
uint32_t min = chnum % CHANNEL_SPLIT;
epg_episode_num_t epnum;
epg_genre_t *eg;
dvr_entry_t *de;
+ char ubuf[UUID_HEX_SIZE];
if (!ee || !ch) return NULL;
if (de->de_bcast != eb)
continue;
if (access_verify_list(perm->aa_dvrcfgs,
- idnode_uuid_as_sstr(&de->de_config->dvr_id)))
+ idnode_uuid_as_str(&de->de_config->dvr_id, ubuf)))
continue;
- htsmsg_add_str(m, "dvrUuid", idnode_uuid_as_sstr(&de->de_id));
+ htsmsg_add_str(m, "dvrUuid", idnode_uuid_as_str(&de->de_id, ubuf));
htsmsg_add_str(m, "dvrState", dvr_entry_schedstatus(de));
break;
}
{
htsmsg_t *l = htsmsg_create_list(), *m;
epggrab_module_t *mod;
+ char ubuf[UUID_HEX_SIZE];
pthread_mutex_lock(&global_lock);
LIST_FOREACH(mod, &epggrab_modules, link) {
m = htsmsg_create_map();
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&mod->idnode));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&mod->idnode, ubuf));
htsmsg_add_str(m, "status", epggrab_module_get_status(mod));
htsmsg_add_str(m, "title", idnode_get_title(&mod->idnode, perm->aa_lang_ui));
htsmsg_add_msg(l, NULL, m);
idnode_t *in;
idnode_set_t ins = { 0 };
api_idnode_grid_callback_t cb = opaque;
+ char ubuf[UUID_HEX_SIZE];
/* Grid configuration */
api_idnode_grid_conf(perm, args, &conf);
for (i = conf.start; i < ins.is_count && conf.limit != 0; i++) {
in = ins.is_array[i];
e = htsmsg_create_map();
- htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(in));
+ htsmsg_add_str(e, "uuid", idnode_uuid_as_str(in, ubuf));
if (idnode_perm(in, perm, NULL))
continue;
idnode_read0(in, e, flist, 0, conf.sort.lang);
idnode_set_t *is;
idnode_t *in;
htsmsg_t *l, *e;
+ char ubuf[UUID_HEX_SIZE];
// TODO: this only works if pass as integer
_enum = htsmsg_get_bool_or_default(args, "enum", 0);
/* Name/UUID only */
if (_enum) {
e = htsmsg_create_map();
- htsmsg_add_str(e, "key", idnode_uuid_as_sstr(in));
+ htsmsg_add_str(e, "key", idnode_uuid_as_str(in, ubuf));
htsmsg_add_str(e, "val", idnode_get_title(in, perm->aa_lang_ui));
/* Full record */
htsmsg_t *uuids, *l = NULL, *m, *flist;
htsmsg_field_t *f;
const char *uuid = NULL, *class;
+ char ubuf[UUID_HEX_SIZE];
/* Class based */
if ((class = htsmsg_get_str(args, "class"))) {
}
if (grid > 0) {
m = htsmsg_create_map();
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(in));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(in, ubuf));
idnode_read0(in, m, flist, 0, perm->aa_lang_ui);
} else {
m = idnode_serialize0(in, flist, 0, perm->aa_lang_ui);
} else {
if (grid > 0) {
m = htsmsg_create_map();
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(in));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(in, ubuf));
idnode_read0(in, m, flist, 0, perm->aa_lang_ui);
} else {
m = idnode_serialize0(in, flist, 0, perm->aa_lang_ui);
mpegts_input_t *mi;
mpegts_network_t *mn;
idnode_set_t *is;
+ char ubuf[UUID_HEX_SIZE];
extern const idclass_t mpegts_input_class;
if (!(uuid = htsmsg_get_str(args, "uuid")))
char buf[256];
htsmsg_t *e = htsmsg_create_map();
mn = (mpegts_network_t*)is->is_array[i];
- htsmsg_add_str(e, "key", idnode_uuid_as_sstr(is->is_array[i]));
+ htsmsg_add_str(e, "key", idnode_uuid_as_str(is->is_array[i], ubuf));
mn->mn_display_name(mn, buf, sizeof(buf));
htsmsg_add_str(e, "val", buf);
htsmsg_add_msg(l, NULL, e);
{
profile_t *pro;
htsmsg_t *l, *e;
+ char ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
pthread_mutex_lock(&global_lock);
TAILQ_FOREACH(pro, &profiles, pro_link) {
e = htsmsg_create_map();
- htsmsg_add_str(e, "key", idnode_uuid_as_sstr(&pro->pro_id));
+ htsmsg_add_str(e, "key", idnode_uuid_as_str(&pro->pro_id, ubuf));
htsmsg_add_str(e, "val", profile_get_name(pro));
htsmsg_add_msg(l, NULL, e);
}
api_mapper_status_msg ( void )
{
htsmsg_t *m;
+ char ubuf[UUID_HEX_SIZE];
service_mapper_status_t stat = service_mapper_status();
m = htsmsg_create_map();
htsmsg_add_u32(m, "total", stat.total);
htsmsg_add_u32(m, "fail", stat.fail);
htsmsg_add_u32(m, "ignore", stat.ignore);
if (stat.active)
- htsmsg_add_str(m, "active", idnode_uuid_as_sstr(&stat.active->s_id));
+ htsmsg_add_str(m, "active", idnode_uuid_as_str(&stat.active->s_id, ubuf));
return m;
}
{
bouquet_t *bq, *bq2;
bouquet_download_t *bqd;
- char buf[128];
+ char buf[128], ubuf[UUID_HEX_SIZE];
int i;
lock_assert(&global_lock);
bq->bq_ext_url = NULL;
} else {
free(bq->bq_src);
- snprintf(buf, sizeof(buf), "exturl://%s", idnode_uuid_as_sstr(&bq->bq_id));
+ snprintf(buf, sizeof(buf), "exturl://%s", idnode_uuid_as_str(&bq->bq_id, ubuf));
bq->bq_src = strdup(buf);
bq->bq_download = bqd = calloc(1, sizeof(*bqd));
bqd->bq = bq;
void
bouquet_delete(bouquet_t *bq)
{
+ char ubuf[UUID_HEX_SIZE];
if (bq == NULL) return;
bq->bq_enabled = 0;
bouquet_map_to_channels(bq);
if (!bq->bq_shield) {
- hts_settings_remove("bouquet/%s", idnode_uuid_as_sstr(&bq->bq_id));
+ hts_settings_remove("bouquet/%s", idnode_uuid_as_str(&bq->bq_id, ubuf));
bouquet_destroy(bq);
} else {
idnode_set_free(bq->bq_services);
bouquet_save(bouquet_t *bq, int notify)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&bq->bq_id, c);
- hts_settings_save(c, "bouquet/%s", idnode_uuid_as_sstr(&bq->bq_id));
+ hts_settings_save(c, "bouquet/%s", idnode_uuid_as_str(&bq->bq_id, ubuf));
if (bq->bq_shield)
htsmsg_add_bool(c, "shield", 1);
htsmsg_destroy(c);
{
static const char *buf;
bouquet_t *bq = obj;
+ char ubuf[UUID_HEX_SIZE];
if (bq->bq_chtag_ptr)
- buf = idnode_uuid_as_sstr(&bq->bq_chtag_ptr->ct_id);
+ buf = idnode_uuid_as_str(&bq->bq_chtag_ptr->ct_id, ubuf);
else
buf = "";
return &buf;
int64_t lcn;
const char *tag;
size_t z;
+ char ubuf[UUID_HEX_SIZE];
/* Add all */
for (z = 0; z < bq->bq_services->is_count; z++) {
htsmsg_add_s64(e, "lcn", lcn);
if ((tag = bouquet_get_tag_name(bq, t)) != NULL)
htsmsg_add_str(e, "tag", tag);
- htsmsg_add_msg(m, idnode_uuid_as_sstr(&t->s_id), e);
+ htsmsg_add_msg(m, idnode_uuid_as_str(&t->s_id, ubuf), e);
}
return m;
static const void *
channel_class_bouquet_get ( void *o )
{
- static const char *sbuf;
channel_t *ch = o;
if (ch->ch_bouquet)
- sbuf = idnode_uuid_as_sstr(&ch->ch_bouquet->bq_id);
+ idnode_uuid_as_str(&ch->ch_bouquet->bq_id, prop_sbuf);
else
- sbuf = "";
- return &sbuf;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static int
int
channel_access(channel_t *ch, access_t *a, int disabled)
{
+ char ubuf[UUID_HEX_SIZE];
+
if (!ch)
return 0;
HTSMSG_FOREACH(f, a->aa_chtags) {
LIST_FOREACH(ilm, &ch->ch_ctms, ilm_in2_link) {
if (!strcmp(htsmsg_field_get_str(f) ?: "",
- idnode_uuid_as_sstr(ilm->ilm_in1)))
+ idnode_uuid_as_str(ilm->ilm_in1, ubuf)))
goto chtags_ok;
}
}
th_subscription_t *s;
idnode_list_mapping_t *ilm;
channel_t *ch1, *ch2;
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
/* Settings */
if (delconf)
- hts_settings_remove("channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
+ hts_settings_remove("channel/config/%s", idnode_uuid_as_str(&ch->ch_id, ubuf));
/* Free memory */
RB_REMOVE(&channels, ch, ch_link);
channel_save ( channel_t *ch )
{
htsmsg_t *c;
+ char ubuf[UUID_HEX_SIZE];
if (ch->ch_dont_save == 0) {
c = htsmsg_create_map();
idnode_save(&ch->ch_id, c);
- hts_settings_save(c, "channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
+ hts_settings_save(c, "channel/config/%s", idnode_uuid_as_str(&ch->ch_id, ubuf));
htsmsg_destroy(c);
}
/* update the EPG channel <-> channel mapping here */
channel_tag_destroy(channel_tag_t *ct, int delconf)
{
idnode_list_mapping_t *ilm;
+ char ubuf[UUID_HEX_SIZE];
while((ilm = LIST_FIRST(&ct->ct_ctms)) != NULL)
channel_tag_mapping_destroy(ilm, delconf ? ilm->ilm_in1 : NULL);
if (delconf)
- hts_settings_remove("channel/tag/%s", idnode_uuid_as_sstr(&ct->ct_id));
+ hts_settings_remove("channel/tag/%s", idnode_uuid_as_str(&ct->ct_id, ubuf));
if(ct->ct_enabled && !ct->ct_internal)
htsp_tag_delete(ct);
channel_tag_save(channel_tag_t *ct)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&ct->ct_id, c);
- hts_settings_save(c, "channel/tag/%s", idnode_uuid_as_sstr(&ct->ct_id));
+ hts_settings_save(c, "channel/tag/%s", idnode_uuid_as_str(&ct->ct_id, ubuf));
htsmsg_destroy(c);
htsp_tag_update(ct);
}
/* Channel tag check */
if (a->aa_chtags) {
htsmsg_field_t *f;
- const char *uuid = idnode_uuid_as_sstr(&ct->ct_id);
+ char ubuf[UUID_HEX_SIZE];
+ const char *uuid = idnode_uuid_as_str(&ct->ct_id, ubuf);
HTSMSG_FOREACH(f, a->aa_chtags)
if (!strcmp(htsmsg_field_get_str(f) ?: "", uuid))
goto chtags_ok;
const char *channel_get_epgid ( channel_t *ch );
-#define channel_get_suuid(ch) idnode_uuid_as_sstr(&(ch)->ch_id)
+#define channel_get_uuid(ch,ub) idnode_uuid_as_str(&(ch)->ch_id, ub)
#define channel_get_id(ch) idnode_get_short_uuid((&(ch)->ch_id))
static void
caclient_delete(caclient_t *cac, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
+
cac->cac_enabled = 0;
cac->cac_conf_changed(cac);
if (delconf)
- hts_settings_remove("caclient/%s", idnode_uuid_as_sstr(&cac->cac_id));
+ hts_settings_remove("caclient/%s", idnode_uuid_as_str(&cac->cac_id, ubuf));
pthread_mutex_lock(&caclients_mutex);
TAILQ_REMOVE(&caclients, cac, cac_link);
pthread_mutex_unlock(&caclients_mutex);
static void
caclient_class_save ( idnode_t *in )
{
+ char ubuf[UUID_HEX_SIZE];
caclient_t *cac = (caclient_t *)in;
htsmsg_t *c = htsmsg_create_map();
idnode_save(in, c);
- hts_settings_save(c, "caclient/%s", idnode_uuid_as_sstr(in));
+ hts_settings_save(c, "caclient/%s", idnode_uuid_as_str(in, ubuf));
htsmsg_destroy(c);
cac->cac_conf_changed(cac);
}
dvr_entry_t *de_prev;
dvr_autorec_entry_t *dae = de->de_autorec;
uint32_t max_count = dvr_autorec_get_max_count(dae);
+ char ubuf[UUID_HEX_SIZE];
if (dae == NULL) return;
if (max_count <= 0) return;
break;
if (de_prev) {
tvhinfo("dvr", "autorec %s removing recordings %s (allowed count %u total %u)",
- dae->dae_name, idnode_uuid_as_sstr(&de_prev->de_id), max_count, total);
+ dae->dae_name, idnode_uuid_as_str(&de_prev->de_id, ubuf), max_count, total);
dvr_entry_cancel_delete(de_prev, 0);
}
}
static void
autorec_entry_destroy(dvr_autorec_entry_t *dae, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
+
dvr_autorec_purge_spawns(dae, delconf, 0);
if (delconf)
- hts_settings_remove("dvr/autorec/%s", idnode_uuid_as_sstr(&dae->dae_id));
+ hts_settings_remove("dvr/autorec/%s", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsp_autorec_entry_delete(dae);
dvr_autorec_save(dvr_autorec_entry_t *dae)
{
htsmsg_t *m = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
idnode_save(&dae->dae_id, m);
- hts_settings_save(m, "dvr/autorec/%s", idnode_uuid_as_sstr(&dae->dae_id));
+ hts_settings_save(m, "dvr/autorec/%s", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsmsg_destroy(m);
}
static const void *
dvr_autorec_entry_class_channel_get(void *o)
{
- static const char *ret;
dvr_autorec_entry_t *dae = (dvr_autorec_entry_t *)o;
if (dae->dae_channel)
- ret = idnode_uuid_as_sstr(&dae->dae_channel->ch_id);
+ idnode_uuid_as_str(&dae->dae_channel->ch_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
static const void *
dvr_autorec_entry_class_tag_get(void *o)
{
- static const char *ret;
dvr_autorec_entry_t *dae = (dvr_autorec_entry_t *)o;
if (dae->dae_channel_tag)
- ret = idnode_uuid_as_sstr(&dae->dae_channel_tag->ct_id);
+ idnode_uuid_as_str(&dae->dae_channel_tag->ct_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
static const void *
dvr_autorec_entry_class_config_name_get(void *o)
{
- static const char *ret;
dvr_autorec_entry_t *dae = (dvr_autorec_entry_t *)o;
if (dae->dae_config)
- ret = idnode_uuid_as_sstr(&dae->dae_config->dvr_id);
+ idnode_uuid_as_str(&dae->dae_config->dvr_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
static void
dvr_config_destroy(dvr_config_t *cfg, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
+
if (delconf) {
tvhinfo("dvr", "Deleting configuration '%s'", cfg->dvr_config_name);
- hts_settings_remove("dvr/config/%s", idnode_uuid_as_sstr(&cfg->dvr_id));
+ hts_settings_remove("dvr/config/%s", idnode_uuid_as_str(&cfg->dvr_id, ubuf));
}
LIST_REMOVE(cfg, config_link);
idnode_unlink(&cfg->dvr_id);
dvr_config_save(dvr_config_t *cfg)
{
htsmsg_t *m = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
if (cfg->dvr_retention_days > DVR_RET_FOREVER)
cfg->dvr_retention_days = DVR_RET_FOREVER;
idnode_save(&cfg->dvr_id, m);
- hts_settings_save(m, "dvr/config/%s", idnode_uuid_as_sstr(&cfg->dvr_id));
+ hts_settings_save(m, "dvr/config/%s", idnode_uuid_as_str(&cfg->dvr_id, ubuf));
htsmsg_destroy(m);
}
dvr_config_t *cfg = (dvr_config_t *)self;
htsmsg_field_t *f;
const char *uuid, *my_uuid;
+ char ubuf[UUID_HEX_SIZE];
if (access_verify2(a, ACCESS_OR|ACCESS_ADMIN|ACCESS_RECORDER))
return -1;
if (!access_verify2(a, ACCESS_ADMIN))
return 0;
if (a->aa_dvrcfgs) {
- my_uuid = idnode_uuid_as_sstr(&cfg->dvr_id);
+ my_uuid = idnode_uuid_as_str(&cfg->dvr_id, ubuf);
HTSMSG_FOREACH(f, a->aa_dvrcfgs) {
uuid = htsmsg_field_get_str(f) ?: "";
if (!strcmp(uuid, my_uuid))
static const void *
dvr_config_class_profile_get(void *o)
{
- static const char *ret;
dvr_config_t *cfg = (dvr_config_t *)o;
if (cfg->dvr_profile)
- ret = idnode_uuid_as_sstr(&cfg->dvr_profile->pro_id);
+ idnode_uuid_as_str(&cfg->dvr_profile->pro_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
strcmp(de2->de_owner ?: "", de->de_owner ?: "") == 0) {
tvhlog(LOG_INFO, "dvr", "delete entry %s \"%s\" on \"%s\" start time %"PRId64", "
"scheduled for recording by \"%s\" (duplicate with %s)",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
lang_str_get(de->de_title, NULL), DVR_CH_NAME(de),
(int64_t)de2->de_start, de->de_creator ?: "",
idnode_uuid_as_str(&de2->de_id, ubuf));
time_t t;
lang_str_t *l;
htsmsg_t *conf;
+ char ubuf[UUID_HEX_SIZE];
conf = htsmsg_create_map();
if (enabled >= 0)
htsmsg_add_u32(conf, "enabled", !!enabled);
htsmsg_add_s64(conf, "start", start);
htsmsg_add_s64(conf, "stop", stop);
- htsmsg_add_str(conf, "channel", idnode_uuid_as_sstr(&ch->ch_id));
+ htsmsg_add_str(conf, "channel", idnode_uuid_as_str(&ch->ch_id, ubuf));
htsmsg_add_u32(conf, "pri", pri);
htsmsg_add_u32(conf, "retention", retention);
htsmsg_add_u32(conf, "removal", removal);
htsmsg_add_u32(conf, "broadcast", e->id);
if (dae)
{
- htsmsg_add_str(conf, "autorec", idnode_uuid_as_sstr(&dae->dae_id));
+ htsmsg_add_str(conf, "autorec", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsmsg_add_str(conf, "directory", dae->dae_directory ?: "");
}
if (dte)
{
- htsmsg_add_str(conf, "timerec", idnode_uuid_as_sstr(&dte->dte_id));
+ htsmsg_add_str(conf, "timerec", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsmsg_add_str(conf, "directory", dte->dte_directory ?: "");
}
tvhlog(LOG_INFO, "dvr", "entry %s \"%s\" on \"%s\" starting at %s, "
"scheduled for recording by \"%s\"",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf, creator ?: "");
dvr_entry_save(de);
void
dvr_entry_destroy(dvr_entry_t *de, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
+
if (delconf)
- hts_settings_remove("dvr/log/%s", idnode_uuid_as_sstr(&de->de_id));
+ hts_settings_remove("dvr/log/%s", idnode_uuid_as_str(&de->de_id, ubuf));
htsp_dvr_entry_delete(de);
dvr_entry_save(dvr_entry_t *de)
{
htsmsg_t *m = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
idnode_save(&de->de_id, m);
if (de->de_files)
htsmsg_add_msg(m, "files", htsmsg_copy(de->de_files));
- hts_settings_save(m, "dvr/log/%s", idnode_uuid_as_sstr(&de->de_id));
+ hts_settings_save(m, "dvr/log/%s", idnode_uuid_as_str(&de->de_id, ubuf));
htsmsg_destroy(m);
}
dvr_entry_t *de;
channel_t *ch = e->channel;
epg_broadcast_t *e2;
+ char ubuf[UUID_HEX_SIZE];
assert(e != NULL);
assert(new_e != NULL);
tvhtrace("dvr",
"dvr entry %s event replaced %s on %s @ %"PRItime_t
" to %"PRItime_t,
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(ch),
e->start, e->stop);
{
dvr_entry_t *de;
int found = 0;
+ char ubuf[UUID_HEX_SIZE];
if (e->channel == NULL)
return;
tvhtrace("dvr",
"dvr entry %s link to event %s on %s @ %"PRItime_t
" to %"PRItime_t,
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(e->channel),
e->start, e->stop);
{
dvr_entry_t *de;
const char *srcname;
+ char ubuf[UUID_HEX_SIZE];
if (esrc != EPG_SOURCE_EIT || e->dvb_eid == 0 || e->channel == NULL)
return;
if (running == EPG_RUNNING_NOW && de->de_dvb_eid == e->dvb_eid) {
if (de->de_running_pause) {
tvhdebug("dvr", "dvr entry %s event %s on %s - EPG unpause",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(e->channel));
atomic_exchange_time_t(&de->de_running_pause, 0);
}
if (!de->de_running_start) {
tvhdebug("dvr", "dvr entry %s event %s on %s - EPG marking start",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(e->channel));
atomic_exchange_time_t(&de->de_running_start, dispatch_clock);
atomic_exchange_time_t(&de->de_start, dispatch_clock);
dvr_entry_set_timer(de);
tvhdebug("dvr", "dvr entry %s event %s on %s - EPG start",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(e->channel));
}
if (!de->de_running_stop ||
de->de_running_start > de->de_running_stop) {
tvhdebug("dvr", "dvr entry %s %s %s on %s - EPG marking stop",
- idnode_uuid_as_sstr(&de->de_id), srcname,
+ idnode_uuid_as_str(&de->de_id, ubuf), srcname,
epg_broadcast_get_title(e, NULL),
channel_get_name(de->de_channel));
}
de->de_dont_reschedule = 1;
dvr_stop_recording(de, SM_CODE_OK, 0, 0);
tvhdebug("dvr", "dvr entry %s %s %s on %s - EPG stop",
- idnode_uuid_as_sstr(&de->de_id), srcname,
+ idnode_uuid_as_str(&de->de_id, ubuf), srcname,
epg_broadcast_get_title(e, NULL),
channel_get_name(de->de_channel));
}
} else if (running == EPG_RUNNING_PAUSE && de->de_dvb_eid == e->dvb_eid) {
if (!de->de_running_pause) {
tvhdebug("dvr", "dvr entry %s event %s on %s - EPG pause",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
epg_broadcast_get_title(e, NULL),
channel_get_name(e->channel));
atomic_exchange_time_t(&de->de_running_pause, dispatch_clock);
static const void *
dvr_entry_class_config_name_get(void *o)
{
- static const char *ret;
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_config)
- ret = idnode_uuid_as_sstr(&de->de_config->dvr_id);
+ idnode_uuid_as_str(&de->de_config->dvr_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
htsmsg_t *
static const void *
dvr_entry_class_channel_get(void *o)
{
- static const char *ret;
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_channel)
- ret = idnode_uuid_as_sstr(&de->de_channel->ch_id);
+ idnode_uuid_as_str(&de->de_channel->ch_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
static const void *
dvr_entry_class_autorec_get(void *o)
{
- static const char *ret;
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_autorec)
- ret = idnode_uuid_as_sstr(&de->de_autorec->dae_id);
+ idnode_uuid_as_str(&de->de_autorec->dae_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static const void *
dvr_entry_class_timerec_get(void *o)
{
static const char *ret;
+ char ubuf[UUID_HEX_SIZE];
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_timerec)
- ret = idnode_uuid_as_sstr(&de->de_timerec->dte_id);
+ ret = idnode_uuid_as_str(&de->de_timerec->dte_id, ubuf);
else
ret = "";
return &ret;
dvr_entry_class_parent_get(void *o)
{
static const char *ret;
+ char ubuf[UUID_HEX_SIZE];
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_parent)
- ret = idnode_uuid_as_sstr(&de->de_parent->de_id);
+ ret = idnode_uuid_as_str(&de->de_parent->de_id, ubuf);
else
ret = "";
return &ret;
dvr_entry_class_child_get(void *o)
{
static const char *ret;
+ char ubuf[UUID_HEX_SIZE];
dvr_entry_t *de = (dvr_entry_t *)o;
if (de->de_child)
- ret = idnode_uuid_as_sstr(&de->de_child->de_id);
+ ret = idnode_uuid_as_str(&de->de_child->de_id, ubuf);
else
ret = "";
return &ret;
dvr_entry_class_url_get(void *o)
{
dvr_entry_t *de = (dvr_entry_t *)o;
- static const char *s;
- static char buf[100];
- s = "";
+ char ubuf[UUID_HEX_SIZE];
+ prop_sbuf[0] = '\0';
if (de->de_sched_state == DVR_COMPLETED ||
- de->de_sched_state == DVR_RECORDING) {
- snprintf(buf, sizeof(buf), "dvrfile/%s", idnode_uuid_as_sstr(&de->de_id));
- s = buf;
- }
- return &s;
+ de->de_sched_state == DVR_RECORDING)
+ snprintf(prop_sbuf, PROP_SBUF_LEN, "dvrfile/%s", idnode_uuid_as_str(&de->de_id, ubuf));
+ return &prop_sbuf_ptr;
}
static const void *
time_t t;
struct tm tm;
const char *filename;
- char tbuf[64], *rdir, *postcmd;
+ char tbuf[64], ubuf[UUID_HEX_SIZE], *rdir, *postcmd;
int r;
t = dvr_entry_get_start_time(de, 1);
tvhlog(LOG_INFO, "dvr", "delete entry %s \"%s\" on \"%s\" start time %s, "
"scheduled for recording by \"%s\", retention \"%s\" removal \"%s\"",
- idnode_uuid_as_sstr(&de->de_id),
+ idnode_uuid_as_str(&de->de_id, ubuf),
lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf,
de->de_creator ?: "",
dvr_entry_get_retention_string(de),
static void
timerec_entry_destroy(dvr_timerec_entry_t *dte, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
+
dvr_timerec_purge_spawn(dte, delconf);
if (delconf)
- hts_settings_remove("dvr/timerec/%s", idnode_uuid_as_sstr(&dte->dte_id));
+ hts_settings_remove("dvr/timerec/%s", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsp_timerec_entry_delete(dte);
dvr_timerec_save(dvr_timerec_entry_t *dte)
{
htsmsg_t *m = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
idnode_save(&dte->dte_id, m);
- hts_settings_save(m, "dvr/timerec/%s", idnode_uuid_as_sstr(&dte->dte_id));
+ hts_settings_save(m, "dvr/timerec/%s", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsmsg_destroy(m);
}
static const void *
dvr_timerec_entry_class_channel_get(void *o)
{
- static const char *ret;
dvr_timerec_entry_t *dte = (dvr_timerec_entry_t *)o;
if (dte->dte_channel)
- ret = idnode_uuid_as_sstr(&dte->dte_channel->ch_id);
+ idnode_uuid_as_str(&dte->dte_channel->ch_id, prop_sbuf);
else
- ret = "";
- return &ret;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
static const void *
dvr_timerec_entry_class_config_name_get(void *o)
{
- static const char *buf;
dvr_timerec_entry_t *dte = (dvr_timerec_entry_t *)o;
if (dte->dte_config)
- buf = idnode_uuid_as_sstr(&dte->dte_config->dvr_id);
+ idnode_uuid_as_str(&dte->dte_config->dvr_id, prop_sbuf);
else
- buf = "";
- return &buf;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static char *
epg_episode_t *epg_broadcast_get_episode
( epg_broadcast_t *ebc, int create, int *save )
{
- char uri[256];
+ char uri[256], ubuf[UUID_HEX_SIZE];
epg_episode_t *ee;
if (!ebc) return NULL;
if (ebc->episode) return ebc->episode;
if (!create) return NULL;
snprintf(uri, sizeof(uri)-1, "tvh://channel-%s/bcast-%u/episode",
- idnode_uuid_as_sstr(&ebc->channel->ch_id), ebc->id);
+ idnode_uuid_as_str(&ebc->channel->ch_id, ubuf), ebc->id);
if ((ee = epg_episode_find_by_uri(uri, 1, save)))
*save |= epg_broadcast_set_episode(ebc, ee, ebc->grabber);
return ee;
htsmsg_t *epg_broadcast_serialize ( epg_broadcast_t *broadcast )
{
htsmsg_t *m;
+ char ubuf[UUID_HEX_SIZE];
if (!broadcast) return NULL;
if (!broadcast->episode || !broadcast->episode->uri) return NULL;
if (!(m = _epg_object_serialize((epg_object_t*)broadcast))) return NULL;
htsmsg_add_s64(m, "stop", broadcast->stop);
htsmsg_add_str(m, "episode", broadcast->episode->uri);
if (broadcast->channel)
- htsmsg_add_str(m, "channel", channel_get_suuid(broadcast->channel));
+ htsmsg_add_str(m, "channel", channel_get_uuid(broadcast->channel, ubuf));
if (broadcast->dvb_eid)
htsmsg_add_u32(m, "dvb_eid", broadcast->dvb_eid);
if (broadcast->is_widescreen)
void epggrab_channel_save( epggrab_channel_t *ec )
{
htsmsg_t *m = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&ec->idnode, m);
hts_settings_save(m, "epggrab/%s/channels/%s",
- ec->mod->saveid, idnode_uuid_as_sstr(&ec->idnode));
+ ec->mod->saveid, idnode_uuid_as_str(&ec->idnode, ubuf));
htsmsg_destroy(m);
}
void epggrab_channel_destroy( epggrab_channel_t *ec, int delconf )
{
+ char ubuf[UUID_HEX_SIZE];
+
if (ec == NULL) return;
/* Already linked */
if (delconf)
hts_settings_remove("epggrab/%s/channels/%s",
- ec->mod->saveid, idnode_uuid_as_sstr(&ec->idnode));
+ ec->mod->saveid, idnode_uuid_as_str(&ec->idnode, ubuf));
htsmsg_destroy(ec->newnames);
htsmsg_destroy(ec->names);
*/
if (ev.serieslink) {
- char suri[257];
+ char suri[257], ubuf[UUID_HEX_SIZE];
snprintf(suri, 256, "opentv://channel-%s/series-%d",
- channel_get_suuid(ch), ev.serieslink);
+ channel_get_uuid(ch, ubuf), ev.serieslink);
if ((es = epg_serieslink_find_by_uri(suri, 1, &save)))
save |= epg_broadcast_set_serieslink(ebc, es, src);
}
const char *id;
epggrab_ota_mux_t *om;
int epg_flag;
+ char ubuf[UUID_HEX_SIZE];
if (!mm)
return;
lock_assert(&global_lock);
- id = idnode_uuid_as_sstr(&mm->mm_id);
+ id = idnode_uuid_as_str(&mm->mm_id, ubuf);
epg_flag = mm->mm_is_epg(mm);
if (epg_flag < 0 || epg_flag == MM_EPG_DISABLE)
return;
{
epggrab_module_t *m;
epggrab_ota_mux_t *ota;
- const char *uuid = idnode_uuid_as_sstr(&mm->mm_id);
+ char ubuf[UUID_HEX_SIZE];
+ const char *uuid = idnode_uuid_as_str(&mm->mm_id, ubuf);
/* Already started */
TAILQ_FOREACH(ota, &epggrab_ota_active, om_q_link)
epggrab_mux_stop ( mpegts_mux_t *mm, void *p, int reason )
{
epggrab_ota_mux_t *ota;
- const char *uuid = idnode_uuid_as_sstr(&mm->mm_id);
+ char ubuf[UUID_HEX_SIZE];
+ const char *uuid = idnode_uuid_as_str(&mm->mm_id, ubuf);
int done = EPGGRAB_OTA_DONE_STOLEN;
if (reason == SM_CODE_NO_INPUT)
static void
esfilter_delete(esfilter_t *esf, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
if (delconf)
- hts_settings_remove("esfilter/%s", idnode_uuid_as_sstr(&esf->esf_id));
+ hts_settings_remove("esfilter/%s", idnode_uuid_as_str(&esf->esf_id, ubuf));
TAILQ_REMOVE(&esfilters[esf->esf_class], esf, esf_link);
idnode_unlink(&esf->esf_id);
free(esf->esf_comment);
esfilter_class_save(idnode_t *self)
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(self, c);
- hts_settings_save(c, "esfilter/%s", idnode_uuid_as_sstr(self));
+ hts_settings_save(c, "esfilter/%s", idnode_uuid_as_str(self, ubuf));
htsmsg_destroy(c);
}
esfilter_class_get_title(idnode_t *self, const char *lang)
{
esfilter_t *esf = (esfilter_t *)self;
- return idnode_uuid_as_sstr(&esf->esf_id);
+ char ubuf[UUID_HEX_SIZE];
+ return idnode_uuid_as_str(&esf->esf_id, ubuf);
}
static void
int32_t approx_time, start, start_window, s32;
int retval;
const char *str;
+ char ubuf[UUID_HEX_SIZE];
conf = htsmsg_create_map();
days = htsmsg_create_list();
/* Allow channel to be cleared on update -> any channel */
if (ch || !add) {
- htsmsg_add_str(conf, "channel", ch ? idnode_uuid_as_sstr(&ch->ch_id) : "");
+ htsmsg_add_str(conf, "channel", ch ? idnode_uuid_as_str(&ch->ch_id, ubuf) : "");
}
return conf;
}
const char *s = NULL, *error = NULL, *subscriptionError = NULL;
const char *p, *last;
int64_t fsize = -1;
+ char ubuf[UUID_HEX_SIZE];
htsmsg_add_u32(out, "id", idnode_get_short_uuid(&de->de_id));
htsmsg_add_u32(out, "enabled", de->de_enabled >= 1 ? 1 : 0);
htsmsg_add_u32(out, "eventId", de->de_bcast->id);
if (de->de_autorec)
- htsmsg_add_str(out, "autorecId", idnode_uuid_as_sstr(&de->de_autorec->dae_id));
+ htsmsg_add_str(out, "autorecId", idnode_uuid_as_str(&de->de_autorec->dae_id, ubuf));
if (de->de_timerec)
- htsmsg_add_str(out, "timerecId", idnode_uuid_as_sstr(&de->de_timerec->dte_id));
+ htsmsg_add_str(out, "timerecId", idnode_uuid_as_str(&de->de_timerec->dte_id, ubuf));
htsmsg_add_s64(out, "start", de->de_start);
htsmsg_add_s64(out, "stop", de->de_stop);
htsp_build_autorecentry(htsp_connection_t *htsp, dvr_autorec_entry_t *dae, const char *method)
{
htsmsg_t *out = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
int tad;
- htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dae->dae_id));
+ htsmsg_add_str(out, "id", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsmsg_add_u32(out, "enabled", dae->dae_enabled >= 1 ? 1 : 0);
htsmsg_add_u32(out, "maxDuration", dae->dae_maxduration);
htsmsg_add_u32(out, "minDuration", dae->dae_minduration);
htsp_build_timerecentry(htsp_connection_t *htsp, dvr_timerec_entry_t *dte, const char *method)
{
htsmsg_t *out = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
- htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dte->dte_id));
+ htsmsg_add_str(out, "id", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsmsg_add_u32(out, "enabled", dte->dte_enabled >= 1 ? 1 : 0);
htsmsg_add_u32(out, "daysOfWeek", dte->dte_weekdays);
const char *lang;
int min_duration;
int max_duration;
+ char ubuf[UUID_HEX_SIZE];
/* Required */
if( (query = htsmsg_get_str(in, "query")) == NULL )
if (!(ch = channel_find_by_id(u32)))
return htsp_error("Channel does not exist");
else
- eq.channel = strdup(idnode_uuid_as_sstr(&ch->ch_id));
+ eq.channel = strdup(idnode_uuid_as_str(&ch->ch_id, ubuf));
}
if(!(htsmsg_get_u32(in, "tagId", &u32))) {
if (!(ct = htsp_channel_tag_find_by_identifier(htsp, u32)))
return htsp_error("Channel tag does not exist");
else
- eq.channel_tag = strdup(idnode_uuid_as_sstr(&ct->ct_id));
+ eq.channel_tag = strdup(idnode_uuid_as_str(&ct->ct_id, ubuf));
}
if (!htsmsg_get_u32(in, "contentType", &u32)) {
if(htsp->htsp_version < 6) u32 <<= 4;
htsmsg_field_t *f;
dvr_config_t *cfg;
const char *uuid, *s;
+ char ubuf[UUID_HEX_SIZE];
l = htsmsg_create_list();
LIST_FOREACH(cfg, &dvrconfigs, config_link)
if (cfg->dvr_enabled) {
- uuid = idnode_uuid_as_sstr(&cfg->dvr_id);
+ uuid = idnode_uuid_as_str(&cfg->dvr_id, ubuf);
if (htsp->htsp_granted_access->aa_dvrcfgs) {
HTSMSG_FOREACH(f, htsp->htsp_granted_access->aa_dvrcfgs) {
if (!(s = htsmsg_field_get_str(f)))
const char *str;
uint32_t u32;
channel_t *ch = NULL;
+ char ubuf[UUID_HEX_SIZE];
/* Options */
if(!(str = htsmsg_get_str(in, "title")))
out = htsmsg_create_map();
if (dae) {
- htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dae->dae_id));
+ htsmsg_add_str(out, "id", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsmsg_add_u32(out, "success", 1);
}
else {
const char *str;
channel_t *ch = NULL;
uint32_t u32;
+ char ubuf[UUID_HEX_SIZE];
/* Options */
if(!(str = htsmsg_get_str(in, "title")))
out = htsmsg_create_map();
if (dte) {
- htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dte->dte_id));
+ htsmsg_add_str(out, "id", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsmsg_add_u32(out, "success", 1);
}
else {
void
htsp_autorec_entry_delete(dvr_autorec_entry_t *dae)
{
+ char ubuf[UUID_HEX_SIZE];
+
if(dae == NULL)
return;
htsmsg_t *m = htsmsg_create_map();
- htsmsg_add_str(m, "id", idnode_uuid_as_sstr(&dae->dae_id));
+ htsmsg_add_str(m, "id", idnode_uuid_as_str(&dae->dae_id, ubuf));
htsmsg_add_str(m, "method", "autorecEntryDelete");
htsp_async_send(m, HTSP_ASYNC_ON, HTSP_ASYNC_AUX_AUTOREC, dae);
}
void
htsp_timerec_entry_delete(dvr_timerec_entry_t *dte)
{
+ char ubuf[UUID_HEX_SIZE];
+
if(dte == NULL)
return;
htsmsg_t *m = htsmsg_create_map();
- htsmsg_add_str(m, "id", idnode_uuid_as_sstr(&dte->dte_id));
+ htsmsg_add_str(m, "id", idnode_uuid_as_str(&dte->dte_id, ubuf));
htsmsg_add_str(m, "method", "timerecEntryDelete");
htsp_async_send(m, HTSP_ASYNC_ON, HTSP_ASYNC_AUX_TIMEREC, dte);
}
SKEL_DECLARE(idclasses_skel, idclass_link_t);
-char idnode_uuid_static[UUID_HEX_SIZE];
-
/* **************************************************************************
* Utilities
* *************************************************************************/
int retries = 5;
uint32_t u32;
const idclass_t *idc;
+ char ubuf[UUID_HEX_SIZE];
lock_assert(&global_lock);
uuid, (flags & IDNODE_SHORT_UUID) ? " (short)" : "");
abort();
}
- tvhtrace("idnode", "insert node %s", idnode_uuid_as_sstr(in));
+ tvhtrace("idnode", "insert node %s", idnode_uuid_as_str(in, ubuf));
/* Register the class */
idclass_register(class); // Note: we never actually unregister
void
idnode_unlink(idnode_t *in)
{
+ char ubuf[UUID_HEX_SIZE];
+
lock_assert(&global_lock);
RB_REMOVE(&idnodes, in, in_link);
RB_REMOVE(in->in_domain, in, in_domain_link);
- tvhtrace("idnode", "unlink node %s", idnode_uuid_as_sstr(in));
+ tvhtrace("idnode", "unlink node %s", idnode_uuid_as_str(in, ubuf));
idnode_notify(in, "delete");
}
const char *
idnode_get_title(idnode_t *in, const char *lang)
{
+ static char ubuf[UUID_HEX_SIZE];
const idclass_t *ic = in->in_class;
for(; ic != NULL; ic = ic->ic_super) {
if(ic->ic_get_title != NULL)
return ic->ic_get_title(in, lang);
}
- return idnode_uuid_as_sstr(in);
+ return idnode_uuid_as_str(in, ubuf);
}
{
idnode_t *in;
const idclass_t *ic;
+ char ubuf[UUID_HEX_SIZE];
tvhtrace("idnode", "find class %s", idc->ic_class);
idnode_set_t *is = calloc(1, sizeof(idnode_set_t));
if (domain == NULL)
ic = in->in_class;
while (ic) {
if (ic == idc) {
- tvhtrace("idnode", " add node %s", idnode_uuid_as_sstr(in));
+ tvhtrace("idnode", " add node %s", idnode_uuid_as_str(in, ubuf));
idnode_set_add(is, in, NULL, NULL);
break;
}
ic = in->in_class;
while (ic) {
if (ic == idc) {
- tvhtrace("idnode", " add node %s", idnode_uuid_as_sstr(in));
+ tvhtrace("idnode", " add node %s", idnode_uuid_as_str(in, ubuf));
idnode_set_add(is, in, NULL, NULL);
break;
}
( idnode_set_t *is )
{
htsmsg_t *l = htsmsg_create_list();
+ char ubuf[UUID_HEX_SIZE];
int i;
for (i = 0; i < is->is_count; i++)
- htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(is->is_array[i]));
+ htsmsg_add_str(l, NULL, idnode_uuid_as_str(is->is_array[i], ubuf));
return l;
}
{
const idclass_t *idc = self->in_class;
const char *uuid, *s;
+ char ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
if (!idc->ic_snode) {
- uuid = idnode_uuid_as_sstr(self);
+ uuid = idnode_uuid_as_str(self, ubuf);
htsmsg_add_str(m, "uuid", uuid);
htsmsg_add_str(m, "id", uuid);
}
{
idnode_list_mapping_t *ilm;
htsmsg_t *l = htsmsg_create_list();
+ char ubuf[UUID_HEX_SIZE];
LIST_FOREACH(ilm, in1_list, ilm_in1_link)
- htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(ilm->ilm_in2));
+ htsmsg_add_str(l, NULL, idnode_uuid_as_str(ilm->ilm_in2, ubuf));
return l;
}
{
idnode_list_mapping_t *ilm;
htsmsg_t *l = htsmsg_create_list();
+ char ubuf[UUID_HEX_SIZE];
LIST_FOREACH(ilm, in2_list, ilm_in2_link)
- htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(ilm->ilm_in1));
+ htsmsg_add_str(l, NULL, idnode_uuid_as_str(ilm->ilm_in1, ubuf));
return l;
}
idnode_notify ( idnode_t *in, const char *action )
{
const idclass_t *ic = in->in_class;
- const char *uuid = idnode_uuid_as_sstr(in);
+ char ubuf[UUID_HEX_SIZE];
+ const char *uuid = idnode_uuid_as_str(in, ubuf);
if (!tvheadend_running)
return;
void
idnode_notify_title_changed (void *in, const char *lang)
{
+ char ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(in));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(in, ubuf));
htsmsg_add_str(m, "text", idnode_get_title(in, lang));
notify_by_msg("title", m, 0);
idnode_notify_changed(in);
typedef LIST_HEAD(,idnode_filter_ele) idnode_filter_t;
-extern char idnode_uuid_static[UUID_HEX_SIZE];
-
extern idnode_t tvhlog_conf;
extern const idclass_t tvhlog_conf_class;
uint32_t idnode_get_short_uuid (const idnode_t *in);
const char *idnode_uuid_as_str (const idnode_t *in, char *buf);
-static inline const char *idnode_uuid_as_sstr(const idnode_t *in)
- { return idnode_uuid_as_str(in, idnode_uuid_static); }
idnode_set_t *idnode_get_childs (idnode_t *in);
const char *idnode_get_title (idnode_t *in, const char *lang);
int idnode_is_leaf (idnode_t *in);
dvb_fs_mux_add ( mpegts_table_t *mt, mpegts_mux_t *mm, mpegts_mux_t *mux )
{
const char *uuid;
+ char ubuf[UUID_HEX_SIZE];
char *s;
int i;
- uuid = idnode_uuid_as_sstr(&mux->mm_id);
+ uuid = idnode_uuid_as_str(&mux->mm_id, ubuf);
if (mm->mm_fastscan_muxes == NULL)
mm->mm_fastscan_muxes = calloc(DVB_FASTSCAN_MUXES, UUID_HEX_SIZE);
for (i = 0; i < DVB_FASTSCAN_MUXES * UUID_HEX_SIZE; i += UUID_HEX_SIZE) {
static bouquet_t *
iptv_bouquet_get (iptv_network_t *in, int create)
{
- char buf[128];
- snprintf(buf, sizeof(buf), "iptv-network://%s", idnode_uuid_as_sstr(&in->mn_id));
+ char buf[128], ubuf[UUID_HEX_SIZE];
+ snprintf(buf, sizeof(buf), "iptv-network://%s", idnode_uuid_as_str(&in->mn_id, ubuf));
return bouquet_find_by_source(in->mn_network_name, buf, create);
}
char *sane_url = in->in_url_sane;
char *icon_url = in->in_icon_url;
char *icon_url_sane = in->in_icon_url_sane;
+ char ubuf[UUID_HEX_SIZE];
gtimer_disarm(&in->in_bouquet_timer);
/* Remove config */
if (delconf) {
hts_settings_remove("input/iptv/networks/%s",
- idnode_uuid_as_sstr(&in->mn_id));
+ idnode_uuid_as_str(&in->mn_id, ubuf));
bouquet_delete(iptv_bouquet_get(in, 0));
}
iptv_network_config_save ( mpegts_network_t *mn )
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&mn->mn_id, c);
hts_settings_save(c, "input/iptv/networks/%s/config",
- idnode_uuid_as_sstr(&mn->mn_id));
+ idnode_uuid_as_str(&mn->mn_id, ubuf));
htsmsg_destroy(c);
}
{
iptv_network_t *in = calloc(1, sizeof(*in));
htsmsg_t *c;
+ char ubuf[UUID_HEX_SIZE];
/* Init Network */
in->in_scan_create = 1;
/* Load muxes */
if ((c = hts_settings_load_r(1, "input/iptv/networks/%s/muxes",
- idnode_uuid_as_sstr(&in->mn_id)))) {
+ idnode_uuid_as_str(&in->mn_id, ubuf)))) {
htsmsg_field_t *f;
htsmsg_t *e;
HTSMSG_FOREACH(f, c) {
static void
iptv_mux_config_save ( mpegts_mux_t *mm )
{
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
htsmsg_t *c = htsmsg_create_map();
mpegts_mux_save(mm, c);
hts_settings_save(c, "input/iptv/networks/%s/muxes/%s/config",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
- idnode_uuid_as_str(&mm->mm_id, ubuf));
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf1),
+ idnode_uuid_as_str(&mm->mm_id, ubuf2));
htsmsg_destroy(c);
}
iptv_mux_delete ( mpegts_mux_t *mm, int delconf )
{
iptv_mux_t *im = (iptv_mux_t*)mm, copy;
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
if (delconf)
hts_settings_remove("input/iptv/networks/%s/muxes/%s/config",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
- idnode_uuid_as_str(&mm->mm_id, ubuf));
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf1),
+ idnode_uuid_as_str(&mm->mm_id, ubuf2));
copy = *im; /* keep pointers */
mpegts_mux_delete(mm, delconf);
htsmsg_t *c, *e;
htsmsg_field_t *f;
iptv_service_t *ms;
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
/* Create Mux */
iptv_mux_t *im =
/* Services */
c = hts_settings_load_r(1, "input/iptv/networks/%s/muxes/%s/services",
- idnode_uuid_as_sstr(&in->mn_id),
- idnode_uuid_as_str(&im->mm_id, ubuf));
+ idnode_uuid_as_str(&in->mn_id, ubuf1),
+ idnode_uuid_as_str(&im->mm_id, ubuf2));
if (c) {
HTSMSG_FOREACH(f, c) {
if (!(e = htsmsg_field_get_map(f))) continue;
{
mpegts_mux_t *mm = ((mpegts_service_t *)s)->s_dvb_mux;
htsmsg_t *c = htsmsg_create_map();
+ char ubuf0[UUID_HEX_SIZE];
char ubuf1[UUID_HEX_SIZE];
char ubuf2[UUID_HEX_SIZE];
service_save(s, c);
hts_settings_save(c, "input/iptv/networks/%s/muxes/%s/services/%s",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf0),
idnode_uuid_as_str(&mm->mm_id, ubuf1),
idnode_uuid_as_str(&s->s_id, ubuf2));
htsmsg_destroy(c);
{
iptv_service_t *is = (iptv_service_t *)s;
mpegts_mux_t *mm = is->s_dvb_mux;
+ char ubuf0[UUID_HEX_SIZE];
char ubuf1[UUID_HEX_SIZE];
char ubuf2[UUID_HEX_SIZE];
/* Remove config */
if (delconf)
hts_settings_remove("input/iptv/networks/%s/muxes/%s/services/%s",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf0),
idnode_uuid_as_str(&mm->mm_id, ubuf1),
idnode_uuid_as_str(&s->s_id, ubuf2));
#if ENABLE_LINUXDVB_CA
linuxdvb_ca_t *lca;
#endif
+ char ubuf[UUID_HEX_SIZE];
m = htsmsg_create_map();
idnode_save(&la->th_id, m);
/* Save */
hts_settings_save(m, "input/linuxdvb/adapters/%s",
- idnode_uuid_as_sstr(&la->th_id));
+ idnode_uuid_as_str(&la->th_id, ubuf));
htsmsg_destroy(m);
}
void linuxdvb_ca_save( linuxdvb_ca_t *lca, htsmsg_t *msg )
{
- char id[8];
+ char id[8], ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lca->lca_id));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&lca->lca_id, ubuf));
idnode_save(&lca->lca_id, m);
/* Add to list */
linuxdvb_frontend_t *lfe = self, *lfe2;
linuxdvb_adapter_t *la;
tvh_hardware_t *th;
+ char ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_list();
htsmsg_t *e = htsmsg_create_map();
htsmsg_add_str(e, "key", "");
LIST_FOREACH(lfe2, &la->la_frontends, lfe_link) {
if (lfe2 != lfe && lfe2->lfe_type == lfe->lfe_type) {
e = htsmsg_create_map();
- htsmsg_add_str(e, "key", idnode_uuid_as_sstr(&lfe2->ti_id));
+ htsmsg_add_str(e, "key", idnode_uuid_as_str(&lfe2->ti_id, ubuf));
htsmsg_add_str(e, "val", lfe2->mi_name);
htsmsg_add_msg(m, NULL, e);
}
linuxdvb_frontend_t *lfe = (linuxdvb_frontend_t*)mi, *lfe2;
linuxdvb_adapter_t *la;
tvh_hardware_t *th;
+ char ubuf[UUID_HEX_SIZE];
if (lfe->lfe_fe_path == NULL) return 0;
if (!mpegts_input_is_enabled(mi, mm, flags)) return 0;
LIST_FOREACH(lfe2, &la->la_frontends, lfe_link) {
if (lfe2 == lfe) continue;
if (lfe2->lfe_type != DVB_TYPE_S) continue;
- if (lfe->lfe_master && !strcmp(lfe->lfe_master, idnode_uuid_as_sstr(&lfe2->ti_id))) {
+ if (lfe->lfe_master && !strcmp(lfe->lfe_master, idnode_uuid_as_str(&lfe2->ti_id, ubuf))) {
if (lfe2->lfe_satconf == NULL)
return 0; /* invalid master */
return linuxdvb_satconf_match_mux(lfe2->lfe_satconf, mm);
}
if (lfe2->lfe_master &&
- !strcmp(lfe2->lfe_master, idnode_uuid_as_sstr(&lfe->ti_id)) &&
+ !strcmp(lfe2->lfe_master, idnode_uuid_as_str(&lfe->ti_id, ubuf)) &&
lfe2->lfe_refcount > 0) {
if (lfe->lfe_satconf == NULL)
return 0;
void
linuxdvb_frontend_save ( linuxdvb_frontend_t *lfe, htsmsg_t *fe )
{
- char id[16];
+ char id[16], ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
/* Save frontend */
mpegts_input_save((mpegts_input_t*)lfe, m);
htsmsg_add_str(m, "type", dvb_type2str(lfe->lfe_type));
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lfe->ti_id));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&lfe->ti_id, ubuf));
if (lfe->lfe_satconf && !lfe->lfe_master) {
htsmsg_t *s = htsmsg_create_map();
linuxdvb_satconf_save(lfe->lfe_satconf, s);
- htsmsg_add_str(s, "uuid", idnode_uuid_as_sstr(&lfe->lfe_satconf->ls_id));
+ htsmsg_add_str(s, "uuid", idnode_uuid_as_str(&lfe->lfe_satconf->ls_id, ubuf));
htsmsg_add_msg(m, "satconf", s);
}
htsmsg_delete_field(m, "fe_master");
{
linuxdvb_satconf_ele_t *lse;
htsmsg_t *l, *e, *c;
+ char ubuf[UUID_HEX_SIZE];
htsmsg_add_str(m, "type", ls->ls_type);
idnode_save(&ls->ls_id, m);
l = htsmsg_create_list();
TAILQ_FOREACH(lse, &ls->ls_elements, lse_link){
e = htsmsg_create_map();
idnode_save(&lse->lse_id, e);
- htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(&lse->lse_id));
+ htsmsg_add_str(e, "uuid", idnode_uuid_as_str(&lse->lse_id, ubuf));
if (lse->lse_lnb) {
c = htsmsg_create_map();
idnode_save(&lse->lse_lnb->ld_id, c);
htsmsg_field_t *f;
const char *str;
int i, save;
+ char ubuf[UUID_HEX_SIZE];
HTSMSG_FOREACH(f, msg) {
if (!(str = htsmsg_field_get_str(f))) continue;
TAILQ_FOREACH(lse, &sc->ls_elements, lse_link) {
for (i = 0; i < lse->lse_networks->is_count; i++)
htsmsg_add_str(l, NULL,
- idnode_uuid_as_sstr(lse->lse_networks->is_array[i]));
+ idnode_uuid_as_str(lse->lse_networks->is_array[i], ubuf));
}
mpegts_input_class_network_set(ls->lse_parent->ls_frontend, l);
htsmsg_destroy(l);
linuxdvb_satconf_delete ( linuxdvb_satconf_t *ls, int delconf )
{
linuxdvb_satconf_ele_t *lse, *nxt;
+ char ubuf[UUID_HEX_SIZE];
if (delconf)
- hts_settings_remove("input/linuxdvb/satconfs/%s", idnode_uuid_as_sstr(&ls->ls_id));
+ hts_settings_remove("input/linuxdvb/satconfs/%s", idnode_uuid_as_str(&ls->ls_id, ubuf));
gtimer_disarm(&ls->ls_diseqc_timer);
for (lse = TAILQ_FIRST(&ls->ls_elements); lse != NULL; lse = nxt) {
nxt = TAILQ_NEXT(lse, lse_link);
mpegts_input_dbus_notify(mpegts_input_t *mi, int64_t subs)
{
#if ENABLE_DBUS_1
- char buf[256];
+ char buf[256], ubuf[UUID_HEX_SIZE];
htsmsg_t *msg;
if (mi->mi_dbus_subs == subs)
mi->mi_display_name(mi, buf, sizeof(buf));
htsmsg_add_str(msg, NULL, buf);
htsmsg_add_s64(msg, NULL, subs);
- snprintf(buf, sizeof(buf), "/input/mpegts/%s", idnode_uuid_as_sstr(&mi->ti_id));
+ snprintf(buf, sizeof(buf), "/input/mpegts/%s", idnode_uuid_as_str(&mi->ti_id, ubuf));
dbus_emit_signal(buf, "status", msg);
#endif
}
mpegts_network_link_t *mnl;
mpegts_input_t *mi = obj;
htsmsg_t *l = htsmsg_create_list();
+ char ubuf[UUID_HEX_SIZE];
LIST_FOREACH(mnl, &mi->mi_networks, mnl_mi_link)
- htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(&mnl->mnl_network->mn_id));
+ htsmsg_add_str(l, NULL, idnode_uuid_as_str(&mnl->mnl_network->mn_id, ubuf));
return l;
}
mpegts_input_class_network_enum ( void *obj, const char *lang )
{
htsmsg_t *p, *m;
+ char ubuf[UUID_HEX_SIZE];
if (!obj)
return NULL;
p = htsmsg_create_map();
- htsmsg_add_str (p, "uuid", idnode_uuid_as_sstr((idnode_t*)obj));
+ htsmsg_add_str (p, "uuid", idnode_uuid_as_str((idnode_t*)obj, ubuf));
htsmsg_add_bool(p, "enum", 1);
m = htsmsg_create_map();
mpegts_input_class_linked_set ( void *self, const void *val )
{
mpegts_input_t *mi = self, *mi2;
+ char ubuf[UUID_HEX_SIZE];
if (strcmp(val ?: "", mi->mi_linked ?: "")) {
mi2 = mpegts_input_find(mi->mi_linked);
mi2 = mpegts_input_find((char *)val);
if (mi2) {
free(mi2->mi_linked);
- mi2->mi_linked = strdup(idnode_uuid_as_sstr(&mi->ti_id));
+ mi2->mi_linked = strdup(idnode_uuid_as_str(&mi->ti_id, ubuf));
}
}
if (mi2)
static const void *
mpegts_input_class_linked_get ( void *self )
{
- static const char *ptr;
mpegts_input_t *mi = self;
- ptr = "";
+ prop_sbuf[0] = '\0';
if (mi->mi_linked) {
mi = mpegts_input_find(mi->mi_linked);
if (mi)
- ptr = idnode_uuid_as_sstr(&mi->ti_id);
+ idnode_uuid_as_str(&mi->ti_id, prop_sbuf);
}
- return &ptr;
+ return &prop_sbuf_ptr;
}
static void
( mpegts_mux_instance_t *mmi, tvh_input_stream_t *st )
{
int s = 0, w = 0;
- char buf[512];
+ char buf[512], ubuf[UUID_HEX_SIZE];
th_subscription_t *ths;
const service_t *t;
mpegts_mux_t *mm = mmi->mmi_mux;
w = MAX(w, ths->ths_weight);
}
- st->uuid = strdup(idnode_uuid_as_sstr(&mmi->tii_id));
+ st->uuid = strdup(idnode_uuid_as_str(&mmi->tii_id, ubuf));
mi->mi_display_name(mi, buf, sizeof(buf));
st->input_name = strdup(buf);
mpegts_mux_nice_name(mm, buf, sizeof(buf));
mpegts_input_empty_status
( mpegts_input_t *mi, tvh_input_stream_t *st )
{
- char buf[512];
+ char buf[512], ubuf[UUID_HEX_SIZE];
tvh_input_instance_t *mmi_;
mpegts_mux_instance_t *mmi;
- st->uuid = strdup(idnode_uuid_as_sstr(&mi->ti_id));
+ st->uuid = strdup(idnode_uuid_as_str(&mi->ti_id, ubuf));
mi->mi_display_name(mi, buf, sizeof(buf));
st->input_name = strdup(buf);
LIST_FOREACH(mmi_, &mi->mi_mux_instances, tii_input_link) {
static const void *
mpegts_mux_class_get_network_uuid ( void *ptr )
{
- static char buf[UUID_HEX_SIZE], *s = buf;
mpegts_mux_t *mm = ptr;
if (mm && mm->mm_network)
- strcpy(buf, idnode_uuid_as_sstr(&mm->mm_network->mn_id) ?: "");
+ idnode_uuid_as_str(&mm->mm_network->mn_id, prop_sbuf);
else
- *buf = 0;
- return &s;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static const void *
static void
dvb_mux_config_save ( mpegts_mux_t *mm )
{
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
htsmsg_t *c = htsmsg_create_map();
mpegts_mux_save(mm, c);
hts_settings_save(c, "input/dvb/networks/%s/muxes/%s/config",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
- idnode_uuid_as_str(&mm->mm_id, ubuf));
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf1),
+ idnode_uuid_as_str(&mm->mm_id, ubuf2));
htsmsg_destroy(c);
}
static void
dvb_mux_delete ( mpegts_mux_t *mm, int delconf )
{
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
/* Remove config */
if (delconf)
hts_settings_remove("input/dvb/networks/%s/muxes/%s",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
- idnode_uuid_as_str(&mm->mm_id, ubuf));
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf1),
+ idnode_uuid_as_str(&mm->mm_id, ubuf2));
/* Delete the mux */
mpegts_mux_delete(mm, delconf);
htsmsg_t *c, *e;
htsmsg_field_t *f;
dvb_fe_delivery_system_t delsys;
- char ubuf[UUID_HEX_SIZE];
+ char ubuf1[UUID_HEX_SIZE];
+ char ubuf2[UUID_HEX_SIZE];
/* Class */
if (ln->ln_type == DVB_TYPE_S) {
/* Services */
c = hts_settings_load_r(1, "input/dvb/networks/%s/muxes/%s/services",
- idnode_uuid_as_sstr(&ln->mn_id),
- idnode_uuid_as_str(&mm->mm_id, ubuf));
+ idnode_uuid_as_str(&ln->mn_id, ubuf1),
+ idnode_uuid_as_str(&mm->mm_id, ubuf2));
if (c) {
HTSMSG_FOREACH(f, c) {
if (!(e = htsmsg_get_map_by_field(f))) continue;
mpegts_mux_sched_save ( mpegts_mux_sched_t *mms )
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&mms->mms_id, c);
- hts_settings_save(c, "muxsched/%s", idnode_uuid_as_sstr(&mms->mms_id));
+ hts_settings_save(c, "muxsched/%s", idnode_uuid_as_str(&mms->mms_id, ubuf));
htsmsg_destroy(c);
}
void
mpegts_mux_sched_delete ( mpegts_mux_sched_t *mms, int delconf )
{
+ char ubuf[UUID_HEX_SIZE];
+
LIST_REMOVE(mms, mms_link);
if (delconf)
- hts_settings_remove("muxsched/%s", idnode_uuid_as_sstr(&mms->mms_id));
+ hts_settings_remove("muxsched/%s", idnode_uuid_as_str(&mms->mms_id, ubuf));
if (mms->mms_sub)
subscription_unsubscribe(mms->mms_sub, UNSUBSCRIBE_FINAL);
gtimer_disarm(&mms->mms_timer);
dvb_network_class_delete ( idnode_t *in )
{
mpegts_network_t *mn = (mpegts_network_t*)in;
+ char ubuf[UUID_HEX_SIZE];
/* remove config */
hts_settings_remove("input/dvb/networks/%s",
- idnode_uuid_as_sstr(in));
+ idnode_uuid_as_str(in, ubuf));
/* Parent delete */
mpegts_network_delete(mn, 1);
dvb_network_config_save ( mpegts_network_t *mn )
{
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
idnode_save(&mn->mn_id, c);
htsmsg_add_str(c, "class", mn->mn_id.in_class->ic_class);
hts_settings_save(c, "input/dvb/networks/%s/config",
- idnode_uuid_as_sstr(&mn->mn_id));
+ idnode_uuid_as_str(&mn->mn_id, ubuf));
htsmsg_destroy(c);
}
static const void *
mpegts_service_class_get_mux_uuid ( void *ptr )
{
- static char buf[UUID_HEX_SIZE], *s = buf;
mpegts_service_t *ms = ptr;
if (ms && ms->s_dvb_mux)
- strcpy(buf, idnode_uuid_as_sstr(&ms->s_dvb_mux->mm_id) ?: "");
+ idnode_uuid_as_str(&ms->s_dvb_mux->mm_id, prop_sbuf);
else
- *buf = 0;
- return &s;
+ prop_sbuf[0] = '\0';
+ return &prop_sbuf_ptr;
}
static const void *
{
htsmsg_t *c = htsmsg_create_map();
mpegts_service_t *s = (mpegts_service_t*)t;
+ char ubuf0[UUID_HEX_SIZE];
char ubuf1[UUID_HEX_SIZE];
char ubuf2[UUID_HEX_SIZE];
service_save(t, c);
hts_settings_save(c, "input/dvb/networks/%s/muxes/%s/services/%s",
- idnode_uuid_as_sstr(&s->s_dvb_mux->mm_network->mn_id),
+ idnode_uuid_as_str(&s->s_dvb_mux->mm_network->mn_id, ubuf0),
idnode_uuid_as_str(&s->s_dvb_mux->mm_id, ubuf1),
idnode_uuid_as_str(&s->s_id, ubuf2));
htsmsg_destroy(c);
{
mpegts_service_t *ms = (mpegts_service_t*)t;
mpegts_mux_t *mm = ms->s_dvb_mux;
+ char ubuf0[UUID_HEX_SIZE];
char ubuf1[UUID_HEX_SIZE];
char ubuf2[UUID_HEX_SIZE];
/* Remove config */
if (delconf && t->s_type == STYPE_STD)
hts_settings_remove("input/dvb/networks/%s/muxes/%s/services/%s",
- idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+ idnode_uuid_as_str(&mm->mm_network->mn_id, ubuf0),
idnode_uuid_as_str(&mm->mm_id, ubuf1),
idnode_uuid_as_str(&t->s_id, ubuf2));
satip_device_dbus_notify( satip_device_t *sd, const char *sig_name )
{
#if ENABLE_DBUS_1
- char buf[256];
+ char buf[256], ubuf[UUID_HEX_SIZE];
htsmsg_t *msg = htsmsg_create_list();
htsmsg_add_str(msg, NULL, sd->sd_info.addr);
htsmsg_add_str(msg, NULL, sd->sd_info.location);
htsmsg_add_str(msg, NULL, sd->sd_info.server);
htsmsg_add_s64(msg, NULL, sd->sd_info.rtsp_port);
- snprintf(buf, sizeof(buf), "/input/mpegts/satip/%s", idnode_uuid_as_sstr(&sd->th_id));
+ snprintf(buf, sizeof(buf), "/input/mpegts/satip/%s", idnode_uuid_as_str(&sd->th_id, ubuf));
dbus_emit_signal(buf, sig_name, msg);
#endif
}
{
satip_frontend_t *lfe;
htsmsg_t *m, *l;
+ char ubuf[UUID_HEX_SIZE];
if (sd->sd_nosave)
return;
htsmsg_add_msg(m, "frontends", l);
hts_settings_save(m, "input/satip/adapters/%s",
- idnode_uuid_as_sstr(&sd->th_id));
+ idnode_uuid_as_str(&sd->th_id, ubuf));
htsmsg_destroy(m);
}
void
satip_frontend_save ( satip_frontend_t *lfe, htsmsg_t *fe )
{
- char id[16];
+ char id[16], ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
/* Save frontend */
mpegts_input_save((mpegts_input_t*)lfe, m);
htsmsg_add_str(m, "type", dvb_type2str(lfe->sf_type));
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lfe->ti_id));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&lfe->ti_id, ubuf));
if (lfe->ti_id.in_class == &satip_frontend_dvbs_class) {
satip_satconf_save(lfe, m);
htsmsg_delete_field(m, "networks");
htsmsg_field_t *f;
const char *str;
int i, save;
+ char ubuf[UUID_HEX_SIZE];
HTSMSG_FOREACH(f, msg) {
if (!(str = htsmsg_field_get_str(f))) continue;
TAILQ_FOREACH(sfc2, &lfe->sf_satconf, sfc_link) {
for (i = 0; i < sfc2->sfc_networks->is_count; i++)
htsmsg_add_str(l, NULL,
- idnode_uuid_as_sstr(sfc2->sfc_networks->is_array[i]));
+ idnode_uuid_as_str(sfc2->sfc_networks->is_array[i], ubuf));
}
mpegts_input_class_network_set(lfe, l);
/* update the slave tuners, too */
{
tvhdhomerun_frontend_t *lfe;
htsmsg_t *m, *l;
+ char ubuf[UUID_HEX_SIZE];
m = htsmsg_create_map();
idnode_save(&hd->th_id, m);
htsmsg_add_str(m, "fe_override", hd->hd_override_type);
hts_settings_save(m, "input/tvhdhomerun/adapters/%s",
- idnode_uuid_as_sstr(&hd->th_id));
+ idnode_uuid_as_str(&hd->th_id, ubuf));
htsmsg_destroy(m);
}
void
tvhdhomerun_frontend_save ( tvhdhomerun_frontend_t *hfe, htsmsg_t *fe )
{
- char id[16];
+ char id[16], ubuf[UUID_HEX_SIZE];
htsmsg_t *m = htsmsg_create_map();
/* Save frontend */
mpegts_input_save((mpegts_input_t*)hfe, m);
htsmsg_add_str(m, "type", dvb_type2str(hfe->hf_type));
- htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&hfe->ti_id));
+ htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&hfe->ti_id, ubuf));
/* Add to list */
snprintf(id, sizeof(id), "%s #%d", dvb_type2str(hfe->hf_type), hfe->hf_tunerNumber);
static void
profile_delete(profile_t *pro, int delconf)
{
+ char ubuf[UUID_HEX_SIZE];
pro->pro_enabled = 0;
if (pro->pro_conf_changed)
pro->pro_conf_changed(pro);
if (delconf)
- hts_settings_remove("profile/%s", idnode_uuid_as_sstr(&pro->pro_id));
+ hts_settings_remove("profile/%s", idnode_uuid_as_str(&pro->pro_id, ubuf));
TAILQ_REMOVE(&profiles, pro, pro_link);
idnode_unlink(&pro->pro_id);
dvr_config_destroy_by_profile(pro, delconf);
{
profile_t *pro = (profile_t *)in;
htsmsg_t *c = htsmsg_create_map();
+ char ubuf[UUID_HEX_SIZE];
if (pro == profile_default)
pro->pro_enabled = 1;
idnode_save(in, c);
if (pro->pro_shield)
htsmsg_add_bool(c, "shield", 1);
- hts_settings_save(c, "profile/%s", idnode_uuid_as_sstr(in));
+ hts_settings_save(c, "profile/%s", idnode_uuid_as_str(in, ubuf));
htsmsg_destroy(c);
if (pro->pro_conf_changed)
pro->pro_conf_changed(pro);
profile_t *pro, *res = NULL;
htsmsg_field_t *f;
const char *uuid, *uuid2;
+ char ubuf[UUID_HEX_SIZE];
pro = profile_find_by_uuid(name);
if (!pro)
if (!profile_verify(pro, sflags))
pro = NULL;
if (uuids) {
- uuid = pro ? idnode_uuid_as_sstr(&pro->pro_id) : "";
+ uuid = pro ? idnode_uuid_as_str(&pro->pro_id, ubuf) : "";
HTSMSG_FOREACH(f, uuids) {
uuid2 = htsmsg_field_get_str(f) ?: "";
if (strcmp(uuid, uuid2) == 0 && profile_verify(pro, sflags))
htsmsg_t *m;
htsmsg_field_t *f;
const char *uuid, *s;
+ char ubuf[UUID_HEX_SIZE];
TAILQ_FOREACH(pro, &profiles, pro_link) {
if (!pro->pro_work)
continue;
- uuid = idnode_uuid_as_sstr(&pro->pro_id);
+ uuid = idnode_uuid_as_str(&pro->pro_id, ubuf);
if (filter) {
HTSMSG_FOREACH(f, filter) {
if (!(s = htsmsg_field_get_str(f)))
caid_t *ca, *ca2;
int i, n, p, o, exclusive, sindex;
uint32_t mask;
+ char ubuf[UUID_HEX_SIZE];
/* rebuild the filtered and ordered components */
TAILQ_INIT(&t->s_filt_components);
strncmp(esf->esf_language, st->es_lang, 4))
continue;
if (esf->esf_service[0]) {
- if (strcmp(esf->esf_service, idnode_uuid_as_sstr(&t->s_id)))
+ if (strcmp(esf->esf_service, idnode_uuid_as_str(&t->s_id, ubuf)))
continue;
if (esf->esf_pid && esf->esf_pid != st->es_pid)
continue;
int e, tr, qd = 0;
service_mapper_item_t *smi;
service_t *s;
+ char ubuf[UUID_HEX_SIZE];
/* Reset stat counters */
if (TAILQ_EMPTY(&service_mapper_queue))
if (uuids) {
htsmsg_field_t *f;
const char *str;
- const char *uuid = idnode_uuid_as_sstr(&s->s_id);
+ const char *uuid = idnode_uuid_as_str(&s->s_id, ubuf);
HTSMSG_FOREACH(f, uuids) {
if (!(str = htsmsg_field_get_str(f))) continue;
if (!strcmp(str, uuid)) break;
if (!f) continue;
}
tvhtrace("service_mapper", "check service %s (%s)",
- s->s_nicename, idnode_uuid_as_sstr(&s->s_id));
+ s->s_nicename, idnode_uuid_as_str(&s->s_id, ubuf));
/* Already mapped (or in progress) */
if (s->s_sm_onqueue) continue;
dvr_query_result_t dqr;
const char *rstatus = NULL;
const char *lang = http_arg_get(&hc->hc_args, "Accept-Language");
+ char ubuf[UUID_HEX_SIZE];
htsbuf_qprintf(hq, "<html>");
htsbuf_qprintf(hq, "<body>");
rstatus = val2str(de->de_sched_state, recstatustxt);
- htsbuf_qprintf(hq, "<a href=\"/pvrinfo/%s\">", idnode_uuid_as_sstr(&de->de_id));
+ htsbuf_qprintf(hq, "<a href=\"/pvrinfo/%s\">", idnode_uuid_as_str(&de->de_id, ubuf));
htsbuf_qprintf(hq,
"%02d:%02d-%02d:%02d %s",
dvr_entry_t *de;
const char *rstatus;
dvr_entry_sched_state_t dvr_status;
- const char *lang = http_arg_get(&hc->hc_args, "Accept-Language");
+ const char *lang = http_arg_get(&hc->hc_args, "Accept-Language");
const char *s;
pthread_mutex_lock(&global_lock);
struct tm a, b;
dvr_entry_t *de;
const char *rstatus;
+ char ubuf[UUID_HEX_SIZE];
pthread_mutex_lock(&global_lock);
htsbuf_qprintf(hq, "Recording status: %s<br>", rstatus);
htsbuf_qprintf(hq, "<form method=\"post\" action=\"/pvrinfo/%s\">",
- idnode_uuid_as_sstr(&de->de_id));
+ idnode_uuid_as_str(&de->de_id, ubuf));
switch(de->de_sched_state) {
case DVR_SCHEDULED:
char buf[255];
char *profile, *hostpath;
const char *name;
+ char ubuf[UUID_HEX_SIZE];
if (http_access_verify_channel(hc, ACCESS_STREAMING, channel))
return HTTP_STATUS_UNAUTHORIZED;
htsbuf_append_str(hq, "#EXTM3U\n");
http_m3u_playlist_add(hq, hostpath, buf, profile, name,
channel_get_icon(channel),
- channel_get_suuid(channel),
+ channel_get_uuid(channel, ubuf),
hc->hc_access);
} else if (pltype == PLAYLIST_E2) {
http_tag_playlist(http_connection_t *hc, int pltype, channel_tag_t *tag)
{
htsbuf_queue_t *hq;
- char buf[255];
+ char buf[255], ubuf[UUID_HEX_SIZE];
idnode_list_mapping_t *ilm;
char *profile, *hostpath;
const char *name;
if (pltype == PLAYLIST_M3U) {
http_m3u_playlist_add(hq, hostpath, buf, profile, name,
channel_get_icon(ch),
- channel_get_suuid(ch),
+ channel_get_uuid(ch, ubuf),
hc->hc_access);
} else if (pltype == PLAYLIST_E2) {
htsbuf_qprintf(hq, "#NAME %s\n", name);
http_channel_list_playlist(http_connection_t *hc, int pltype)
{
htsbuf_queue_t *hq;
- char buf[255];
+ char buf[255], ubuf[UUID_HEX_SIZE];
channel_t *ch;
channel_t **chlist;
int idx = 0, count = 0;
if (pltype == PLAYLIST_M3U) {
http_m3u_playlist_add(hq, hostpath, buf, profile, name,
channel_get_icon(ch),
- channel_get_suuid(ch),
+ channel_get_uuid(ch, ubuf),
hc->hc_access);
} else if (pltype == PLAYLIST_E2) {
http_e2_playlist_add(hq, hostpath, buf, profile, name);
http_dvr_list_playlist(http_connection_t *hc, int pltype)
{
htsbuf_queue_t *hq;
- char buf[255];
+ char buf[255], ubuf[UUID_HEX_SIZE];
dvr_entry_t *de;
const char *uuid;
char *hostpath;
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration);
- uuid = idnode_uuid_as_sstr(&de->de_id);
+ uuid = idnode_uuid_as_str(&de->de_id, ubuf);
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%s,BANDWIDTH=%d\n", uuid, bandwidth);
htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf);
http_dvr_playlist(http_connection_t *hc, int pltype, dvr_entry_t *de)
{
htsbuf_queue_t *hq = &hc->hc_reply;
- char buf[255];
+ char buf[255], ubuf[UUID_HEX_SIZE];
const char *ticket_id = NULL, *uuid;
time_t durration = 0;
off_t fsize = 0;
htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL));
htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration);
- uuid = idnode_uuid_as_sstr(&de->de_id);
+ uuid = idnode_uuid_as_str(&de->de_id, ubuf);
htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%s,BANDWIDTH=%d\n", uuid, bandwidth);
htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf);
http_xmltv_channel_add(htsbuf_queue_t *hq, const char *hostpath, channel_t *ch)
{
const char *icon = channel_get_icon(ch);
+ char ubuf[UUID_HEX_SIZE];
htsbuf_qprintf(hq, "<channel id=\"%s\">\n<display-name>",
- idnode_uuid_as_sstr(&ch->ch_id));
+ idnode_uuid_as_str(&ch->ch_id, ubuf));
htsbuf_append_and_escape_xml(hq, channel_get_name(ch));
htsbuf_append_str(hq, "</display-name>\n");
if (icon) {
http_xmltv_programme_one(htsbuf_queue_t *hq, const char *hostpath,
channel_t *ch, epg_broadcast_t *ebc)
{
- char start[32], stop[32];
+ char start[32], stop[32], ubuf[UUID_HEX_SIZE];
epg_episode_t *e = ebc->episode;
lang_str_ele_t *lse;
http_xmltv_time(start, ebc->start);
http_xmltv_time(stop, ebc->stop);
htsbuf_qprintf(hq, "<programme start=\"%s\" stop=\"%s\" channel=\"%s\">\n",
- start, stop, idnode_uuid_as_sstr(&ch->ch_id));
+ start, stop, idnode_uuid_as_str(&ch->ch_id, ubuf));
RB_FOREACH(lse, e->title, link) {
htsbuf_qprintf(hq, " <title lang=\"%s\">", lse->lang);
htsbuf_append_and_escape_xml(hq, lse->str);