]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
idnode: idnode_uuid_as_str cleanups
authorJaroslav Kysela <perex@perex.cz>
Tue, 8 Sep 2015 12:48:21 +0000 (14:48 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 8 Sep 2015 12:50:26 +0000 (14:50 +0200)
51 files changed:
src/access.c
src/api/api_bouquet.c
src/api/api_caclient.c
src/api/api_channel.c
src/api/api_dvr.c
src/api/api_epg.c
src/api/api_idnode.c
src/api/api_mpegts.c
src/api/api_profile.c
src/api/api_service.c
src/bouquet.c
src/channels.c
src/channels.h
src/descrambler/caclient.c
src/dvr/dvr_autorec.c
src/dvr/dvr_config.c
src/dvr/dvr_db.c
src/dvr/dvr_timerec.c
src/epg.c
src/epggrab/module.c
src/epggrab/module/eit.c
src/epggrab/module/opentv.c
src/epggrab/otamux.c
src/esfilter.c
src/htsp_server.c
src/idnode.c
src/idnode.h
src/input/mpegts/dvb_psi.c
src/input/mpegts/iptv/iptv.c
src/input/mpegts/iptv/iptv_mux.c
src/input/mpegts/iptv/iptv_service.c
src/input/mpegts/linuxdvb/linuxdvb_adapter.c
src/input/mpegts/linuxdvb/linuxdvb_ca.c
src/input/mpegts/linuxdvb/linuxdvb_frontend.c
src/input/mpegts/linuxdvb/linuxdvb_satconf.c
src/input/mpegts/mpegts_input.c
src/input/mpegts/mpegts_mux.c
src/input/mpegts/mpegts_mux_dvb.c
src/input/mpegts/mpegts_mux_sched.c
src/input/mpegts/mpegts_network_dvb.c
src/input/mpegts/mpegts_service.c
src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_frontend.c
src/input/mpegts/satip/satip_satconf.c
src/input/mpegts/tvhdhomerun/tvhdhomerun.c
src/input/mpegts/tvhdhomerun/tvhdhomerun_frontend.c
src/profile.c
src/service.c
src/service_mapper.c
src/webui/simpleui.c
src/webui/webui.c

index 7fcae781b6d8e1883d26e32197b063e0aa29016c..9e34fac889a1c935daac29ee82553f29e043c075 100644 (file)
@@ -510,7 +510,7 @@ access_update(access_t *a, access_entry_t *ae)
     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_str(&pro->pro_id));
+      htsmsg_add_str_exclusive(a->aa_profiles, idnode_uuid_as_sstr(&pro->pro_id));
     }
   }
 
@@ -519,7 +519,7 @@ access_update(access_t *a, access_entry_t *ae)
     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_str(&dvr->dvr_id));
+      htsmsg_add_str_exclusive(a->aa_dvrcfgs, idnode_uuid_as_sstr(&dvr->dvr_id));
      }
   }
 
@@ -534,7 +534,7 @@ access_update(access_t *a, access_entry_t *ae)
         if (ilm == NULL) {
           if (a->aa_chtags == NULL)
             a->aa_chtags = htsmsg_create_list();
-          htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_str(&ct->ct_id));
+          htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_sstr(&ct->ct_id));
         }
       }
     }
@@ -544,7 +544,7 @@ access_update(access_t *a, access_entry_t *ae)
       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_str(&ct->ct_id));
+        htsmsg_add_str_exclusive(a->aa_chtags, idnode_uuid_as_sstr(&ct->ct_id));
       }
     }
   }
@@ -1054,7 +1054,7 @@ access_entry_save(access_entry_t *ae)
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&ae->ae_id, c);
-  hts_settings_save(c, "accesscontrol/%s", idnode_uuid_as_str(&ae->ae_id));
+  hts_settings_save(c, "accesscontrol/%s", idnode_uuid_as_sstr(&ae->ae_id));
   htsmsg_destroy(c);
 }
 
@@ -1092,7 +1092,7 @@ access_entry_class_delete(idnode_t *self)
 {
   access_entry_t *ae = (access_entry_t *)self;
 
-  hts_settings_remove("accesscontrol/%s", idnode_uuid_as_str(&ae->ae_id));
+  hts_settings_remove("accesscontrol/%s", idnode_uuid_as_sstr(&ae->ae_id));
   access_entry_destroy(ae);
 }
 
@@ -1595,7 +1595,7 @@ passwd_entry_save(passwd_entry_t *pw)
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&pw->pw_id, c);
-  hts_settings_save(c, "passwd/%s", idnode_uuid_as_str(&pw->pw_id));
+  hts_settings_save(c, "passwd/%s", idnode_uuid_as_sstr(&pw->pw_id));
   htsmsg_destroy(c);
 }
 
@@ -1610,7 +1610,7 @@ passwd_entry_class_delete(idnode_t *self)
 {
   passwd_entry_t *pw = (passwd_entry_t *)self;
 
-  hts_settings_remove("passwd/%s", idnode_uuid_as_str(&pw->pw_id));
+  hts_settings_remove("passwd/%s", idnode_uuid_as_sstr(&pw->pw_id));
   passwd_entry_destroy(pw);
 }
 
index 3f891afd57c8bae7cf63200be99fae7d40642a21..2ac0d1f55395d1cd1390218bc06483276685b016 100644 (file)
@@ -36,7 +36,7 @@ api_bouquet_list
   pthread_mutex_lock(&global_lock);
   RB_FOREACH(bq, &bouquets, bq_link) {
     e = htsmsg_create_map();
-    htsmsg_add_str(e, "key", idnode_uuid_as_str(&bq->bq_id));
+    htsmsg_add_str(e, "key", idnode_uuid_as_sstr(&bq->bq_id));
     htsmsg_add_str(e, "val", bq->bq_name ?: "");
     htsmsg_add_msg(l, NULL, e);
   }
index 0cf933789ea5cd94eec5ccd2cf0fc5b67066a3a4..1f4250bb9d5a7368c0f44646043cdfe7acd13424 100644 (file)
@@ -37,7 +37,7 @@ api_caclient_list
   pthread_mutex_lock(&global_lock);
   TAILQ_FOREACH(cac, &caclients, cac_link) {
     e = htsmsg_create_map();
-    htsmsg_add_str(e, "uuid", idnode_uuid_as_str(&cac->cac_id));
+    htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(&cac->cac_id));
     htsmsg_add_str(e, "title", idnode_get_title(&cac->cac_id, perm->aa_lang));
     htsmsg_add_str(e, "status", caclient_get_status(cac));
     htsmsg_add_msg(l, NULL, e);
index ecf88345e8e04d5d8653d08416178ff3cb2d5042..4eaf53d970fa58840e4b30470cb6f1d026aa0e92 100644 (file)
@@ -57,9 +57,9 @@ api_channel_list
     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_str(&ch->ch_id), buf);
+      api_channel_key_val(l, idnode_uuid_as_sstr(&ch->ch_id), buf);
     } else {
-      api_channel_key_val(l, idnode_uuid_as_str(&ch->ch_id), channel_get_name(ch));
+      api_channel_key_val(l, idnode_uuid_as_sstr(&ch->ch_id), channel_get_name(ch));
     }
   }
   pthread_mutex_unlock(&global_lock);
@@ -114,10 +114,10 @@ api_channel_tag_list
   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_str(&ct->ct_id), ct->ct_name);
+        api_channel_key_val(l, idnode_uuid_as_sstr(&ct->ct_id), ct->ct_name);
       } else {
         snprintf(buf, sizeof(buf), "{%s}", ct->ct_name);
-        api_channel_key_val(l, idnode_uuid_as_str(&ct->ct_id), buf);
+        api_channel_key_val(l, idnode_uuid_as_sstr(&ct->ct_id), buf);
       }
     }
   pthread_mutex_unlock(&global_lock);
index 6da6864072b2fc88d17ddc045b6df5bf715b146c..9825185ddb74869719fb93ca98d02ec190c22ee5 100644 (file)
@@ -145,7 +145,7 @@ api_dvr_entry_create
   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_str(&cfg->dvr_id));
+    htsmsg_set_str(conf, "config_name", idnode_uuid_as_sstr(&cfg->dvr_id));
     htsmsg_set_str(conf, "owner", perm->aa_username ?: "");
     htsmsg_set_str(conf, "creator", perm->aa_representative ?: "");
 
@@ -213,6 +213,7 @@ api_dvr_entry_create_by_event
   htsmsg_field_t *f;
   const char *s;
   int count = 0;
+  char ubuf[UUID_HEX_SIZE];
 
   if (!(entries = htsmsg_get_list(args, "entries"))) {
     entries = entries2 = api_dvr_entry_create_from_single(args);
@@ -233,7 +234,7 @@ api_dvr_entry_create_by_event
     if ((e = epg_broadcast_find_by_id(strtoll(s, NULL, 10)))) {
       dvr_config_t *cfg = dvr_config_find_by_list(perm->aa_dvrcfgs, config_uuid);
       if (cfg) {
-        de = dvr_entry_create_by_event(idnode_uuid_as_str(&cfg->dvr_id),
+        de = dvr_entry_create_by_event(idnode_uuid_as_str(&cfg->dvr_id, ubuf),
                                        e, 0, 0,
                                        perm->aa_username,
                                        perm->aa_representative,
@@ -309,7 +310,7 @@ api_dvr_autorec_create
   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_str(&cfg->dvr_id));
+    htsmsg_set_str(conf, "config_name", idnode_uuid_as_sstr(&cfg->dvr_id));
     dae = dvr_autorec_create(NULL, conf);
     if (dae) {
       dvr_autorec_save(dae);
@@ -331,6 +332,7 @@ api_dvr_autorec_create_by_series
   htsmsg_field_t *f;
   const char *config_uuid, *s;
   int count = 0;
+  char ubuf[UUID_HEX_SIZE];
 
   if (!(entries = htsmsg_get_list(args, "entries"))) {
     entries = entries2 = api_dvr_entry_create_from_single(args);
@@ -350,7 +352,7 @@ api_dvr_autorec_create_by_series
     if ((e = epg_broadcast_find_by_id(strtoll(s, NULL, 10)))) {
       dvr_config_t *cfg = dvr_config_find_by_list(perm->aa_dvrcfgs, config_uuid);
       if (cfg) {
-        dae = dvr_autorec_add_series_link(idnode_uuid_as_str(&cfg->dvr_id),
+        dae = dvr_autorec_add_series_link(idnode_uuid_as_str(&cfg->dvr_id, ubuf),
                                           e,
                                           perm->aa_username,
                                           perm->aa_representative,
index 1a3e44354a58a976c11bb397fd2e3b0109090509..3d3a0a0a58920d3991e930a95197f6db5e6397b6 100644 (file)
@@ -56,7 +56,7 @@ api_epg_add_channel ( htsmsg_t *m, channel_t *ch )
   char buf[32];
   const char *s;
   htsmsg_add_str(m, "channelName", channel_get_name(ch));
-  htsmsg_add_str(m, "channelUuid", channel_get_uuid(ch));
+  htsmsg_add_str(m, "channelUuid", channel_get_suuid(ch));
   if ((chnum = channel_get_number(ch)) >= 0) {
     uint32_t maj = chnum / CHANNEL_SPLIT;
     uint32_t min = chnum % CHANNEL_SPLIT;
@@ -167,8 +167,8 @@ api_epg_entry ( epg_broadcast_t *eb, const char *lang, access_t *perm )
   if (!access_verify2(perm, ACCESS_RECORDER) &&
       (de = dvr_entry_find_by_event(eb)) &&
       !access_verify_list(perm->aa_dvrcfgs,
-                          idnode_uuid_as_str(&de->de_config->dvr_id))) {
-    htsmsg_add_str(m, "dvrUuid", idnode_uuid_as_str(&de->de_id));
+                          idnode_uuid_as_sstr(&de->de_config->dvr_id))) {
+    htsmsg_add_str(m, "dvrUuid", idnode_uuid_as_sstr(&de->de_id));
     htsmsg_add_str(m, "dvrState", dvr_entry_schedstatus(de));
   }
 
index c6e9eb07f7f50188b8a906eef820c7a29dca1b97..28437babf76d2071dc83fa5535de1bdb20a503cf 100644 (file)
@@ -143,7 +143,7 @@ api_idnode_grid
   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_str(in));
+    htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(in));
     if (idnode_perm(in, perm, NULL))
       continue;
     idnode_read0(in, e, flist, 0, perm->aa_lang);
@@ -197,7 +197,7 @@ api_idnode_load_by_class
       /* Name/UUID only */
       if (_enum) {
         e = htsmsg_create_map();
-        htsmsg_add_str(e, "key", idnode_uuid_as_str(in));
+        htsmsg_add_str(e, "key", idnode_uuid_as_sstr(in));
         htsmsg_add_str(e, "val", idnode_get_title(in, perm->aa_lang));
 
       /* Full record */
index 4a54383c78933071c750520ff0ce4865b9c9172f..ac7d52456f5fd1f53eac305b49c027b8074e650f 100644 (file)
@@ -57,7 +57,7 @@ api_mpegts_input_network_list
       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_str(is->is_array[i]));
+      htsmsg_add_str(e, "key", idnode_uuid_as_sstr(is->is_array[i]));
       mn->mn_display_name(mn, buf, sizeof(buf));
       htsmsg_add_str(e, "val", buf);
       htsmsg_add_msg(l, NULL, e);
index 5e554eb81def51dd949bde1a8985e11e0337bef7..e84717d3b196c0720563e470dcadba5c6be5c98f 100644 (file)
@@ -37,7 +37,7 @@ api_profile_list
   pthread_mutex_lock(&global_lock);
   TAILQ_FOREACH(pro, &profiles, pro_link) {
     e = htsmsg_create_map();
-    htsmsg_add_str(e, "key", idnode_uuid_as_str(&pro->pro_id));
+    htsmsg_add_str(e, "key", idnode_uuid_as_sstr(&pro->pro_id));
     htsmsg_add_str(e, "val", profile_get_name(pro));
     htsmsg_add_msg(l, NULL, e);
   }
index f132c54002ec02bb186f4508348dcd14b4118175..3afa19a630ac8bb1dee714870e29ba675ee91753 100644 (file)
@@ -73,7 +73,7 @@ api_mapper_status_msg ( void )
   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_str(&stat.active->s_id));
+    htsmsg_add_str(m, "active", idnode_uuid_as_sstr(&stat.active->s_id));
   return m;
 }
 
index 5e531350f2c2a474036009398cf30affac2d1a8e..2f6f186ac1fe820877dc381c7f3efb63198873d7 100644 (file)
@@ -508,7 +508,7 @@ bouquet_save(bouquet_t *bq, int notify)
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&bq->bq_id, c);
-  hts_settings_save(c, "bouquet/%s", idnode_uuid_as_str(&bq->bq_id));
+  hts_settings_save(c, "bouquet/%s", idnode_uuid_as_sstr(&bq->bq_id));
   if (bq->bq_shield)
     htsmsg_add_bool(c, "shield", 1);
   htsmsg_destroy(c);
@@ -535,7 +535,7 @@ bouquet_class_delete(idnode_t *self)
   bq->bq_enabled = 0;
   bouquet_map_to_channels(bq);
   if (!bq->bq_shield) {
-    hts_settings_remove("bouquet/%s", idnode_uuid_as_str(&bq->bq_id));
+    hts_settings_remove("bouquet/%s", idnode_uuid_as_sstr(&bq->bq_id));
     bouquet_destroy(bq);
   } else {
     idnode_set_free(bq->bq_services);
@@ -702,7 +702,7 @@ bouquet_class_chtag_ref_get ( void *obj )
   bouquet_t *bq = obj;
 
   if (bq->bq_chtag_ptr)
-    buf = idnode_uuid_as_str(&bq->bq_chtag_ptr->ct_id);
+    buf = idnode_uuid_as_sstr(&bq->bq_chtag_ptr->ct_id);
   else
     buf = "";
   return &buf;
@@ -748,7 +748,7 @@ bouquet_class_services_get ( void *obj )
       htsmsg_add_s64(e, "lcn", lcn);
     if ((tag = bouquet_get_tag_number(bq, t)) != 0)
       htsmsg_add_s64(e, "tag", lcn);
-    htsmsg_add_msg(m, idnode_uuid_as_str(&t->s_id), e);
+    htsmsg_add_msg(m, idnode_uuid_as_sstr(&t->s_id), e);
   }
 
   return m;
index 3c9b00268f7289e7bc9ca5cf565e345d16238eb5..26f6251c7b8f5fae01a7d032d9f438d772440c0f 100644 (file)
@@ -261,7 +261,7 @@ channel_class_bouquet_get ( void *o )
   static const char *sbuf;
   channel_t *ch = o;
   if (ch->ch_bouquet)
-    sbuf = idnode_uuid_as_str(&ch->ch_bouquet->bq_id);
+    sbuf = idnode_uuid_as_sstr(&ch->ch_bouquet->bq_id);
   else
     sbuf = "";
   return &sbuf;
@@ -466,7 +466,7 @@ channel_access(channel_t *ch, access_t *a, int disabled)
     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_str(ilm->ilm_in1)))
+                    idnode_uuid_as_sstr(ilm->ilm_in1)))
           goto chtags_ok;
       }
     }
@@ -778,7 +778,7 @@ channel_delete ( channel_t *ch, int delconf )
 
   /* Settings */
   if (delconf)
-    hts_settings_remove("channel/config/%s", idnode_uuid_as_str(&ch->ch_id));
+    hts_settings_remove("channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
 
   /* Free memory */
   RB_REMOVE(&channels, ch, ch_link);
@@ -796,7 +796,7 @@ channel_save ( channel_t *ch )
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&ch->ch_id, c);
-  hts_settings_save(c, "channel/config/%s", idnode_uuid_as_str(&ch->ch_id));
+  hts_settings_save(c, "channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
   htsmsg_destroy(c);
 }
 
@@ -948,7 +948,7 @@ channel_tag_destroy(channel_tag_t *ct, int delconf)
     channel_tag_mapping_destroy(ilm, delconf ? ilm->ilm_in1 : NULL);
 
   if (delconf)
-    hts_settings_remove("channel/tag/%s", idnode_uuid_as_str(&ct->ct_id));
+    hts_settings_remove("channel/tag/%s", idnode_uuid_as_sstr(&ct->ct_id));
 
   if(ct->ct_enabled && !ct->ct_internal)
     htsp_tag_delete(ct);
@@ -974,7 +974,7 @@ channel_tag_save(channel_tag_t *ct)
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&ct->ct_id, c);
-  hts_settings_save(c, "channel/tag/%s", idnode_uuid_as_str(&ct->ct_id));
+  hts_settings_save(c, "channel/tag/%s", idnode_uuid_as_sstr(&ct->ct_id));
   htsmsg_destroy(c);
   htsp_tag_update(ct);
 }
@@ -1016,7 +1016,7 @@ channel_tag_access(channel_tag_t *ct, access_t *a, int disabled)
   /* Channel tag check */
   if (a->aa_chtags) {
     htsmsg_field_t *f;
-    const char *uuid = idnode_uuid_as_str(&ct->ct_id);
+    const char *uuid = idnode_uuid_as_sstr(&ct->ct_id);
     HTSMSG_FOREACH(f, a->aa_chtags)
       if (!strcmp(htsmsg_field_get_str(f) ?: "", uuid))
         goto chtags_ok;
index 5589bb232acb00c067f641520e9293cbfc1dc83c..7269dc4769123565984d4b4093f93e6977c8c81a 100644 (file)
@@ -174,8 +174,8 @@ int channel_set_number ( channel_t *ch, uint32_t major, uint32_t minor );
 const char *channel_get_icon ( channel_t *ch );
 int channel_set_icon ( channel_t *ch, const char *icon );
 
-#define channel_get_uuid(ch) idnode_uuid_as_str(&(ch)->ch_id)
+#define channel_get_suuid(ch) idnode_uuid_as_sstr(&(ch)->ch_id)
 
-#define channel_get_id(ch)   idnode_get_short_uuid((&(ch)->ch_id))
+#define channel_get_id(ch)    idnode_get_short_uuid((&(ch)->ch_id))
 
 #endif /* CHANNELS_H */
index ab44137a629f4efd7398dee8e5f2c6042010412f..b43869792c2220f0ef465569fab5a6fec2bc2cd4 100644 (file)
@@ -140,7 +140,7 @@ caclient_delete(caclient_t *cac, int delconf)
   cac->cac_enabled = 0;
   cac->cac_conf_changed(cac);
   if (delconf)
-    hts_settings_remove("caclient/%s", idnode_uuid_as_str(&cac->cac_id));
+    hts_settings_remove("caclient/%s", idnode_uuid_as_sstr(&cac->cac_id));
   pthread_mutex_lock(&caclients_mutex);
   TAILQ_REMOVE(&caclients, cac, cac_link);
   pthread_mutex_unlock(&caclients_mutex);
@@ -158,7 +158,7 @@ caclient_class_save ( idnode_t *in )
   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_str(in));
+  hts_settings_save(c, "caclient/%s", idnode_uuid_as_sstr(in));
   htsmsg_destroy(c);
   cac->cac_conf_changed(cac);
 }
index e4c41978dc76df1c80af4b6590bee1a03351c447..e8c5eb46b07875d1ef4978ec1656bedcd5c75874 100644 (file)
@@ -260,7 +260,7 @@ dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int full
   if (start_window >= 0)
     htsmsg_add_s32(conf, "start_window", start_window);
   if (ch)
-    htsmsg_add_str(conf, "channel", idnode_uuid_as_str(&ch->ch_id));
+    htsmsg_add_str(conf, "channel", idnode_uuid_as_sstr(&ch->ch_id));
 
   int i;
   for (i = 0; i < 7; i++)
@@ -320,7 +320,7 @@ autorec_entry_destroy(dvr_autorec_entry_t *dae, int delconf)
   dvr_autorec_purge_spawns(dae, delconf);
 
   if (delconf)
-    hts_settings_remove("dvr/autorec/%s", idnode_uuid_as_str(&dae->dae_id));
+    hts_settings_remove("dvr/autorec/%s", idnode_uuid_as_sstr(&dae->dae_id));
 
   htsp_autorec_entry_delete(dae);
 
@@ -368,7 +368,7 @@ dvr_autorec_save(dvr_autorec_entry_t *dae)
   lock_assert(&global_lock);
 
   idnode_save(&dae->dae_id, m);
-  hts_settings_save(m, "dvr/autorec/%s", idnode_uuid_as_str(&dae->dae_id));
+  hts_settings_save(m, "dvr/autorec/%s", idnode_uuid_as_sstr(&dae->dae_id));
   htsmsg_destroy(m);
 }
 
@@ -444,7 +444,7 @@ 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_str(&dae->dae_channel->ch_id);
+    ret = idnode_uuid_as_sstr(&dae->dae_channel->ch_id);
   else
     ret = "";
   return &ret;
@@ -505,7 +505,7 @@ 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_str(&dae->dae_channel_tag->ct_id);
+    ret = idnode_uuid_as_sstr(&dae->dae_channel_tag->ct_id);
   else
     ret = "";
   return &ret;
@@ -652,7 +652,7 @@ 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_str(&dae->dae_config->dvr_id);
+    ret = idnode_uuid_as_sstr(&dae->dae_config->dvr_id);
   else
     ret = "";
   return &ret;
index f331d52578881c5e9c77952ec5d2ae25fe2a5e91..cc6ed4571d53660af9906dee32380b7af85672c4 100644 (file)
@@ -105,11 +105,12 @@ dvr_config_find_by_list(htsmsg_t *uuids, const char *name)
   dvr_config_t *cfg, *res = NULL;
   htsmsg_field_t *f;
   const char *uuid, *uuid2;
+  char ubuf[UUID_HEX_SIZE];
 
   cfg = dvr_config_find_by_uuid(name);
   if (!cfg)
     cfg  = dvr_config_find_by_name(name);
-  uuid = cfg ? idnode_uuid_as_str(&cfg->dvr_id) : "";
+  uuid = cfg ? idnode_uuid_as_str(&cfg->dvr_id, ubuf) : "";
   if (uuids) {
     HTSMSG_FOREACH(f, uuids) {
       uuid2 = htsmsg_field_get_str(f) ?: "";
@@ -229,7 +230,7 @@ dvr_config_destroy(dvr_config_t *cfg, int delconf)
 {
   if (delconf) {
     tvhinfo("dvr", "Deleting configuration '%s'", cfg->dvr_config_name);
-    hts_settings_remove("dvr/config/%s", idnode_uuid_as_str(&cfg->dvr_id));
+    hts_settings_remove("dvr/config/%s", idnode_uuid_as_sstr(&cfg->dvr_id));
   }
   LIST_REMOVE(cfg, config_link);
   idnode_unlink(&cfg->dvr_id);
@@ -511,7 +512,7 @@ dvr_config_save(dvr_config_t *cfg)
 
   dvr_config_storage_check(cfg);
   idnode_save(&cfg->dvr_id, m);
-  hts_settings_save(m, "dvr/config/%s", idnode_uuid_as_str(&cfg->dvr_id));
+  hts_settings_save(m, "dvr/config/%s", idnode_uuid_as_sstr(&cfg->dvr_id));
   htsmsg_destroy(m);
 }
 
@@ -555,7 +556,7 @@ dvr_config_class_perm(idnode_t *self, access_t *a, htsmsg_t *msg_to_write)
   if (!access_verify2(a, ACCESS_ADMIN))
     return 0;
   if (a->aa_dvrcfgs) {
-    my_uuid = idnode_uuid_as_str(&cfg->dvr_id);
+    my_uuid = idnode_uuid_as_sstr(&cfg->dvr_id);
     HTSMSG_FOREACH(f, a->aa_dvrcfgs) {
       uuid = htsmsg_field_get_str(f) ?: "";
       if (!strcmp(uuid, my_uuid))
@@ -635,7 +636,7 @@ 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_str(&cfg->dvr_profile->pro_id);
+    ret = idnode_uuid_as_sstr(&cfg->dvr_profile->pro_id);
   else
     ret = "";
   return &ret;
index 59f5904ac2614fa26eec8d53ba9c960341fbfa75..7b647bf0476be7eb4f892d0310dc6299a7c2e0a3 100644 (file)
@@ -475,6 +475,7 @@ dvr_entry_create(const char *uuid, htsmsg_t *conf)
   dvr_entry_t *de, *de2;
   int64_t start, stop;
   htsmsg_t *m;
+  char ubuf[UUID_HEX_SIZE];
 
   if (conf) {
     if (htsmsg_get_s64(conf, "start", &start))
@@ -521,10 +522,10 @@ dvr_entry_create(const char *uuid, htsmsg_t *conf)
          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_str(&de->de_id),
+          idnode_uuid_as_sstr(&de->de_id),
           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));
+          idnode_uuid_as_str(&de2->de_id, ubuf));
         dvr_entry_destroy(de, 0);
         return NULL;
       }
@@ -561,7 +562,7 @@ dvr_entry_create_(const char *config_uuid, epg_broadcast_t *e,
   conf = htsmsg_create_map();
   htsmsg_add_s64(conf, "start", start);
   htsmsg_add_s64(conf, "stop", stop);
-  htsmsg_add_str(conf, "channel", idnode_uuid_as_str(&ch->ch_id));
+  htsmsg_add_str(conf, "channel", idnode_uuid_as_sstr(&ch->ch_id));
   htsmsg_add_u32(conf, "pri", pri);
   htsmsg_add_u32(conf, "retention", retention);
   htsmsg_add_str(conf, "config_name", config_uuid ?: "");
@@ -610,12 +611,12 @@ dvr_entry_create_(const char *config_uuid, epg_broadcast_t *e,
     htsmsg_add_u32(conf, "broadcast", e->id);
   if (dae)
   {
-    htsmsg_add_str(conf, "autorec", idnode_uuid_as_str(&dae->dae_id));
+    htsmsg_add_str(conf, "autorec", idnode_uuid_as_sstr(&dae->dae_id));
     htsmsg_add_str(conf, "directory", dae->dae_directory ?: "");
   }
   if (dte)
   {
-    htsmsg_add_str(conf, "timerec", idnode_uuid_as_str(&dte->dte_id));
+    htsmsg_add_str(conf, "timerec", idnode_uuid_as_sstr(&dte->dte_id));
     htsmsg_add_str(conf, "directory", dte->dte_directory ?: "");
   }
 
@@ -633,7 +634,7 @@ dvr_entry_create_(const char *config_uuid, epg_broadcast_t *e,
 
   tvhlog(LOG_INFO, "dvr", "entry %s \"%s\" on \"%s\" starting at %s, "
         "scheduled for recording by \"%s\"",
-         idnode_uuid_as_str(&de->de_id),
+         idnode_uuid_as_sstr(&de->de_id),
         lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf, creator ?: "");
 
   dvr_entry_save(de);
@@ -655,10 +656,11 @@ dvr_entry_create_htsp(const char *config_uuid,
                       dvr_prio_t pri, int retention,
                       const char *comment)
 {
+  char ubuf[UUID_HEX_SIZE];
   dvr_config_t *cfg = dvr_config_find_by_uuid(config_uuid);
   if (!cfg)
     cfg = dvr_config_find_by_name(config_uuid);
-  return dvr_entry_create_(cfg ? idnode_uuid_as_str(&cfg->dvr_id) : NULL,
+  return dvr_entry_create_(cfg ? idnode_uuid_as_str(&cfg->dvr_id, ubuf) : NULL,
                            NULL,
                            ch, start, stop, start_extra, stop_extra,
                            title, subtitle, description, lang, content_type,
@@ -789,6 +791,7 @@ void
 dvr_entry_create_by_autorec(epg_broadcast_t *e, dvr_autorec_entry_t *dae)
 {
   char buf[200];
+  char ubuf[UUID_HEX_SIZE];
 
   /* Identical duplicate detection
      NOTE: Semantic duplicate detection is deferred to the start time of recording and then done using _dvr_duplicate_event by dvr_timer_start_recording. */
@@ -802,7 +805,7 @@ dvr_entry_create_by_autorec(epg_broadcast_t *e, dvr_autorec_entry_t *dae)
            dae->dae_comment ? ": " : "",
            dae->dae_comment ?: "");
 
-  dvr_entry_create_by_event(idnode_uuid_as_str(&dae->dae_config->dvr_id), e,
+  dvr_entry_create_by_event(idnode_uuid_as_str(&dae->dae_config->dvr_id, ubuf), e,
                             dae->dae_start_extra, dae->dae_stop_extra,
                             dae->dae_owner, dae->dae_creator,
                             dae, dae->dae_pri, dae->dae_retention, buf);
@@ -856,7 +859,7 @@ static void
 dvr_entry_destroy(dvr_entry_t *de, int delconf)
 {
   if (delconf)
-    hts_settings_remove("dvr/log/%s", idnode_uuid_as_str(&de->de_id));
+    hts_settings_remove("dvr/log/%s", idnode_uuid_as_sstr(&de->de_id));
 
   htsp_dvr_entry_delete(de);
   
@@ -911,7 +914,7 @@ dvr_entry_save(dvr_entry_t *de)
   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_str(&de->de_id));
+  hts_settings_save(m, "dvr/log/%s", idnode_uuid_as_sstr(&de->de_id));
   htsmsg_destroy(m);
 }
 
@@ -1110,7 +1113,7 @@ dvr_event_replaced(epg_broadcast_t *e, epg_broadcast_t *new_e)
     tvhtrace("dvr",
              "dvr entry %s event replaced %s on %s @ %"PRItime_t
              " to %"PRItime_t,
-             idnode_uuid_as_str(&de->de_id),
+             idnode_uuid_as_sstr(&de->de_id),
              epg_broadcast_get_title(e, NULL),
              channel_get_name(e->channel),
              e->start, e->stop);
@@ -1160,7 +1163,7 @@ void dvr_event_updated ( epg_broadcast_t *e )
         tvhtrace("dvr",
                  "dvr entry %s link to event %s on %s @ %"PRItime_t
                  " to %"PRItime_t,
-                 idnode_uuid_as_str(&de->de_id),
+                 idnode_uuid_as_sstr(&de->de_id),
                  epg_broadcast_get_title(e, NULL),
                  channel_get_name(e->channel),
                  e->start, e->stop);
@@ -1478,7 +1481,7 @@ 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_str(&de->de_config->dvr_id);
+    ret = idnode_uuid_as_sstr(&de->de_config->dvr_id);
   else
     ret = "";
   return &ret;
@@ -1552,7 +1555,7 @@ 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_str(&de->de_channel->ch_id);
+    ret = idnode_uuid_as_sstr(&de->de_channel->ch_id);
   else
     ret = "";
   return &ret;
@@ -1572,13 +1575,14 @@ dvr_entry_class_channel_name_set(void *o, const void *v)
 {
   dvr_entry_t *de = (dvr_entry_t *)o;
   channel_t   *ch;
+  char ubuf[UUID_HEX_SIZE];
   if (!dvr_entry_is_editable(de))
     return 0;
   if (!strcmp(de->de_channel_name ?: "", v ?: ""))
     return 0;
   ch = v ? channel_find_by_name(v) : NULL;
   if (ch) {
-    return dvr_entry_class_channel_set(o, idnode_uuid_as_str(&ch->ch_id));
+    return dvr_entry_class_channel_set(o, idnode_uuid_as_str(&ch->ch_id, ubuf));
   } else {
     free(de->de_channel_name);
     de->de_channel_name = v ? strdup(v) : NULL;
@@ -1676,7 +1680,7 @@ 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_str(&de->de_autorec->dae_id);
+    ret = idnode_uuid_as_sstr(&de->de_autorec->dae_id);
   else
     ret = "";
   return &ret;
@@ -1710,7 +1714,7 @@ dvr_entry_class_timerec_get(void *o)
   static const char *ret;
   dvr_entry_t *de = (dvr_entry_t *)o;
   if (de->de_timerec)
-    ret = idnode_uuid_as_str(&de->de_timerec->dte_id);
+    ret = idnode_uuid_as_sstr(&de->de_timerec->dte_id);
   else
     ret = "";
   return &ret;
@@ -1829,7 +1833,7 @@ dvr_entry_class_url_get(void *o)
   s = "";
   if (de->de_sched_state == DVR_COMPLETED ||
       de->de_sched_state == DVR_RECORDING) {
-    snprintf(buf, sizeof(buf), "dvrfile/%s", idnode_uuid_as_str(&de->de_id));
+    snprintf(buf, sizeof(buf), "dvrfile/%s", idnode_uuid_as_sstr(&de->de_id));
     s = buf;
   }
   return &s;
@@ -2395,7 +2399,7 @@ dvr_entry_delete(dvr_entry_t *de)
 
   tvhlog(LOG_INFO, "dvr", "delete entry %s \"%s\" on \"%s\" start time %s, "
         "scheduled for recording by \"%s\", retention %d days",
-         idnode_uuid_as_str(&de->de_id),
+         idnode_uuid_as_sstr(&de->de_id),
         lang_str_get(de->de_title, NULL), DVR_CH_NAME(de), tbuf,
         de->de_creator ?: "",
         dvr_entry_get_retention(de));
index a6ae9661eb1b820a2a34eaec4f91462e3058f370..6e653cdd6bc2c90153531b6d820b2ba207fc53b4 100644 (file)
@@ -109,6 +109,7 @@ dvr_timerec_check(dvr_timerec_entry_t *dte)
   struct tm tm_start, tm_stop;
   const char *title;
   char buf[200];
+  char ubuf[UUID_HEX_SIZE];
 
   if(dte->dte_enabled == 0 || dte->dte_weekdays == 0)
     goto fail;
@@ -153,7 +154,7 @@ dvr_timerec_check(dvr_timerec_entry_t *dte)
   snprintf(buf, sizeof(buf), _("Time recording%s%s"),
            dte->dte_comment ? ": " : "",
            dte->dte_comment ?: "");
-  de = dvr_entry_create_(idnode_uuid_as_str(&dte->dte_config->dvr_id),
+  de = dvr_entry_create_(idnode_uuid_as_str(&dte->dte_config->dvr_id, ubuf),
                          NULL, dte->dte_channel,
                          start, stop, 0, 0, title, NULL,
                          NULL, NULL, NULL, dte->dte_owner, dte->dte_creator,
@@ -227,7 +228,7 @@ dvr_timerec_create_htsp(const char *dvr_config_name, const char *title,
   htsmsg_add_u32(conf, "stop",        stop);
 
   if (ch)
-    htsmsg_add_str(conf, "channel", idnode_uuid_as_str(&ch->ch_id));
+    htsmsg_add_str(conf, "channel", idnode_uuid_as_sstr(&ch->ch_id));
 
   int i;
   for (i = 0; i < 7; i++)
@@ -257,7 +258,7 @@ timerec_entry_destroy(dvr_timerec_entry_t *dte, int delconf)
   dvr_timerec_purge_spawn(dte, delconf);
 
   if (delconf)
-    hts_settings_remove("dvr/timerec/%s", idnode_uuid_as_str(&dte->dte_id));
+    hts_settings_remove("dvr/timerec/%s", idnode_uuid_as_sstr(&dte->dte_id));
 
   htsp_timerec_entry_delete(dte);
 
@@ -291,7 +292,7 @@ dvr_timerec_save(dvr_timerec_entry_t *dte)
   lock_assert(&global_lock);
 
   idnode_save(&dte->dte_id, m);
-  hts_settings_save(m, "dvr/timerec/%s", idnode_uuid_as_str(&dte->dte_id));
+  hts_settings_save(m, "dvr/timerec/%s", idnode_uuid_as_sstr(&dte->dte_id));
   htsmsg_destroy(m);
 }
 
@@ -368,7 +369,7 @@ 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_str(&dte->dte_channel->ch_id);
+    ret = idnode_uuid_as_sstr(&dte->dte_channel->ch_id);
   else
     ret = "";
   return &ret;
@@ -479,7 +480,7 @@ 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_str(&dte->dte_config->dvr_id);
+    buf = idnode_uuid_as_sstr(&dte->dte_config->dvr_id);
   else
     buf = "";
   return &buf;
index faf4ff9cca4f418e0b49bf9b58f69c64ac04fb12..e25116270d60972ebe58ce890791774d2f655275 100644 (file)
--- a/src/epg.c
+++ b/src/epg.c
@@ -1783,7 +1783,7 @@ epg_episode_t *epg_broadcast_get_episode
   if (ebc->episode) return ebc->episode;
   if (!create) return NULL;
   snprintf(uri, sizeof(uri)-1, "tvh://channel-%s/bcast-%u/episode",
-           idnode_uuid_as_str(&ebc->channel->ch_id), ebc->id);
+           idnode_uuid_as_sstr(&ebc->channel->ch_id), ebc->id);
   if ((ee = epg_episode_find_by_uri(uri, 1, save)))
     *save |= epg_broadcast_set_episode(ebc, ee, ebc->grabber);
   return ee;
@@ -1823,7 +1823,7 @@ htsmsg_t *epg_broadcast_serialize ( epg_broadcast_t *broadcast )
   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_uuid(broadcast->channel));
+    htsmsg_add_str(m, "channel", channel_get_suuid(broadcast->channel));
   if (broadcast->dvb_eid)
     htsmsg_add_u32(m, "dvb_eid", broadcast->dvb_eid);
   if (broadcast->is_widescreen)
index c522a09f0b003c53557e93f49c35ed8114d3b15f..37fa361ea251a20eabe9e986674befc45622a5a6 100644 (file)
@@ -161,7 +161,7 @@ void epggrab_module_ch_save ( void *_m, epggrab_channel_t *ch )
     htsmsg_add_str(m, "icon", ch->icon);
   LIST_FOREACH(ecl, &ch->channels, ecl_epg_link) {
     if (!a) a = htsmsg_create_list();
-    htsmsg_add_str(a, NULL, channel_get_uuid(ecl->ecl_channel));
+    htsmsg_add_str(a, NULL, channel_get_suuid(ecl->ecl_channel));
   }
   if (a) htsmsg_add_msg(m, "channels", a);
   if (ch->major)
index 876e2b7ed69423365f6909398137286eca56ffe2..f17531bd29c6e89d2848ec580f7a700036ce6d30 100644 (file)
@@ -586,6 +586,7 @@ _eit_callback
   epggrab_ota_mux_t    *ota = NULL;
   mpegts_psi_table_state_t *st;
   th_subscription_t    *ths;
+  char ubuf[UUID_HEX_SIZE];
 
   if (!epggrab_ota_running)
     return -1;
@@ -667,7 +668,7 @@ _eit_callback
 
   /* Register this */
   if (ota)
-    epggrab_ota_service_add(map, ota, idnode_uuid_as_str(&svc->s_id), 1);
+    epggrab_ota_service_add(map, ota, idnode_uuid_as_str(&svc->s_id, ubuf), 1);
 
   /* No point processing */
   if (!LIST_FIRST(&svc->s_channels))
index ece8433d01b62b16d9d77a134ea720b0bdca5383..9ba4b5c88e4318a71d28271f2591c5190ccc00ce 100644 (file)
@@ -363,7 +363,7 @@ opentv_parse_event_section_one
     if (ev.serieslink) {
       char suri[257];
       snprintf(suri, 256, "opentv://channel-%s/series-%d",
-               channel_get_uuid(ch), ev.serieslink);
+               channel_get_suuid(ch), ev.serieslink);
       if ((es = epg_serieslink_find_by_uri(suri, 1, &save)))
         save |= epg_broadcast_set_serieslink(ebc, es, src);
     }
index 98ca8c4fc66ff48b2f3acb78670243c863cbea0e..33252c632de1ed1d7a5a1d51b0a57ef321dc0bf5 100644 (file)
@@ -118,7 +118,7 @@ epggrab_ota_queue_one( epggrab_ota_mux_t *om )
 void
 epggrab_ota_queue_mux( mpegts_mux_t *mm )
 {
-  const char *id = idnode_uuid_as_str(&mm->mm_id);
+  const char *id;
   epggrab_ota_mux_t *om;
   int epg_flag;
 
@@ -127,6 +127,7 @@ epggrab_ota_queue_mux( mpegts_mux_t *mm )
 
   lock_assert(&global_lock);
 
+  id = idnode_uuid_as_sstr(&mm->mm_id);
   epg_flag = mm->mm_is_epg(mm);
   if (epg_flag < 0 || epg_flag == MM_EPG_DISABLE)
     return;
@@ -277,7 +278,7 @@ epggrab_mux_start ( mpegts_mux_t *mm, void *p )
 {
   epggrab_module_t  *m;
   epggrab_ota_mux_t *ota;
-  const char *uuid = idnode_uuid_as_str(&mm->mm_id);
+  const char *uuid = idnode_uuid_as_sstr(&mm->mm_id);
 
   /* Already started */
   TAILQ_FOREACH(ota, &epggrab_ota_active, om_q_link)
@@ -299,7 +300,7 @@ static void
 epggrab_mux_stop ( mpegts_mux_t *mm, void *p, int reason )
 {
   epggrab_ota_mux_t *ota;
-  const char *uuid = idnode_uuid_as_str(&mm->mm_id);
+  const char *uuid = idnode_uuid_as_sstr(&mm->mm_id);
   int done = EPGGRAB_OTA_DONE_STOLEN;
 
   if (reason == SM_CODE_NO_INPUT)
@@ -328,7 +329,8 @@ epggrab_ota_register
 
   if (ota == NULL) {
     /* Find mux entry */
-    const char *uuid = idnode_uuid_as_str(&mm->mm_id);
+    char ubuf[UUID_HEX_SIZE];
+    const char *uuid = idnode_uuid_as_str(&mm->mm_id, ubuf);
     SKEL_ALLOC(epggrab_ota_mux_skel);
     epggrab_ota_mux_skel->om_mux_uuid = (char*)uuid;
 
index 21143041038de3ff3cddc14bc3925783d548dd1c..8b12ed89527c43f4d952b1c238452a1c5352b17b 100644 (file)
@@ -193,7 +193,7 @@ static void
 esfilter_delete(esfilter_t *esf, int delconf)
 {
   if (delconf)
-    hts_settings_remove("esfilter/%s", idnode_uuid_as_str(&esf->esf_id));
+    hts_settings_remove("esfilter/%s", idnode_uuid_as_sstr(&esf->esf_id));
   TAILQ_REMOVE(&esfilters[esf->esf_class], esf, esf_link);
   idnode_unlink(&esf->esf_id);
   free(esf->esf_comment);
@@ -209,7 +209,7 @@ esfilter_class_save(idnode_t *self)
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(self, c);
-  hts_settings_save(c, "esfilter/%s", idnode_uuid_as_str(self));
+  hts_settings_save(c, "esfilter/%s", idnode_uuid_as_sstr(self));
   htsmsg_destroy(c);
 }
 
@@ -217,7 +217,7 @@ static const char *
 esfilter_class_get_title(idnode_t *self, const char *lang)
 {
   esfilter_t *esf = (esfilter_t *)self;
-  return idnode_uuid_as_str(&esf->esf_id);
+  return idnode_uuid_as_sstr(&esf->esf_id);
 }
 
 static void
index 0766adeb2e02f5126d837e7df21d921a22c46e0d..f4d9c052538b28e15307c58139ac1e042e00b1ee 100644 (file)
@@ -713,10 +713,10 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method, const char *lang)
     htsmsg_add_u32(out, "eventId",  de->de_bcast->id);
 
   if (de->de_autorec)
-    htsmsg_add_str(out, "autorecId", idnode_uuid_as_str(&de->de_autorec->dae_id));
+    htsmsg_add_str(out, "autorecId", idnode_uuid_as_sstr(&de->de_autorec->dae_id));
 
   if (de->de_timerec)
-    htsmsg_add_str(out, "timerecId", idnode_uuid_as_str(&de->de_timerec->dte_id));
+    htsmsg_add_str(out, "timerecId", idnode_uuid_as_sstr(&de->de_timerec->dte_id));
 
   htsmsg_add_s64(out, "start",       de->de_start);
   htsmsg_add_s64(out, "stop",        de->de_stop);
@@ -816,7 +816,7 @@ htsp_build_autorecentry(dvr_autorec_entry_t *dae, const char *method)
   htsmsg_t *out = htsmsg_create_map();
   int tad;
 
-  htsmsg_add_str(out, "id",          idnode_uuid_as_str(&dae->dae_id));
+  htsmsg_add_str(out, "id",          idnode_uuid_as_sstr(&dae->dae_id));
   htsmsg_add_u32(out, "enabled",     dae->dae_enabled);
   htsmsg_add_u32(out, "maxDuration", dae->dae_maxduration);
   htsmsg_add_u32(out, "minDuration", dae->dae_minduration);
@@ -868,7 +868,7 @@ htsp_build_timerecentry(dvr_timerec_entry_t *dte, const char *method)
 {
   htsmsg_t *out = htsmsg_create_map();
 
-  htsmsg_add_str(out, "id",          idnode_uuid_as_str(&dte->dte_id));
+  htsmsg_add_str(out, "id",          idnode_uuid_as_sstr(&dte->dte_id));
   htsmsg_add_u32(out, "enabled",     dte->dte_enabled);
   htsmsg_add_u32(out, "daysOfWeek",  dte->dte_weekdays);
   htsmsg_add_u32(out, "retention",   dvr_timerec_get_retention(dte));
@@ -1327,13 +1327,13 @@ htsp_method_epgQuery(htsp_connection_t *htsp, htsmsg_t *in)
     if (!(ch = channel_find_by_id(u32)))
       return htsp_error("Channel does not exist");
     else
-      eq.channel = strdup(idnode_uuid_as_str(&ch->ch_id));
+      eq.channel = strdup(idnode_uuid_as_sstr(&ch->ch_id));
   }
   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_str(&ct->ct_id));
+      eq.channel_tag = strdup(idnode_uuid_as_sstr(&ct->ct_id));
   }
   if (!htsmsg_get_u32(in, "contentType", &u32)) {
     if(htsp->htsp_version < 6) u32 <<= 4;
@@ -1417,6 +1417,7 @@ htsp_dvr_config_name( htsp_connection_t *htsp, const char *config_name )
   access_t *perm = htsp->htsp_granted_access;
   htsmsg_field_t *f;
   const char *uuid;
+  static char ubuf[UUID_HEX_SIZE];
 
   lock_assert(&global_lock);
 
@@ -1439,7 +1440,7 @@ htsp_dvr_config_name( htsp_connection_t *htsp, const char *config_name )
   if (!cfg && perm->aa_username)
     tvhlog(LOG_INFO, "htsp", "User '%s' has no valid dvr config in ACL, using default...", perm->aa_username);
 
-  return cfg ? idnode_uuid_as_str(&cfg->dvr_id) : NULL;
+  return cfg ? idnode_uuid_as_str(&cfg->dvr_id, ubuf) : NULL;
 }
 
 /**
@@ -1457,7 +1458,7 @@ htsp_method_getDvrConfigs(htsp_connection_t *htsp, htsmsg_t *in)
 
   LIST_FOREACH(cfg, &dvrconfigs, config_link)
     if (cfg->dvr_enabled) {
-      uuid = idnode_uuid_as_str(&cfg->dvr_id);
+      uuid = idnode_uuid_as_sstr(&cfg->dvr_id);
       if (htsp->htsp_granted_access->aa_dvrcfgs) {
         HTSMSG_FOREACH(f, htsp->htsp_granted_access->aa_dvrcfgs) {
           if (!(s = htsmsg_field_get_str(f)))
@@ -1469,7 +1470,7 @@ htsp_method_getDvrConfigs(htsp_connection_t *htsp, htsmsg_t *in)
           continue;
       }
       c = htsmsg_create_map();
-      htsmsg_add_str(c, "uuid", idnode_uuid_as_str(&cfg->dvr_id));
+      htsmsg_add_str(c, "uuid", uuid);
       htsmsg_add_str(c, "name", cfg->dvr_config_name ?: "");
       htsmsg_add_str(c, "comment", cfg->dvr_comment ?: "");
       htsmsg_add_msg(l, NULL, c);
@@ -1773,7 +1774,7 @@ htsp_method_addAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in)
   out = htsmsg_create_map();
 
   if (dae) {
-    htsmsg_add_str(out, "id", idnode_uuid_as_str(&dae->dae_id));
+    htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dae->dae_id));
     htsmsg_add_u32(out, "success", 1);
   }
   else {
@@ -1869,7 +1870,7 @@ htsp_method_addTimerecEntry(htsp_connection_t *htsp, htsmsg_t *in)
   out = htsmsg_create_map();
 
   if (dte) {
-    htsmsg_add_str(out, "id", idnode_uuid_as_str(&dte->dte_id));
+    htsmsg_add_str(out, "id", idnode_uuid_as_sstr(&dte->dte_id));
     htsmsg_add_u32(out, "success", 1);
   }
   else {
@@ -3243,7 +3244,7 @@ htsp_autorec_entry_delete(dvr_autorec_entry_t *dae)
     return;
 
   htsmsg_t *m = htsmsg_create_map();
-  htsmsg_add_str(m, "id", idnode_uuid_as_str(&dae->dae_id));
+  htsmsg_add_str(m, "id", idnode_uuid_as_sstr(&dae->dae_id));
   htsmsg_add_str(m, "method", "autorecEntryDelete");
   htsp_async_send(m, HTSP_ASYNC_ON, HTSP_ASYNC_AUX_AUTOREC, dae);
 }
@@ -3296,7 +3297,7 @@ htsp_timerec_entry_delete(dvr_timerec_entry_t *dte)
     return;
 
   htsmsg_t *m = htsmsg_create_map();
-  htsmsg_add_str(m, "id", idnode_uuid_as_str(&dte->dte_id));
+  htsmsg_add_str(m, "id", idnode_uuid_as_sstr(&dte->dte_id));
   htsmsg_add_str(m, "method", "timerecEntryDelete");
   htsp_async_send(m, HTSP_ASYNC_ON, HTSP_ASYNC_AUX_TIMEREC, dte);
 }
index a4c529a5c714a9bfa2edb9fe9bd6c30c25b02c54..b08348e830c10464522db42c42a96ba0f4c8407b 100644 (file)
@@ -47,6 +47,8 @@ static RB_HEAD(,idclass_link) idrootclasses;
 
 SKEL_DECLARE(idclasses_skel, idclass_link_t);
 
+char idnode_uuid_static[UUID_HEX_SIZE];
+
 /* **************************************************************************
  * Utilities
  * *************************************************************************/
@@ -154,7 +156,7 @@ idnode_insert(idnode_t *in, const char *uuid, const idclass_t *class, int flags)
             uuid, (flags & IDNODE_SHORT_UUID) ? " (short)" : "");
     abort();
   }
-  tvhtrace("idnode", "insert node %s", idnode_uuid_as_str(in));
+  tvhtrace("idnode", "insert node %s", idnode_uuid_as_sstr(in));
 
   /* Register the class */
   idclass_register(class); // Note: we never actually unregister
@@ -178,7 +180,7 @@ idnode_unlink(idnode_t *in)
   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_str(in));
+  tvhtrace("idnode", "unlink node %s", idnode_uuid_as_sstr(in));
   idnode_notify(in, "delete");
 }
 
@@ -237,14 +239,10 @@ idnode_get_short_uuid (const idnode_t *in)
  *
  */
 const char *
-idnode_uuid_as_str(const idnode_t *in)
+idnode_uuid_as_str(const idnode_t *in, char *uuid)
 {
-  static tvh_uuid_t __thread ret[16];
-  static uint8_t p = 0;
-  bin2hex(ret[p].hex, sizeof(ret[p].hex), in->in_uuid, sizeof(in->in_uuid));
-  const char *s = ret[p].hex;
-  p = (p + 1) % 16;
-  return s;
+  bin2hex(uuid, UUID_HEX_SIZE, in->in_uuid, sizeof(in->in_uuid));
+  return uuid;
 }
 
 /**
@@ -258,7 +256,7 @@ idnode_get_title(idnode_t *in, const char *lang)
     if(ic->ic_get_title != NULL)
       return ic->ic_get_title(in, lang);
   }
-  return idnode_uuid_as_str(in);
+  return idnode_uuid_as_sstr(in);
 }
 
 
@@ -639,7 +637,7 @@ idnode_find_all ( const idclass_t *idc, const idnodes_rb_t *domain )
       ic = in->in_class;
       while (ic) {
         if (ic == idc) {
-          tvhtrace("idnode", "  add node %s", idnode_uuid_as_str(in));
+          tvhtrace("idnode", "  add node %s", idnode_uuid_as_sstr(in));
           idnode_set_add(is, in, NULL, NULL);
           break;
         }
@@ -651,7 +649,7 @@ idnode_find_all ( const idclass_t *idc, const idnodes_rb_t *domain )
       ic = in->in_class;
       while (ic) {
         if (ic == idc) {
-          tvhtrace("idnode", "  add node %s", idnode_uuid_as_str(in));
+          tvhtrace("idnode", "  add node %s", idnode_uuid_as_sstr(in));
           idnode_set_add(is, in, NULL, NULL);
           break;
         }
@@ -1043,7 +1041,7 @@ idnode_set_as_htsmsg
   htsmsg_t *l = htsmsg_create_list();
   int i;
   for (i = 0; i < is->is_count; i++)
-    htsmsg_add_str(l, NULL, idnode_uuid_as_str(is->is_array[i]));
+    htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(is->is_array[i]));
   return l;
 }
 
@@ -1316,7 +1314,7 @@ idnode_serialize0(idnode_t *self, htsmsg_t *list, int optmask, const char *lang)
   const char *uuid, *s;
 
   htsmsg_t *m = htsmsg_create_map();
-  uuid = idnode_uuid_as_str(self);
+  uuid = idnode_uuid_as_sstr(self);
   htsmsg_add_str(m, "uuid", uuid);
   htsmsg_add_str(m, "id",   uuid);
   htsmsg_add_str(m, "text", idnode_get_title(self, lang) ?: "");
@@ -1445,7 +1443,7 @@ idnode_list_get1
   htsmsg_t *l = htsmsg_create_list();
 
   LIST_FOREACH(ilm, in1_list, ilm_in1_link)
-    htsmsg_add_str(l, NULL, idnode_uuid_as_str(ilm->ilm_in2));
+    htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(ilm->ilm_in2));
   return l;
 }
 
@@ -1457,7 +1455,7 @@ idnode_list_get2
   htsmsg_t *l = htsmsg_create_list();
 
   LIST_FOREACH(ilm, in2_list, ilm_in2_link)
-    htsmsg_add_str(l, NULL, idnode_uuid_as_str(ilm->ilm_in1));
+    htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(ilm->ilm_in1));
   return l;
 }
 
@@ -1583,7 +1581,7 @@ void
 idnode_notify ( idnode_t *in, const char *action )
 {
   const idclass_t *ic = in->in_class;
-  const char *uuid = idnode_uuid_as_str(in);
+  const char *uuid = idnode_uuid_as_sstr(in);
 
   if (!tvheadend_running)
     return;
@@ -1605,7 +1603,7 @@ void
 idnode_notify_title_changed (void *in, const char *lang)
 {
   htsmsg_t *m = htsmsg_create_map();
-  htsmsg_add_str(m, "uuid", idnode_uuid_as_str(in));
+  htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(in));
   htsmsg_add_str(m, "text", idnode_get_title(in, lang));
   notify_by_msg("title", m);
   idnode_notify_changed(in);
index 4914d6b20d02fde1b7e60031736dfdc0bc7b0234..de0ece45d365941790eb3f8610cfa54827e31c74 100644 (file)
@@ -160,6 +160,8 @@ typedef struct idnode_filter_ele
 
 typedef LIST_HEAD(,idnode_filter_ele) idnode_filter_t;
 
+extern char idnode_uuid_static[UUID_HEX_SIZE];
+
 void idnode_init(void);
 void idnode_done(void);
 
@@ -169,7 +171,9 @@ int  idnode_insert(idnode_t *in, const char *uuid, const idclass_t *idc, int fla
 void idnode_unlink(idnode_t *in);
 
 uint32_t      idnode_get_short_uuid (const idnode_t *in);
-const char   *idnode_uuid_as_str  (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);
index c3e477294fe6019b56ea19d8455ef89e43de58bf..4c3fb88fe1ea3f8a748481227069d822679bb9a4 100644 (file)
@@ -139,7 +139,7 @@ dvb_fs_mux_add ( mpegts_table_t *mt, mpegts_mux_t *mm, mpegts_mux_t *mux )
   char *s;
   int i;
 
-  uuid = idnode_uuid_as_str(&mux->mm_id);
+  uuid = idnode_uuid_as_sstr(&mux->mm_id);
   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) {
index 787eaa904bd2163a0666dfbc16b10d317847b8c8..0225cecd4c71120001086e5f4caac8d99ba74a27 100644 (file)
@@ -433,7 +433,7 @@ iptv_network_class_delete ( idnode_t *in )
 
   /* Remove config */
   hts_settings_remove("input/iptv/networks/%s",
-                      idnode_uuid_as_str(in));
+                      idnode_uuid_as_sstr(in));
 
   /* delete */
   mpegts_network_delete(mn, 1);
@@ -515,7 +515,7 @@ iptv_network_config_save ( mpegts_network_t *mn )
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&mn->mn_id, c);
   hts_settings_save(c, "input/iptv/networks/%s/config",
-                    idnode_uuid_as_str(&mn->mn_id));
+                    idnode_uuid_as_sstr(&mn->mn_id));
   htsmsg_destroy(c);
 }
 
@@ -550,7 +550,7 @@ iptv_network_create0
 
   /* Load muxes */
   if ((c = hts_settings_load_r(1, "input/iptv/networks/%s/muxes",
-                                idnode_uuid_as_str(&in->mn_id)))) {
+                                idnode_uuid_as_sstr(&in->mn_id)))) {
     htsmsg_field_t *f;
     htsmsg_t *e;
     HTSMSG_FOREACH(f, c) {
index f4f6f554928019271923a59199c7386c7a3347ac..d6fdfcd376247fc34a01eb10e15a99472ae2e1fd 100644 (file)
@@ -159,11 +159,12 @@ const idclass_t iptv_mux_class =
 static void
 iptv_mux_config_save ( mpegts_mux_t *mm )
 {
+  char ubuf[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_str(&mm->mm_network->mn_id),
-                    idnode_uuid_as_str(&mm->mm_id));
+                    idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                    idnode_uuid_as_str(&mm->mm_id, ubuf));
   htsmsg_destroy(c);
 }
 
@@ -172,11 +173,12 @@ iptv_mux_delete ( mpegts_mux_t *mm, int delconf )
 {
   char *url, *url_sane, *muxname;
   iptv_mux_t *im = (iptv_mux_t*)mm;
+  char ubuf[UUID_HEX_SIZE];
 
   if (delconf)
     hts_settings_remove("input/iptv/networks/%s/muxes/%s/config",
-                        idnode_uuid_as_str(&mm->mm_network->mn_id),
-                        idnode_uuid_as_str(&mm->mm_id));
+                        idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                        idnode_uuid_as_str(&mm->mm_id, ubuf));
 
   url = im->mm_iptv_url; // Workaround for silly printing error
   url_sane = im->mm_iptv_url_sane;
@@ -212,6 +214,7 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
 {
   htsmsg_t *c, *e;
   htsmsg_field_t *f;
+  char ubuf[UUID_HEX_SIZE];
 
   /* Create Mux */
   iptv_mux_t *im =
@@ -230,8 +233,8 @@ iptv_mux_create0 ( iptv_network_t *in, const char *uuid, htsmsg_t *conf )
 
   /* Services */
   c = hts_settings_load_r(1, "input/iptv/networks/%s/muxes/%s/services",
-                          idnode_uuid_as_str(&in->mn_id),
-                          idnode_uuid_as_str(&im->mm_id));
+                          idnode_uuid_as_sstr(&in->mn_id),
+                          idnode_uuid_as_str(&im->mm_id, ubuf));
   if (c) {
     HTSMSG_FOREACH(f, c) {
       if (!(e = htsmsg_field_get_map(f))) continue;
index cfade5cecd6e628d012ed05a6cd41a4c6745f166..ba1a469d42db5c1b6a03df1246f9ea22da830f5c 100644 (file)
@@ -27,12 +27,14 @@ iptv_service_config_save ( service_t *s )
 {
   mpegts_mux_t     *mm = ((mpegts_service_t *)s)->s_dvb_mux;
   htsmsg_t         *c  = htsmsg_create_map();
+  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_str(&mm->mm_network->mn_id),
-                    idnode_uuid_as_str(&mm->mm_id),
-                    idnode_uuid_as_str(&s->s_id));
+                    idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                    idnode_uuid_as_str(&mm->mm_id, ubuf1),
+                    idnode_uuid_as_str(&s->s_id, ubuf2));
   htsmsg_destroy(c);
 }
 
@@ -40,13 +42,15 @@ static void
 iptv_service_delete ( service_t *s, int delconf )
 {
   mpegts_mux_t     *mm = ((mpegts_service_t *)s)->s_dvb_mux;
+  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_str(&mm->mm_network->mn_id),
-                        idnode_uuid_as_str(&mm->mm_id),
-                        idnode_uuid_as_str(&s->s_id));
+                        idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                        idnode_uuid_as_str(&mm->mm_id, ubuf1),
+                        idnode_uuid_as_str(&s->s_id, ubuf2));
 
   /* Note - do no pass the delconf flag - another file location */
   mpegts_service_delete(s, 0);
index 768944a25004c215c7a4bdd16e0a706e6fa3a291..5a1108b2d39493a29cbd9815c43aa180f127576d 100644 (file)
@@ -128,7 +128,7 @@ linuxdvb_adapter_save ( linuxdvb_adapter_t *la )
 
   /* Save */
   hts_settings_save(m, "input/linuxdvb/adapters/%s",
-                    idnode_uuid_as_str(&la->th_id));
+                    idnode_uuid_as_sstr(&la->th_id));
   htsmsg_destroy(m);
 }
 
index a668f6d8556c6a0bfed304a955d1295a01d8ecb5..5d364871a2999fec953e876c446af6a9c9cfe414 100644 (file)
@@ -904,7 +904,7 @@ void linuxdvb_ca_save( linuxdvb_ca_t *lca, htsmsg_t *msg )
   char id[8];
   htsmsg_t *m = htsmsg_create_map();
 
-  htsmsg_add_str(m, "uuid", idnode_uuid_as_str(&lca->lca_id));
+  htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lca->lca_id));
   idnode_save(&lca->lca_id, m);
 
   /* Add to list */
index 2b7417925c01d5b76ec18f3f804834ca1ed68383..03b64d61cd362c8b3a41c0ce1ade266eb3000368 100644 (file)
@@ -1624,11 +1624,11 @@ linuxdvb_frontend_save ( linuxdvb_frontend_t *lfe, htsmsg_t *fe )
   /* 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_str(&lfe->ti_id));
+  htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lfe->ti_id));
   if (lfe->lfe_satconf) {
     htsmsg_t *s = htsmsg_create_map();
     linuxdvb_satconf_save(lfe->lfe_satconf, s);
-    htsmsg_add_str(s, "uuid", idnode_uuid_as_str(&lfe->lfe_satconf->ls_id));
+    htsmsg_add_str(s, "uuid", idnode_uuid_as_sstr(&lfe->lfe_satconf->ls_id));
     htsmsg_add_msg(m, "satconf", s);
   }
 
index d478202cf60fd87119245ccdde5e1778699b6458..4e8892b7b855d6a3dcd20907b6a1cb518597607e 100644 (file)
@@ -967,7 +967,7 @@ linuxdvb_satconf_save ( linuxdvb_satconf_t *ls, htsmsg_t *m )
   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_str(&lse->lse_id));
+    htsmsg_add_str(e, "uuid", idnode_uuid_as_sstr(&lse->lse_id));
     if (lse->lse_lnb) {
       c = htsmsg_create_map();
       idnode_save(&lse->lse_lnb->ld_id, c);
@@ -1042,7 +1042,7 @@ linuxdvb_satconf_ele_class_network_set( void *o, const void *p )
     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_str(lse->lse_networks->is_array[i]));
+                       idnode_uuid_as_sstr(lse->lse_networks->is_array[i]));
     }
     mpegts_input_class_network_set(ls->lse_parent->ls_frontend, l);
     htsmsg_destroy(l);
@@ -1326,9 +1326,8 @@ void
 linuxdvb_satconf_delete ( linuxdvb_satconf_t *ls, int delconf )
 {
   linuxdvb_satconf_ele_t *lse, *nxt;
-  const char *uuid = idnode_uuid_as_str(&ls->ls_id);
   if (delconf)
-    hts_settings_remove("input/linuxdvb/satconfs/%s", uuid);
+    hts_settings_remove("input/linuxdvb/satconfs/%s", idnode_uuid_as_sstr(&ls->ls_id));
   gtimer_disarm(&ls->ls_diseqc_timer);
   for (lse = TAILQ_FIRST(&ls->ls_elements); lse != NULL; lse = nxt) {
     nxt = TAILQ_NEXT(lse, lse_link);
index be9bc3ee95171d8b56581ddd8701658ffb7d8ae1..fd62ce439bad240e9148274fde9e7246ff717292 100644 (file)
@@ -54,7 +54,7 @@ mpegts_input_dbus_notify(mpegts_input_t *mi, int64_t 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_str(&mi->ti_id));
+  snprintf(buf, sizeof(buf), "/input/mpegts/%s", idnode_uuid_as_sstr(&mi->ti_id));
   dbus_emit_signal(buf, "status", msg);
 #endif
 }
@@ -80,7 +80,7 @@ mpegts_input_class_network_get ( void *obj )
   htsmsg_t       *l  = htsmsg_create_list();
 
   LIST_FOREACH(mnl, &mi->mi_networks, mnl_mi_link)
-    htsmsg_add_str(l, NULL, idnode_uuid_as_str(&mnl->mnl_network->mn_id));
+    htsmsg_add_str(l, NULL, idnode_uuid_as_sstr(&mnl->mnl_network->mn_id));
 
   return l;
 }
@@ -97,7 +97,7 @@ mpegts_input_class_network_enum ( void *obj, const char *lang )
   htsmsg_t *p, *m;
 
   p = htsmsg_create_map();
-  htsmsg_add_str (p, "uuid",    idnode_uuid_as_str((idnode_t*)obj));
+  htsmsg_add_str (p, "uuid",    idnode_uuid_as_sstr((idnode_t*)obj));
   htsmsg_add_bool(p, "enum",    1);
 
   m = htsmsg_create_map();
@@ -160,7 +160,7 @@ mpegts_input_class_linked_set ( void *self, const void *val )
       mi2 = mpegts_input_find((char *)val);
       if (mi2) {
         free(mi2->mi_linked);
-        mi2->mi_linked = strdup(idnode_uuid_as_str(&mi->ti_id));
+        mi2->mi_linked = strdup(idnode_uuid_as_sstr(&mi->ti_id));
       }
     }
     if (mi2)
@@ -179,7 +179,7 @@ mpegts_input_class_linked_get ( void *self )
   if (mi->mi_linked) {
     mi = mpegts_input_find(mi->mi_linked);
     if (mi)
-      ptr = idnode_uuid_as_str(&mi->ti_id);
+      ptr = idnode_uuid_as_sstr(&mi->ti_id);
   }
   return &ptr;
 }
@@ -198,13 +198,14 @@ mpegts_input_class_linked_enum( void * self, const char *lang )
 {
   mpegts_input_t *mi = self, *mi2;
   tvh_input_t *ti;
+  char ubuf[UUID_HEX_SIZE];
   htsmsg_t *m = htsmsg_create_list();
   mpegts_input_add_keyval(m, "", tvh_gettext_lang(lang, N_("Not Linked")));
   TVH_INPUT_FOREACH(ti)
     if (idnode_is_instance(&ti->ti_id, &mpegts_input_class)) {
       mi2 = (mpegts_input_t *)ti;
       if (mi2 != mi)
-        mpegts_input_add_keyval(m, idnode_uuid_as_str(&ti->ti_id),
+        mpegts_input_add_keyval(m, idnode_uuid_as_str(&ti->ti_id, ubuf),
                                    idnode_get_title(&mi2->ti_id, lang));
   }
   return m;
@@ -1406,7 +1407,7 @@ mpegts_input_stream_status
         w = MAX(w, ths->ths_weight);
       }
 
-  st->uuid        = strdup(idnode_uuid_as_str(&mmi->tii_id));
+  st->uuid        = strdup(idnode_uuid_as_sstr(&mmi->tii_id));
   mi->mi_display_name(mi, buf, sizeof(buf));
   st->input_name  = strdup(buf);
   mpegts_mux_nice_name(mm, buf, sizeof(buf));
index b446b844d3d4e3e1659914c538c16148a3eee256..e77f0cfb5853b084b94acd11d828e16b2c3664e5 100644 (file)
@@ -359,7 +359,7 @@ 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_str(&mm->mm_network->mn_id) ?: "");
+    strcpy(buf, idnode_uuid_as_sstr(&mm->mm_network->mn_id) ?: "");
   else
     *buf = 0;
   return &s;
index 4a88296a27ffd7343bc37d21ee4807a5ff25b13b..7702b1983a2bbd56d0103156d1b2917e10514efc 100644 (file)
@@ -662,11 +662,12 @@ const idclass_t dvb_mux_atsc_class =
 static void
 dvb_mux_config_save ( mpegts_mux_t *mm )
 {
+  char ubuf[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_str(&mm->mm_network->mn_id),
-                    idnode_uuid_as_str(&mm->mm_id));
+                    idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                    idnode_uuid_as_str(&mm->mm_id, ubuf));
   htsmsg_destroy(c);
 }
 
@@ -713,11 +714,13 @@ dvb_mux_create_instances ( mpegts_mux_t *mm )
 static void
 dvb_mux_delete ( mpegts_mux_t *mm, int delconf )
 {
+  char ubuf[UUID_HEX_SIZE];
+
   /* Remove config */
   if (delconf)
     hts_settings_remove("input/dvb/networks/%s/muxes/%s",
-                      idnode_uuid_as_str(&mm->mm_network->mn_id),
-                      idnode_uuid_as_str(&mm->mm_id));
+                      idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                      idnode_uuid_as_str(&mm->mm_id, ubuf));
 
   /* Delete the mux */
   mpegts_mux_delete(mm, delconf);
@@ -739,6 +742,7 @@ dvb_mux_create0
   htsmsg_t *c, *e;
   htsmsg_field_t *f;
   dvb_fe_delivery_system_t delsys;
+  char ubuf[UUID_HEX_SIZE];
 
   /* Class */
   if (ln->ln_type == DVB_TYPE_S) {
@@ -788,8 +792,8 @@ dvb_mux_create0
 
   /* Services */
   c = hts_settings_load_r(1, "input/dvb/networks/%s/muxes/%s/services",
-                         idnode_uuid_as_str(&ln->mn_id),
-                         idnode_uuid_as_str(&mm->mm_id));
+                         idnode_uuid_as_sstr(&ln->mn_id),
+                         idnode_uuid_as_str(&mm->mm_id, ubuf));
   if (c) {
     HTSMSG_FOREACH(f, c) {
       if (!(e = htsmsg_get_map_by_field(f))) continue;
index 2562df4c94b7cd315ae9de4b8d7ea15ea2c98088..93cf2ab9ed09cbb36823d8a9c0e66a461e36fb41 100644 (file)
@@ -299,7 +299,7 @@ mpegts_mux_sched_save ( mpegts_mux_sched_t *mms )
 {
   htsmsg_t *c = htsmsg_create_map();
   idnode_save(&mms->mms_id, c);
-  hts_settings_save(c, "muxsched/%s", idnode_uuid_as_str(&mms->mms_id));
+  hts_settings_save(c, "muxsched/%s", idnode_uuid_as_sstr(&mms->mms_id));
   htsmsg_destroy(c);
 }
 
@@ -308,7 +308,7 @@ mpegts_mux_sched_delete ( mpegts_mux_sched_t *mms, int delconf )
 {
   LIST_REMOVE(mms, mms_link);
   if (delconf)
-    hts_settings_remove("muxsched/%s", idnode_uuid_as_str(&mms->mms_id));
+    hts_settings_remove("muxsched/%s", idnode_uuid_as_sstr(&mms->mms_id));
   if (mms->mms_sub)
     subscription_unsubscribe(mms->mms_sub, 0);
   gtimer_disarm(&mms->mms_timer);
index 3feeb9ee496fce9707b9d24c3c9376d4ee08fd88..47007c3187653462a35e3e05fb07d67b707217fc 100644 (file)
@@ -46,7 +46,7 @@ dvb_network_class_delete ( idnode_t *in )
 
   /* remove config */
   hts_settings_remove("input/dvb/networks/%s", 
-                      idnode_uuid_as_str(in));
+                      idnode_uuid_as_sstr(in));
 
   /* Parent delete */
   mpegts_network_delete(mn, 1);
@@ -394,7 +394,7 @@ dvb_network_config_save ( mpegts_network_t *mn )
   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_str(&mn->mn_id));
+                    idnode_uuid_as_sstr(&mn->mn_id));
   htsmsg_destroy(c);
 }
 
index 7e9c659a146e81684932d6f3123b812d2de14796..d2d255c1178f974bc0ff7f352883df2115011254 100644 (file)
@@ -51,7 +51,7 @@ 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_str(&ms->s_dvb_mux->mm_id) ?: "");
+    strcpy(buf, idnode_uuid_as_sstr(&ms->s_dvb_mux->mm_id) ?: "");
   else
     *buf = 0;
   return &s;
@@ -243,11 +243,13 @@ mpegts_service_config_save ( service_t *t )
 {
   htsmsg_t *c = htsmsg_create_map();
   mpegts_service_t *s = (mpegts_service_t*)t;
+  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_str(&s->s_dvb_mux->mm_network->mn_id),
-                    idnode_uuid_as_str(&s->s_dvb_mux->mm_id),
-                    idnode_uuid_as_str(&s->s_id));
+                    idnode_uuid_as_sstr(&s->s_dvb_mux->mm_network->mn_id),
+                    idnode_uuid_as_str(&s->s_dvb_mux->mm_id, ubuf1),
+                    idnode_uuid_as_str(&s->s_id, ubuf2));
   htsmsg_destroy(c);
 }
 
@@ -547,13 +549,15 @@ mpegts_service_delete ( service_t *t, int delconf )
 {
   mpegts_service_t *ms = (mpegts_service_t*)t;
   mpegts_mux_t     *mm = ms->s_dvb_mux;
+  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_str(&mm->mm_network->mn_id),
-                      idnode_uuid_as_str(&mm->mm_id),
-                      idnode_uuid_as_str(&t->s_id));
+                      idnode_uuid_as_sstr(&mm->mm_network->mn_id),
+                      idnode_uuid_as_str(&mm->mm_id, ubuf1),
+                      idnode_uuid_as_str(&t->s_id, ubuf2));
 
   /* Free memory */
   free(ms->s_dvb_svcname);
index 33b45110a886cdd4960c182d6bcb1eb1de56230f..765757c213eeac186e019370ec9922515a212cd7 100644 (file)
@@ -52,7 +52,7 @@ satip_device_dbus_notify( satip_device_t *sd, const char *sig_name )
   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_str(&sd->th_id));
+  snprintf(buf, sizeof(buf), "/input/mpegts/satip/%s", idnode_uuid_as_sstr(&sd->th_id));
   dbus_emit_signal(buf, sig_name, msg);
 #endif
 }
@@ -644,7 +644,7 @@ satip_device_save( satip_device_t *sd )
   htsmsg_add_msg(m, "frontends", l);
 
   hts_settings_save(m, "input/satip/adapters/%s",
-                    idnode_uuid_as_str(&sd->th_id));
+                    idnode_uuid_as_sstr(&sd->th_id));
   htsmsg_destroy(m);
 }
 
index e856d2435d6505a555beb2668316a375becd27ca..99819bbd35333d31c8efe81ed9426b44562f32c9 100644 (file)
@@ -936,7 +936,7 @@ satip_frontend_tuning_error ( satip_frontend_t *lfe, satip_tune_req_t *tr )
   pthread_mutex_lock(&lfe->sf_dvr_lock);
   if (lfe->sf_running && lfe->sf_req == tr &&
       (mmi = tr->sf_mmi) != NULL && (mm = mmi->mmi_mux) != NULL) {
-    strcpy(uuid, idnode_uuid_as_str(&mm->mm_id));
+    idnode_uuid_as_str(&mm->mm_id, uuid);
     pthread_mutex_unlock(&lfe->sf_dvr_lock);
     mpegts_mux_tuning_error(uuid, mmi);
     return;
@@ -1668,7 +1668,7 @@ satip_frontend_save ( satip_frontend_t *lfe, htsmsg_t *fe )
   /* 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_str(&lfe->ti_id));
+  htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&lfe->ti_id));
   if (lfe->ti_id.in_class == &satip_frontend_dvbs_class) {
     satip_satconf_save(lfe, m);
     htsmsg_delete_field(m, "networks");
index f95c4ec150141e2ed7d38f17501b82a5ae54210d..66ebc3af6fd47c7f9148dcded68495a752fb2220 100644 (file)
@@ -121,7 +121,7 @@ satip_satconf_class_network_set( void *o, const void *p )
     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_str(sfc2->sfc_networks->is_array[i]));
+                       idnode_uuid_as_sstr(sfc2->sfc_networks->is_array[i]));
     }
     mpegts_input_class_network_set(lfe, l);
     /* update the slave tuners, too */
index a84b3f4863966b1c069f342bb4465eb8e1229030..b2b7e0c392fa80ba6e4cc875acfa630194fa65fa 100644 (file)
@@ -198,7 +198,7 @@ tvhdhomerun_device_save( tvhdhomerun_device_t *hd )
   htsmsg_add_str(m, "fe_override", hd->hd_override_type);
 
   hts_settings_save(m, "input/tvhdhomerun/adapters/%s",
-                    idnode_uuid_as_str(&hd->th_id));
+                    idnode_uuid_as_sstr(&hd->th_id));
   htsmsg_destroy(m);
 }
 
index 0c88758ee089bfb1e1a8566f14dc7cb0e36f450e..e6e9af976b76d7c38a3f50aa9a089df29f62524a 100644 (file)
@@ -537,7 +537,7 @@ tvhdhomerun_frontend_save ( tvhdhomerun_frontend_t *hfe, htsmsg_t *fe )
   /* 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_str(&hfe->ti_id));
+  htsmsg_add_str(m, "uuid", idnode_uuid_as_sstr(&hfe->ti_id));
 
   /* Add to list */
   snprintf(id, sizeof(id), "%s #%d", dvb_type2str(hfe->hf_type), hfe->hf_tunerNumber);
index bf793c34301e3234976068274c7e90cfbb9c62c4..7f7b8e3e7a34706c0c2398f0c8e33c17264f79ef 100644 (file)
@@ -137,7 +137,7 @@ profile_delete(profile_t *pro, int delconf)
   if (pro->pro_conf_changed)
     pro->pro_conf_changed(pro);
   if (delconf)
-    hts_settings_remove("profile/%s", idnode_uuid_as_str(&pro->pro_id));
+    hts_settings_remove("profile/%s", idnode_uuid_as_sstr(&pro->pro_id));
   TAILQ_REMOVE(&profiles, pro, pro_link);
   idnode_unlink(&pro->pro_id);
   dvr_config_destroy_by_profile(pro, delconf);
@@ -155,7 +155,7 @@ profile_class_save ( idnode_t *in )
   idnode_save(in, c);
   if (pro->pro_shield)
     htsmsg_add_bool(c, "shield", 1);
-  hts_settings_save(c, "profile/%s", idnode_uuid_as_str(in));
+  hts_settings_save(c, "profile/%s", idnode_uuid_as_sstr(in));
   htsmsg_destroy(c);
   if (pro->pro_conf_changed)
     pro->pro_conf_changed(pro);
@@ -452,7 +452,7 @@ profile_find_by_list
   if (!profile_verify(pro, sflags))
     pro = NULL;
   if (uuids) {
-    uuid = pro ? idnode_uuid_as_str(&pro->pro_id) : "";
+    uuid = pro ? idnode_uuid_as_sstr(&pro->pro_id) : "";
     HTSMSG_FOREACH(f, uuids) {
       uuid2 = htsmsg_field_get_str(f) ?: "";
       if (strcmp(uuid, uuid2) == 0 && profile_verify(pro, sflags))
@@ -519,7 +519,7 @@ profile_get_htsp_list(htsmsg_t *array, htsmsg_t *filter)
   TAILQ_FOREACH(pro, &profiles, pro_link) {
     if (!pro->pro_work)
       continue;
-    uuid = idnode_uuid_as_str(&pro->pro_id);
+    uuid = idnode_uuid_as_sstr(&pro->pro_id);
     if (filter) {
       HTSMSG_FOREACH(f, filter) {
         if (!(s = htsmsg_field_get_str(f)))
index 9e987cb0356d7acf586d209b0941f03ad9b2341a..e279689a50dbc85dcd0eb6a3acebeeb705c07b2e 100644 (file)
@@ -439,7 +439,7 @@ filter:
             strncmp(esf->esf_language, st->es_lang, 4))
           continue;
         if (esf->esf_service[0]) {
-          if (strcmp(esf->esf_service, idnode_uuid_as_str(&t->s_id)))
+          if (strcmp(esf->esf_service, idnode_uuid_as_sstr(&t->s_id)))
             continue;
           if (esf->esf_pid && esf->esf_pid != st->es_pid)
             continue;
index 99f026167ee6165640af9b0c2874db0766301808..fe1c48017dfc20365a4c3839c854a09d5575f4fb 100644 (file)
@@ -91,7 +91,7 @@ service_mapper_start ( const service_mapper_conf_t *conf, htsmsg_t *uuids )
     if (uuids) {
       htsmsg_field_t *f;
       const char *str;
-      const char *uuid = idnode_uuid_as_str(&s->s_id);
+      const char *uuid = idnode_uuid_as_sstr(&s->s_id);
       HTSMSG_FOREACH(f, uuids) {
         if (!(str = htsmsg_field_get_str(f))) continue;
         if (!strcmp(str, uuid)) break;
@@ -99,7 +99,7 @@ service_mapper_start ( const service_mapper_conf_t *conf, htsmsg_t *uuids )
       if (!f) continue;
     }
     tvhtrace("service_mapper", "check service %s (%s)",
-             s->s_nicename, idnode_uuid_as_str(&s->s_id));
+             s->s_nicename, idnode_uuid_as_sstr(&s->s_id));
 
     /* Already mapped (or in progress) */
     if (s->s_sm_onqueue) continue;
index 4a71f664fcb85f24359d5d137dcf26e7bfe13562..d9a8c5024f10aa8e555e53fb001b852e5b2fbd51 100644 (file)
@@ -272,7 +272,7 @@ page_simple(http_connection_t *hc,
     rstatus = val2str(de->de_sched_state, recstatustxt);
 
 
-    htsbuf_qprintf(hq, "<a href=\"/pvrinfo/%s\">", idnode_uuid_as_str(&de->de_id));
+    htsbuf_qprintf(hq, "<a href=\"/pvrinfo/%s\">", idnode_uuid_as_sstr(&de->de_id));
     
     htsbuf_qprintf(hq, 
                "%02d:%02d-%02d:%02d&nbsp; %s",
@@ -431,7 +431,7 @@ page_pvrinfo(http_connection_t *hc, const char *remain, void *opaque)
     htsbuf_qprintf(hq, "Recording status: %s<br>", rstatus);
 
   htsbuf_qprintf(hq, "<form method=\"post\" action=\"/pvrinfo/%s\">",
-                idnode_uuid_as_str(&de->de_id));
+                idnode_uuid_as_sstr(&de->de_id));
 
   switch(de->de_sched_state) {
   case DVR_SCHEDULED:
index 6dfdb61b6cccc81dc9cb34f70c47d3e00d86a87f..9c06dcb97d7931bb65940f9ab7da849da17d6ab5 100644 (file)
@@ -790,7 +790,7 @@ http_dvr_list_playlist(http_connection_t *hc, int pltype)
     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_str(&de->de_id);
+    uuid = idnode_uuid_as_sstr(&de->de_id);
     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);
 
@@ -841,7 +841,7 @@ http_dvr_playlist(http_connection_t *hc, int pltype, dvr_entry_t *de)
     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_str(&de->de_id);
+    uuid = idnode_uuid_as_sstr(&de->de_id);
     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);