libdvbv5: Find other TS in NIT pointer fix
authorRob Barker <robert.barker@redembedded.com>
Thu, 29 May 2014 15:20:53 +0000 (12:20 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 4 Jun 2014 17:34:31 +0000 (14:34 -0300)
dvb_scan_add_entry() is modified to return the pointer to the newly
created entry (the last in the list), so the add_update_nit_ functions
now modify the correct element, instead of the penultimate one.  This
fixes the finding of other TS in NIT scan feature.

Signed-off-by: Rob Barker <robert.barker@redembedded.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/dvb-scan.c

index 297ac59..9a7997b 100644 (file)
@@ -741,7 +741,7 @@ struct dvb_entry *dvb_scan_add_entry(struct dvb_v5_fe_parms *parms,
                                n, freq);
                        entry->next = new_entry;
                        new_entry->next = NULL;
-                       return entry;
+                       return new_entry;
                }
        }