]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: Add default name Position#<num> for the advanced DVB-S settings 459/head
authorJaroslav Kysela <perex@perex.cz>
Sat, 16 Aug 2014 07:13:22 +0000 (09:13 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 16 Aug 2014 07:13:22 +0000 (09:13 +0200)
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index afdfd379ea3be977a3d83acec8639a2d6ae964fe..39fa40c939a9f56ee10ee0e02307827cffd1b74f 100644 (file)
@@ -165,6 +165,7 @@ linuxdvb_satconf_class_orbitalpos_set
   linuxdvb_satconf_t *ls = p;
   int c = *(int*)linuxdvb_satconf_class_orbitalpos_get(p);
   int n = *(int*)v;
+  char buf[20];
 
   if (n == c)
     return 0;
@@ -172,7 +173,11 @@ linuxdvb_satconf_class_orbitalpos_set
   /* Add */
   if (n > c) {
     while (c < n) {
-      linuxdvb_satconf_ele_create0(NULL, NULL, ls);
+      lse = linuxdvb_satconf_ele_create0(NULL, NULL, ls);
+      if (lse->lse_name == NULL) {
+        snprintf(buf, sizeof(buf), "Position #%i", c + 1);
+        lse->lse_name = strdup(buf);
+      }
       c++;
     }