Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: Add default name Position#<num> for the advanced DVB-S sett…
…ings
  • Loading branch information
perexg committed Aug 16, 2014
1 parent 98f197c commit f0b348d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -165,14 +165,19 @@ 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;

/* 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++;
}

Expand Down

0 comments on commit f0b348d

Please sign in to comment.