]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
added helper channel_tag_find_by_identifier
authorStephan Diederich <stephan.diederich@googlemail.com>
Sat, 28 Nov 2009 13:09:20 +0000 (13:09 +0000)
committerStephan Diederich <stephan.diederich@googlemail.com>
Sat, 28 Nov 2009 13:09:20 +0000 (13:09 +0000)
src/channels.c
src/channels.h

index 462ba5acb6d76ecc3ed70c5e0838390f2638988d..a302e9d8e6b5de4b3608a22f2014fe8c643d5f16 100644 (file)
@@ -890,6 +890,20 @@ channel_tag_find_by_name(const char *name, int create)
 }
 
 
+/**
+ *
+ */
+channel_tag_t *
+channel_tag_find_by_identifier(uint32_t id) {
+  channel_tag_t *ct;
+
+  TAILQ_FOREACH(ct, &channel_tags, ct_link)
+    if(ct->ct_identifier == id)
+      return ct;
+
+  return NULL;
+}
+
 
 /**
  *
index e764c36343fb6cfc5ee33387109f8531d6894f25..fc666b27ea90c75a4284622f66be40f8873e1a92 100644 (file)
@@ -128,6 +128,8 @@ void channel_set_tags_from_list(channel_t *ch, const char *maplist);
 
 channel_tag_t *channel_tag_find_by_name(const char *name, int create);
 
+channel_tag_t *channel_tag_find_by_identifier(uint32_t id);
+
 int channel_tag_map(channel_t *ch, channel_tag_t *ct, int check);
 
 void channel_save(channel_t *ch);