From f0b348d457e20979602086a627dd1206cdb67e94 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sat, 16 Aug 2014 09:13:22 +0200 Subject: [PATCH] linuxdvb: Add default name Position# for the advanced DVB-S settings --- src/input/mpegts/linuxdvb/linuxdvb_satconf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c index afdfd379e..39fa40c93 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c @@ -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++; } -- 2.47.3