[Pkg-running-devel] [garmin-forerunner-tools] 01/01: releasing package garmin-forerunner-tools version 0.10repacked-10

Christian Perrier bubulle at moszumanska.debian.org
Sat Apr 23 07:18:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository garmin-forerunner-tools.

commit dd59198fcaabcbeb8f43bf73da05f0c15a2cf963
Author: Christian Perrier <bubulle at debian.org>
Date:   Sat Apr 23 09:18:12 2016 +0200

    releasing package garmin-forerunner-tools version 0.10repacked-10
---
 debian/changelog                |   7 +++
 debian/patches/816314_fix.patch | 104 +++++++++++++++++++++++++++++++++-------
 2 files changed, 93 insertions(+), 18 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5ad3f54..a18781f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+garmin-forerunner-tools (0.10repacked-10) unstable; urgency=medium
+
+  * Fix the patch originally proposed to fix #816314. Thanks again to
+    Fenix.
+
+ -- Christian Perrier <bubulle at debian.org>  Fri, 22 Apr 2016 15:38:57 +0200
+
 garmin-forerunner-tools (0.10repacked-9) unstable; urgency=medium
 
   * Fix segmentation fault by properly checking the size of a counter
diff --git a/debian/patches/816314_fix.patch b/debian/patches/816314_fix.patch
index 3a8d2dc..8401a60 100644
--- a/debian/patches/816314_fix.patch
+++ b/debian/patches/816314_fix.patch
@@ -1,19 +1,87 @@
-commit da9c57e496f5b88d875329e57fb7d47b3b5e84a9
-Author: Fenix <fenix at calisto>
-Date:   Wed Apr 6 00:25:15 2016 +0200
-
-    Fix #816314 error Segmentation Fault
-
-diff --git a/src/protocol.c b/src/protocol.c
-index 37f66b4..a0c0b36 100644
---- a/src/protocol.c
-+++ b/src/protocol.c
-@@ -583,7 +583,7 @@ garmin_read_a000_a001 ( garmin_unit * garmin )
+diff --git a/src/usb_comm.c b/src/usb_comm.c
+index f00f6d9..8931f09 100644
+--- a/src/usb_comm.c
++++ b/src/usb_comm.c
+@@ -74,7 +74,6 @@ garmin_open ( garmin_unit * garmin )
+     cnt = libusb_get_device_list(ctx,&dl);
+     
+     for (i = 0; i < cnt; ++i) {
+-      {
+         struct libusb_device_descriptor descriptor;
+         struct libusb_config_descriptor *config;
+ 
+@@ -97,22 +96,28 @@ garmin_open ( garmin_unit * garmin )
+ 	  if ( err ) {
+ 	    printf("libusb_open failed: %s\n",libusb_error_name(err));
+             garmin->usb.handle = NULL;
+-	  } else if ( garmin->verbose != 0 ) {
+-	    printf("[garmin] libusb_open = %p\n",garmin->usb.handle);
++	  } else {
++	      if ( garmin->verbose != 0 ) {
++                printf("[garmin] libusb_open = %p\n",garmin->usb.handle);
++	      }
+ 
+             err = libusb_set_configuration(garmin->usb.handle,1);
+             if ( err ) {
+               printf("libusb_set_configuration failed: %s\n",
+                      libusb_error_name(err));
+-            } else if ( garmin->verbose != 0 ) {
+-              printf("[garmin] libusb_set_configuration[1] succeeded\n");
++            } else {
++		if ( garmin->verbose != 0 ) {
++	              printf("[garmin] libusb_set_configuration[1] succeeded\n");
++		}
+ 
+               err = libusb_claim_interface(garmin->usb.handle,0);
+               if ( err ) {
+                 printf("libusb_claim_interface failed: %s\n",
+                        libusb_error_name(err));
+-              } else if ( garmin->verbose != 0 ) {
+-                printf("[garmin] libusb_claim_interface[0] succeeded\n");
++              } else {
++		if ( garmin->verbose != 0 ) {
++                     printf("[garmin] libusb_claim_interface[0] succeeded\n");
++		}
+ 
+                 err = libusb_get_config_descriptor_by_value(di,1,&config);
+                 if ( err ) {
+@@ -142,25 +147,22 @@ garmin_open ( garmin_unit * garmin )
+ 	      switch ( ep->bmAttributes & LIBUSB_TRANSFER_TYPE_MASK ) {
+ 	      case LIBUSB_TRANSFER_TYPE_BULK:
+ 		if ( ep->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK ) {
+-		  garmin->usb.bulk_in = 
+-		    ep->bEndpointAddress & LIBUSB_ENDPOINT_ADDRESS_MASK;
++		  garmin->usb.bulk_in = ep->bEndpointAddress;
+ 		  if ( garmin->verbose != 0 ) {
+-		    printf("[garmin] bulk IN  = %d\n",garmin->usb.bulk_in);
++		    printf("[garmin] bulk IN  = 0x%02x\n",garmin->usb.bulk_in);
+ 		  }
+ 		} else {
+-		  garmin->usb.bulk_out = 
+-		    ep->bEndpointAddress & LIBUSB_ENDPOINT_ADDRESS_MASK;
++		  garmin->usb.bulk_out = ep->bEndpointAddress;
+ 		  if ( garmin->verbose != 0 ) {
+-		    printf("[garmin] bulk OUT = %d\n",garmin->usb.bulk_out);
++		    printf("[garmin] bulk OUT = 0x%02x\n",garmin->usb.bulk_out);
+ 		  }
+ 		}
+ 		break;
+ 	      case LIBUSB_TRANSFER_TYPE_INTERRUPT:
+ 		if ( ep->bEndpointAddress & LIBUSB_ENDPOINT_DIR_MASK ) {
+-		  garmin->usb.intr_in = 
+-		    ep->bEndpointAddress & LIBUSB_ENDPOINT_ADDRESS_MASK;
++		  garmin->usb.intr_in = ep->bEndpointAddress;
+ 		  if ( garmin->verbose != 0 ) {
+-		    printf("[garmin] intr IN  = %d\n",garmin->usb.intr_in);
++		    printf("[garmin] intr IN  = 0x%02x\n",garmin->usb.intr_in);
+ 		  }
+ 		}
+ 		break;
+@@ -174,7 +176,6 @@ garmin_open ( garmin_unit * garmin )
+ 
  	  break;
- 	case Tag_Appl_Prot_Id:
- 	  memset(datatypes,0,size * sizeof(uint16));
--	  for ( j = i+1; p.packet.data[3*j] == Tag_Data_Type_Id; j++ ) {
-+	  for ( j = i+1; (j<=size) && (p.packet.data[3*j] == Tag_Data_Type_Id); j++ ) {
- 	    datatypes[j-i-1] = get_uint16(p.packet.data + 3*j + 1);
- 	  }
- 	  garmin_assign_protocol(garmin,data,datatypes);
+ 	}
+-      }
+ 
+       if ( garmin->usb.handle != NULL ) break;
+     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/garmin-forerunner-tools.git



More information about the Pkg-running-devel mailing list