pthread_mutex_lock(&global_lock);
/* Couldn't find */
- if (!(s = service_find(uuid))) {
+ if (!(s = service_find_by_uuid(uuid))) {
pthread_mutex_unlock(&global_lock);
return EINVAL;
}
if ((e = htsmsg_field_get_map(f)) == NULL) continue;
lcn = htsmsg_get_s64_or_default(e, "lcn", 0);
tag = htsmsg_get_str(e, "tag");
- s = service_find_by_identifier(f->hmf_name);
+ s = service_find_by_uuid(f->hmf_name);
if (s)
bouquet_add_service(bq, s, lcn, tag);
}
*
*/
channel_tag_t *
-channel_tag_find_by_identifier(uint32_t id) {
+channel_tag_find_by_id(uint32_t id) {
channel_tag_t *ct;
TAILQ_FOREACH(ct, &channel_tags, ct_link) {
channel_tag_t *channel_tag_find_by_name(const char *name, int create);
-channel_tag_t *channel_tag_find_by_identifier(uint32_t id);
+channel_tag_t *channel_tag_find_by_id(uint32_t id);
static inline channel_tag_t *channel_tag_find_by_uuid(const char *uuid)
{ return (channel_tag_t*)idnode_find(uuid, &channel_tag_class, NULL); }
/* Check key info */
if(htsmsg_get_u32(c, "ch_id", &ch_id)) return;
- if((ch = channel_find_by_identifier(ch_id)) == NULL) return;
+ if((ch = channel_find_by_id(ch_id)) == NULL) return;
if(htsmsg_get_u32(c, "start", &e_start)) return;
if(htsmsg_get_u32(c, "stop", &e_stop)) return;
if(!(title = htsmsg_get_str(c, "title"))) return;
memcpy(&ed, data, sizeof(ed));
data += sizeof(ed);
len -= sizeof(ed);
- svc = (mpegts_service_t *)service_find0(&ed.svc_uuid);
+ svc = (mpegts_service_t *)service_find_by_uuid0(&ed.svc_uuid);
if (svc == NULL)
return;
pthread_mutex_lock(&global_lock);
}
static channel_tag_t *
-htsp_channel_tag_find_by_identifier(htsp_connection_t *htsp, uint32_t id)
+htsp_channel_tag_find_by_id(htsp_connection_t *htsp, uint32_t id)
{
channel_tag_t *ct;
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)))
+ if (!(ct = htsp_channel_tag_find_by_id(htsp, u32)))
return htsp_error(htsp, N_("Channel tag does not exist"));
else
eq.channel_tag = strdup(idnode_uuid_as_str(&ct->ct_id, ubuf));
void service_ref(service_t *t);
-static inline service_t *service_find(const char *identifier)
- { return idnode_find(identifier, &service_class, NULL); }
-static inline service_t *service_find0(tvh_uuid_t *uuid)
+static inline service_t *service_find_by_uuid(const char *uuid)
+ { return idnode_find(uuid, &service_class, NULL); }
+static inline service_t *service_find_by_uuid0(tvh_uuid_t *uuid)
{ return idnode_find0(uuid, &service_class, NULL); }
-#define service_find_by_identifier service_find
service_instance_t *service_find_instance(struct service *s,
struct channel *ch,
void
subscription_dummy_join(const char *id, int first)
{
- service_t *t = service_find_by_identifier(id);
+ service_t *t = service_find_by_uuid(id);
profile_chain_t *prch;
streaming_target_t *st;
th_subscription_t *s;
else if(nc == 2 && !strcmp(components[0], "dvrid"))
de = dvr_entry_find_by_id(atoi(components[1]));
else if(nc == 2 && !strcmp(components[0], "tagid"))
- tag = channel_tag_find_by_identifier(atoi(components[1]));
+ tag = channel_tag_find_by_id(atoi(components[1]));
else if(nc == 2 && !strcmp(components[0], "tagname"))
tag = channel_tag_find_by_name(components[1], 0);
else if(nc == 2 && !strcmp(components[0], "tag")) {
} else if(!strcmp(components[0], "channel")) {
ch = channel_find(components[1]);
} else if(!strcmp(components[0], "service")) {
- service = service_find_by_identifier(components[1]);
+ service = service_find_by_uuid(components[1]);
#if ENABLE_MPEGTS
} else if(!strcmp(components[0], "mux")) {
// TODO: do we want to be able to force starting a particular instance
else if (nc == 2 && !strcmp(components[0], "channel"))
ch = channel_find(components[1]);
else if (nc == 2 && !strcmp(components[0], "tagid"))
- tag = channel_tag_find_by_identifier(atoi(components[1]));
+ tag = channel_tag_find_by_id(atoi(components[1]));
else if (nc == 2 && !strcmp(components[0], "tagname"))
tag = channel_tag_find_by_name(components[1], 0);
else if (nc == 2 && !strcmp(components[0], "tag"))