diff mbox

[01/13] libdvbv5: fix reading multisection tables

Message ID 1388245561-8751-1-git-send-email-neolynx@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

André Roth Dec. 28, 2013, 3:45 p.m. UTC
Signed-off-by: André Roth <neolynx@gmail.com>
---
 lib/libdvbv5/dvb-scan.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

Comments

Mauro Carvalho Chehab Dec. 29, 2013, 2:53 a.m. UTC | #1
Em Sat, 28 Dec 2013 16:45:49 +0100
André Roth <neolynx@gmail.com> escreveu:

> Signed-off-by: André Roth <neolynx@gmail.com>
> ---
>  lib/libdvbv5/dvb-scan.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
> index e9ccc72..af3a052 100644
> --- a/lib/libdvbv5/dvb-scan.c
> +++ b/lib/libdvbv5/dvb-scan.c
> @@ -187,15 +187,19 @@ int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
>  		dvb_table_header_init(h);
>  		if (id != -1 && h->id != id) { /* search for a specific table id */
>  			continue;
> -		} else {
> -			if (table_id == -1)
> -				table_id = h->id;
> -			else if (h->id != table_id) {
> -				dvb_logwarn("dvb_read_section: table ID mismatch reading multi section table: %d != %d", h->id, table_id);
> -				continue;
> -			}
>  		}
>  
> +		/*if (id != -1) {*/
> +			/*if (table_id == -1)*/
> +				/*table_id = h->id;*/
> +			/*else if (h->id != table_id) {*/
> +				/*dvb_logwarn("dvb_read_section: table ID mismatch reading multi section table: %d != %d", h->id, table_id);*/
> +				/*free(buf);*/
> +				/*continue;*/
> +			/*}*/
> +		/*}*/
> +

Could you please better describe this patch? What but is it supposed to
fix?

If this is a bug fix, why are you commenting all lines instead of dropping?

> +		dvb_logerr("dvb_read_section: got section %d, last %di, filter %d", h->section_id, h->last_section, id );
>  		/* handle the sections */
>  		if (first_section == -1)
>  			first_section = h->section_id;
diff mbox

Patch

diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
index e9ccc72..af3a052 100644
--- a/lib/libdvbv5/dvb-scan.c
+++ b/lib/libdvbv5/dvb-scan.c
@@ -187,15 +187,19 @@  int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
 		dvb_table_header_init(h);
 		if (id != -1 && h->id != id) { /* search for a specific table id */
 			continue;
-		} else {
-			if (table_id == -1)
-				table_id = h->id;
-			else if (h->id != table_id) {
-				dvb_logwarn("dvb_read_section: table ID mismatch reading multi section table: %d != %d", h->id, table_id);
-				continue;
-			}
 		}
 
+		/*if (id != -1) {*/
+			/*if (table_id == -1)*/
+				/*table_id = h->id;*/
+			/*else if (h->id != table_id) {*/
+				/*dvb_logwarn("dvb_read_section: table ID mismatch reading multi section table: %d != %d", h->id, table_id);*/
+				/*free(buf);*/
+				/*continue;*/
+			/*}*/
+		/*}*/
+
+		dvb_logerr("dvb_read_section: got section %d, last %di, filter %d", h->section_id, h->last_section, id );
 		/* handle the sections */
 		if (first_section == -1)
 			first_section = h->section_id;