Hello community,

here is the log from the commit of package usb_modeswitch for openSUSE:Factory 
checked in at 2018-04-22 14:30:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/usb_modeswitch (Old)
 and      /work/SRC/openSUSE:Factory/.usb_modeswitch.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "usb_modeswitch"

Sun Apr 22 14:30:07 2018 rev:43 rq:596721 version:2.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/usb_modeswitch/usb_modeswitch.changes    
2017-08-24 18:19:03.643160854 +0200
+++ /work/SRC/openSUSE:Factory/.usb_modeswitch.new/usb_modeswitch.changes       
2018-04-22 14:30:08.837579210 +0200
@@ -1,0 +2,18 @@
+Sun Apr 15 12:55:31 UTC 2018 - enzok...@kabelmail.de
+
+- Update to version 2.5.2
+  * Bugfix release: fixed additional MessageContent parameters not
+    working, reported by Frank Schmirler (see
+    http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18369).
+  * Fixed "early crash" when killed before libusb context
+    initialization (see
+    https://bugzilla.redhat.com/show_bug.cgi?id=1358472), reported
+    by Lubomir Rinteln.
+  * Fixed bad string reference, reported by Lubomir Rintel, (see
+    http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18238).
+  * Fixed detection of systemd if /sbin/init is a cascaded symlink
+    (see
+    http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18218).
+  * Fixed quirk in help message from usb_modeswitch binary.
+
+-------------------------------------------------------------------

Old:
----
  usb-modeswitch-2.5.1.tar.bz2

New:
----
  usb-modeswitch-2.5.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ usb_modeswitch.spec ++++++
--- /var/tmp/diff_new_pack.SzFcT9/_old  2018-04-22 14:30:09.841542872 +0200
+++ /var/tmp/diff_new_pack.SzFcT9/_new  2018-04-22 14:30:09.853542438 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package usb_modeswitch
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %define date           20170806
 %define _udevdir %(pkg-config --variable=udevdir udev)
 Name:           usb_modeswitch
-Version:        2.5.1
+Version:        2.5.2
 Release:        0
 Summary:        A mode switching tool for controlling multiple-device USB gear
 License:        GPL-2.0+

++++++ usb-modeswitch-2.5.1.tar.bz2 -> usb-modeswitch-2.5.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/ChangeLog 
new/usb-modeswitch-2.5.2/ChangeLog
--- old/usb-modeswitch-2.5.1/ChangeLog  2017-08-06 14:29:01.000000000 +0200
+++ new/usb-modeswitch-2.5.2/ChangeLog  2017-12-31 10:33:53.000000000 +0100
@@ -2,6 +2,18 @@
 History of USB_ModeSwitch
 =========================
 
+Version 2.5.2, 2017/12/31
+    Bugfix release: fixed additional MessageContent parameters not working,
+    reported by Frank Schmirler (see
+    http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18369 );
+    fixed "early crash" when killed before libusb context initialization
+    (see https://bugzilla.redhat.com/show_bug.cgi?id=1358472 ), reported
+    by Lubomir Rintel;
+    fixed bad string reference, reported by Lubomir Rintel, (see
+    http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18238 );
+    fixed detection of systemd if /sbin/init is a cascaded symlink
+    (see http://draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=18218 );
+    fixed quirk in help message from usb_modeswitch binary
 Version 2.5.1, 2017/08/06
     New parameter "HuaweiAltMode", uses an alternative Huawei standard bulk
     message which will either provide NCM (newer modems) or plain PPP ports
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/Makefile 
new/usb-modeswitch-2.5.2/Makefile
--- old/usb-modeswitch-2.5.1/Makefile   2017-08-02 22:31:05.000000000 +0200
+++ new/usb-modeswitch-2.5.2/Makefile   2017-12-31 10:34:02.000000000 +0100
@@ -1,5 +1,5 @@
 PROG        = usb_modeswitch
-VERS        = 2.5.1
+VERS        = 2.5.2
 CC          ?= gcc
 CFLAGS      += -Wall
 LIBS        = `pkg-config --libs --cflags libusb-1.0`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/README 
new/usb-modeswitch-2.5.2/README
--- old/usb-modeswitch-2.5.1/README     2017-08-02 22:30:52.000000000 +0200
+++ new/usb-modeswitch-2.5.2/README     2017-12-31 11:15:58.000000000 +0100
@@ -170,7 +170,10 @@
 Please go to the homepage (see link at the top). Read carefully.
 For support questions use ONLY public posts in the forum.
 
-Again - to see the USB IDs of known devices, see the data package.
+ONCE AGAIN: The USB IDs of devices are the only halfway reliable indicator to
+determine if they are known/supported. Brand and model names are often not
+helpful, due to rebranding and fimrware variations.
+See the data package, folder "usb_modeswitch.d" for known IDs.
 
 
 
@@ -244,6 +247,7 @@
  Leonid Lisovskiy
  Vladislav Grishenko
  Lubomir Rintel
+ Frank Schmirler
 
 Device information contributors are named in the "device_reference.txt" file.
 
@@ -272,4 +276,4 @@
 
 
 
-Last revised: 2017-01-16, Josua Dietze
+Last revised: 2017-12-31, Josua Dietze
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/dispatcher.c 
new/usb-modeswitch-2.5.2/dispatcher.c
--- old/usb-modeswitch-2.5.1/dispatcher.c       2017-01-17 20:39:49.000000000 
+0100
+++ new/usb-modeswitch-2.5.2/dispatcher.c       2017-12-31 10:13:02.000000000 
+0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 Josua Dietze, usb_modeswitch version 2.5.0
+ * Copyright (c) 2011-2017 Josua Dietze, usb_modeswitch version 2.5.2
  * Contains code under
  * Copyright (c) 2010 Wojciech A. Koszek <wkos...@freebsd.org>
  * All rights reserved.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/usb_modeswitch.c 
new/usb-modeswitch-2.5.2/usb_modeswitch.c
--- old/usb-modeswitch-2.5.1/usb_modeswitch.c   2017-08-06 14:05:37.000000000 
+0200
+++ new/usb-modeswitch-2.5.2/usb_modeswitch.c   2017-12-31 11:33:30.000000000 
+0100
@@ -1,6 +1,6 @@
 /*
   Mode switching tool for controlling mode of 'multi-state' USB devices
-  Version 2.5.1, 2017/08/06
+  Version 2.5.2, 2017/12/31
 
   Copyright (C) 2007 - 2017 Josua Dietze (mail to "usb_admin" at the domain
   of the home page; or write a personal message through the forum to "Josh".
@@ -45,7 +45,7 @@
 
 /* Recommended tab size: 4 */
 
-#define VERSION "2.5.1"
+#define VERSION "2.5.2"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -762,6 +762,10 @@
        } else if (strlen(MessageContent)) {
                detachDrivers();
                strcpy(Messages[0],MessageContent);
+               if (MessageContent2[0] != '\0')
+                       strcpy(Messages[1], MessageContent2);
+               if (MessageContent3[0] != '\0')
+                       strcpy(Messages[2], MessageContent3);
                switchSendMessage();
        }
 
@@ -1248,7 +1252,7 @@
 #define MOBILE_ACTION_READLOOP2 73
 
 /* The code here is statically derived from sniffing (and confirmed working).
- * However I bet it could be simplified significantly.
+ * However, I bet it could be simplified significantly.
  */
 
 void switchActionMode ()
@@ -1347,7 +1351,6 @@
                SHOW_PROGRESS(output," Could not claim interface (error %d). 
Abort\n", ret);
                abortExit();
        }
-//     libusb_clear_halt(devh, MessageEndpoint);
        if (show_progress)
                fflush(output);
 
@@ -1461,7 +1464,6 @@
  */
 int detachDrivers()
 {
-
        int i, ret;
        SHOW_PROGRESS(output,"Looking for active drivers ...\n");
        ret = libusb_kernel_driver_active(devh, 0);
@@ -1579,6 +1581,7 @@
                 * Target device on the same bus with higher device number is 
returned,
                 * description is read for syslog message
                 */
+               // Wait counter passed on from previous loop
                for (i=i; i < CheckSuccess; i++) {
                        SHOW_PROGRESS(output," Search for target devices 
...\n");
                        dev = search_devices(&newTargetCount, TargetVendor, 
TargetProductList,
@@ -1617,12 +1620,6 @@
                }
 
        switch (success) {
-               case 3: 
-                       if (sysmode)
-                               syslog(LOG_NOTICE, "switched to new device, but 
hit libusb1 bug");
-                       TargetProduct = -1;
-                       success = 1;
-                       break;
                case 2: 
                        if (sysmode)
                                syslog(LOG_NOTICE, "switched to %04x:%04x on 
%03d/%03d", TargetVendor,
@@ -1655,7 +1652,6 @@
                } else
                        SHOW_PROGRESS(output," Sending the message returned 
error %d. Try to continue\n", ret);
        return ret;
-
 }
 
 
@@ -1670,7 +1666,6 @@
                } else
                        SHOW_PROGRESS(output," Response reading failed (error 
%d)", ret);
        return ret;
-
 }
 
 
@@ -1681,7 +1676,6 @@
                libusb_release_interface(devh, Interface);
        close_all();
        exit(0);
-
 }
 
 
@@ -1695,7 +1689,6 @@
        unsigned char buffer[2];
        int devClass, product;
        struct libusb_device* right_dev = NULL;
-//     struct libusb_device_handle *testdevh;
        struct libusb_device **devs;
        int i=0;
 
@@ -1707,7 +1700,7 @@
        *numFound = 0;
 
        /* Sanity check */
-       if (!vendor || productList == '\0')
+       if (!vendor || *productList == '\0')
                return NULL;
 
        listcopy = malloc(strlen(productList)+1);
@@ -1761,7 +1754,7 @@
                                        fprintf(output,"   product ID 
matched\n");
 
                                if (targetClass != 0) {
-                                       // TargetClass is set, check class of 
first interface
+                                       /* TargetClass is set, check class of 
first interface */
                                        struct libusb_device_descriptor 
descriptor;
                                        libusb_get_device_descriptor(dev, 
&descriptor);
                                        devClass = descriptor.bDeviceClass;
@@ -1796,24 +1789,8 @@
                                                                fprintf 
(output,"   count device\n");
                                                }
                                        }
-/*                             } else if (configuration > 0) {
-                                       // Configuration parameter is set, 
check device configuration
-                                       int testconfig = 
get_current_config_value(dev);
-                                       if (testconfig != configuration) {
-                                               if (verbose)
-                                                       fprintf (output,"   
device configuration %d not matching target\n",
-                                                                       
testconfig);
-
-                                               (*numFound)++;
-                                               right_dev = dev;
-                                               if (verbose)
-                                                       fprintf (output,"   
count device\n");
-                                       } else
-                                               if (verbose)
-                                                       fprintf (output,"   
device not counted, target configuration reached\n");
-*/
                                } else {
-                                       // Neither TargetClass nor 
Configuration are set
+                                       /* Neither TargetClass nor 
Configuration are set */
                                        (*numFound)++;
                                        right_dev = dev;
                                        if (mode == SEARCH_BUSDEV)
@@ -1921,7 +1898,6 @@
                        }
                }
                while (token != NULL && numLines < MAXLINES) {
-//                     Line++;
                        Len=strlen(Str);
                        if (Len==0)
                                goto NextLine;
@@ -2060,7 +2036,8 @@
                libusb_close(devh);
        // libusb_exit will crash on Raspbian 7, crude protection
 #ifndef __ARMEL__
-       libusb_exit(NULL);
+       if (ctx)
+               libusb_exit(NULL);
 #endif
        if (sysmode)
                closelog();
@@ -2101,7 +2078,8 @@
        " -g, --device-num NUM          system device number (for hard ID)\n"
        " -m, --message-endpoint NUM    direct the message transfer there 
(optional)\n"
        " -M, --message-content <msg>   message to send (hex number as 
string)\n"
-       " -2 <msg>, -3 <msg>            additional messages to send (-n 
recommended)\n"
+       " -2, --message-content2 <msg>  additional messages to send (-n 
recommended)\n"
+       " -3, --message-content3 <msg>  additional messages to send (-n 
recommended)\n"
        " -w, --release-delay NUM       wait NUM ms before releasing the 
interface\n"
        " -n, --need-response           obsolete, no effect (always on)\n"
        " -r, --response-endpoint NUM   read response from there (optional)\n"
@@ -2126,7 +2104,7 @@
        " -Q, --quiet                   don't show progress or error messages\n"
        " -W, --verbose                 print all settings and debug output\n"
        " -D, --sysmode                 specific result and syslog message\n"
-       " -s, --success <seconds>       switching result check with timeout\n"
+       " -s, --check-success <seconds> switching result check with timeout\n"
        " -I, --inquire                 obsolete, no effect\n\n"
        " -c, --config-file <filename>  load long configuration from file\n\n"
        " -t, --stdinput                read long configuration from stdin\n\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/usb_modeswitch.h 
new/usb-modeswitch-2.5.2/usb_modeswitch.h
--- old/usb-modeswitch-2.5.1/usb_modeswitch.h   2017-08-06 14:15:20.000000000 
+0200
+++ new/usb-modeswitch-2.5.2/usb_modeswitch.h   2017-12-31 10:13:39.000000000 
+0100
@@ -2,7 +2,7 @@
   This file is part of usb_modeswitch, a mode switching tool for controlling
   the mode of 'multi-state' USB devices
 
-  Version 2.5.1, 2017/08/06
+  Version 2.5.2, 2017/12/31
   Copyright (C) 2007 - 2017  Josua Dietze
 
   Config file parsing stuff borrowed from Guillaume Dargaud
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/usb_modeswitch.sh 
new/usb-modeswitch-2.5.2/usb_modeswitch.sh
--- old/usb-modeswitch-2.5.1/usb_modeswitch.sh  2017-08-06 14:15:26.000000000 
+0200
+++ new/usb-modeswitch-2.5.2/usb_modeswitch.sh  2017-12-31 10:13:49.000000000 
+0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# part of usb_modeswitch 2.5.1
+# part of usb_modeswitch 2.5.2
 device_in()
 {
        if [ ! -e /var/lib/usb_modeswitch/$1 ]; then
@@ -62,7 +62,7 @@
 fi
 
 PATH=/bin:/sbin:/usr/bin:/usr/sbin
-init_path=`readlink /sbin/init`
+init_path=`readlink -f /sbin/init`
 if [ `basename $init_path` = "systemd" ]; then
        systemctl --no-block start usb_modeswitch@$p2.service
 elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/usb-modeswitch-2.5.1/usb_modeswitch.tcl 
new/usb-modeswitch-2.5.2/usb_modeswitch.tcl
--- old/usb-modeswitch-2.5.1/usb_modeswitch.tcl 2017-08-06 14:15:36.000000000 
+0200
+++ new/usb-modeswitch-2.5.2/usb_modeswitch.tcl 2017-12-31 10:14:00.000000000 
+0100
@@ -9,7 +9,7 @@
 # the mode switching program with the matching parameter
 # file from /usr/share/usb_modeswitch
 #
-# Part of usb-modeswitch-2.5.1 package
+# Part of usb-modeswitch-2.5.2 package
 # (C) Josua Dietze 2009-2017
 
 set arg0 [lindex $argv 0]


Reply via email to