libdvbv5: Fix the error message when a props is not found
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 5 Sep 2014 14:42:44 +0000 (11:42 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 5 Sep 2014 18:18:19 +0000 (15:18 -0300)
The acessed data when a property is not found on write
format oneline is wrong. Use dvb_cmd_name() to get the right
one, and uses the field that came from table->prop.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/dvb-file.c

index c8f7a12..1e50501 100644 (file)
@@ -436,7 +436,7 @@ int dvb_write_format_oneline(const char *fname,
                                        if (j >= entry->n_props) {
                                                fprintf(stderr,
                                                        "property %s not supported while parsing entry %d of %s\n",
-                                                       dvb_v5_name[entry->props[i].cmd],
+                                                       dvb_cmd_name(table->prop),
                                                        line, fname);
                                        }