Hello community, here is the log from the commit of package usbredir for openSUSE:Factory checked in at 2016-02-23 16:52:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/usbredir (Old) and /work/SRC/openSUSE:Factory/.usbredir.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "usbredir" Changes: -------- --- /work/SRC/openSUSE:Factory/usbredir/usbredir.changes 2014-10-19 19:27:39.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.usbredir.new/usbredir.changes 2016-02-23 16:52:08.000000000 +0100 @@ -1,0 +2,15 @@ +Tue Feb 16 09:41:33 UTC 2016 - mkra...@suse.com + +- Update to version 0.7.1 + + usbredirfilter: + -force check to device which had all interfaces skipped. This fix a bug + which allow a KVM device to be redirect when it should not + + usbredirparser: + -allow missing capabilities from source host when loading a USB + redirection stream during a qemu migration + + usbredirhost: + -new callback to drop isoc packets when application's pending writes buffer + size is too big; The threshold calculation aims at 10fps as worst case to + give at least 150ms of continuous data to application. + +------------------------------------------------------------------- Old: ---- usbredir-0.7.tar.bz2 New: ---- usbredir-0.7.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ usbredir.spec ++++++ --- /var/tmp/diff_new_pack.yIfGlu/_old 2016-02-23 16:52:09.000000000 +0100 +++ /var/tmp/diff_new_pack.yIfGlu/_new 2016-02-23 16:52:09.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package usbredir # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands. # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: usbredir -Version: 0.7 +Version: 0.7.1 Release: 0 Summary: A protocol for redirection USB traffic License: GPL-2.0+ and LGPL-2.1+ @@ -81,13 +81,9 @@ find %{buildroot} -type f -name "*.la" -delete -print %post -n libusbredirhost1 -p /sbin/ldconfig - %postun -n libusbredirhost1 -p /sbin/ldconfig - %post -n libusbredirparser1 -p /sbin/ldconfig - %postun -n libusbredirparser1 -p /sbin/ldconfig - %files %defattr(-,root,root) %doc ChangeLog README COPYING ++++++ usbredir-0.7.tar.bz2 -> usbredir-0.7.1.tar.bz2 ++++++ ++++ 22034 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/ChangeLog new/usbredir-0.7.1/ChangeLog --- old/usbredir-0.7/ChangeLog 2014-05-19 11:51:27.000000000 +0200 +++ new/usbredir-0.7.1/ChangeLog 2015-10-30 15:44:08.000000000 +0100 @@ -1,3 +1,16 @@ +usbredir-0.7.1 29 Oct 2015 +---------------------------- +-usbredirfilter + -force check to device which had all interfaces skipped. This fix a bug + which allow a KVM device to be redirect when it should not +-usbredirparser: + -allow missing capabilities from source host when loading a USB + redirection stream during a qemu migration +-usbredirhost: + -new callback to drop isoc packets when application's pending writes buffer + size is too big; The threshold calculation aims at 10fps as worst case to + give at least 150ms of continuous data to application. + usbredir-0.7 19 May 2014 -------------------------- -usbredirproto: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/Makefile.am new/usbredir-0.7.1/Makefile.am --- old/usbredir-0.7/Makefile.am 2012-09-26 12:37:50.000000000 +0200 +++ new/usbredir-0.7.1/Makefile.am 2015-05-11 12:00:22.000000000 +0200 @@ -2,4 +2,12 @@ if ! OS_WIN32 SUBDIRS += usbredirserver usbredirtestclient endif -EXTRA_DIST = README.multi-thread usb-redirection-protocol.txt \ No newline at end of file + +EXTRA_DIST = README.multi-thread usb-redirection-protocol.txt + +MAINTAINERCLEANFILES = \ + $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \ + $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \ + $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) + +-include $(top_srcdir)/git.mk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/compile new/usbredir-0.7.1/compile --- old/usbredir-0.7/compile 2014-05-21 15:30:40.000000000 +0200 +++ new/usbredir-0.7.1/compile 2015-11-02 09:03:25.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/config.h.in new/usbredir-0.7.1/config.h.in --- old/usbredir-0.7/config.h.in 2014-05-21 15:30:39.000000000 +0200 +++ new/usbredir-0.7.1/config.h.in 2015-11-02 09:03:25.000000000 +0100 @@ -30,8 +30,7 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/configure.ac new/usbredir-0.7.1/configure.ac --- old/usbredir-0.7/configure.ac 2014-05-21 15:27:39.000000000 +0200 +++ new/usbredir-0.7.1/configure.ac 2015-10-30 15:44:08.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ(2.63) -AC_INIT([usbredir], [0.7]) +AC_INIT([usbredir], [0.7.1]) AC_CONFIG_SRCDIR([configure.ac]) AM_CONFIG_HEADER([config.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/missing new/usbredir-0.7.1/missing --- old/usbredir-0.7/missing 2014-05-21 15:30:40.000000000 +0200 +++ new/usbredir-0.7.1/missing 2015-11-02 09:03:25.000000000 +0100 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usb-redirection-protocol.txt new/usbredir-0.7.1/usb-redirection-protocol.txt --- old/usbredir-0.7/usb-redirection-protocol.txt 2014-05-19 11:43:37.000000000 +0200 +++ new/usbredir-0.7.1/usb-redirection-protocol.txt 2015-05-11 12:00:22.000000000 +0200 @@ -855,7 +855,7 @@ Values can be either in decimal format, or in hexadecimal format pre-fixed with 0x, a value of -1 can be used to allow any value. -All rules of a filter are concatonated, separated by the '|' character +All rules of a filter are concatenated, separated by the '|' character to form a single usredirfilter string: <rule1>|<rule2>|<rule3> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirhost/Makefile.am new/usbredir-0.7.1/usbredirhost/Makefile.am --- old/usbredir-0.7/usbredirhost/Makefile.am 2012-01-03 15:45:13.000000000 +0100 +++ new/usbredir-0.7.1/usbredirhost/Makefile.am 2015-05-11 12:00:22.000000000 +0200 @@ -11,3 +11,5 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libusbredirhost.pc + +-include $(top_srcdir)/git.mk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirhost/usbredirhost.c new/usbredir-0.7.1/usbredirhost/usbredirhost.c --- old/usbredir-0.7/usbredirhost/usbredirhost.c 2013-11-19 13:52:36.000000000 +0100 +++ new/usbredir-0.7.1/usbredirhost/usbredirhost.c 2015-10-30 15:44:08.000000000 +0100 @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <errno.h> #include <unistd.h> @@ -109,6 +110,7 @@ usbredirparser_read read_func; usbredirparser_write write_func; usbredirhost_flush_writes flush_writes_func; + usbredirhost_buffered_output_size buffered_output_size_func; void *func_priv; int verbose; libusb_context *ctx; @@ -130,6 +132,11 @@ struct usbredirtransfer transfers_head; struct usbredirfilter_rule *filter_rules; int filter_rules_count; + struct { + uint64_t higher; + uint64_t lower; + bool dropping; + } iso_threshold; }; struct usbredirhost_dev_ids { @@ -139,6 +146,7 @@ static const struct usbredirhost_dev_ids usbredirhost_reset_blacklist[] = { { 0x1210, 0x001c }, + { 0x2798, 0x0001 }, { -1, -1 } /* Terminating Entry */ }; @@ -1002,6 +1010,30 @@ } } +static int usbredirhost_can_write_iso_package(struct usbredirhost *host) +{ + uint64_t size; + + if (!host->buffered_output_size_func) + return true; + + size = host->buffered_output_size_func(host->func_priv); + if (size >= host->iso_threshold.higher) { + if (!host->iso_threshold.dropping) + DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold", + size, host->iso_threshold.higher); + host->iso_threshold.dropping = true; + } else if (size < host->iso_threshold.lower) { + if (host->iso_threshold.dropping) + DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold", + size, host->iso_threshold.lower); + + host->iso_threshold.dropping = false; + } + + return !host->iso_threshold.dropping; +} + static void usbredirhost_send_stream_data(struct usbredirhost *host, uint64_t id, uint8_t ep, uint8_t status, uint8_t *data, int len) { @@ -1027,8 +1059,10 @@ .status = status, .length = len, }; - usbredirparser_send_iso_packet(host->parser, id, &iso_packet, - data, len); + + if (usbredirhost_can_write_iso_package(host)) + usbredirparser_send_iso_packet(host->parser, id, &iso_packet, + data, len); break; } case usb_redir_type_bulk: { @@ -1119,6 +1153,16 @@ FLUSH(host); } +static void usbredirhost_set_iso_threshold(struct usbredirhost *host, + uint8_t pkts_per_transfer, uint8_t transfer_count, uint16_t max_packetsize) +{ + uint64_t reference = pkts_per_transfer * transfer_count * max_packetsize; + host->iso_threshold.lower = reference / 2; + host->iso_threshold.higher = reference * 3; + DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes", + host->iso_threshold.higher, host->iso_threshold.lower); +} + /* Called from both parser read and packet complete callbacks */ static void usbredirhost_alloc_stream_unlocked(struct usbredirhost *host, uint64_t id, uint8_t ep, uint8_t type, uint8_t pkts_per_transfer, @@ -1177,6 +1221,10 @@ host->endpoint[EP2I(ep)].transfer[i], ISO_TIMEOUT); libusb_set_iso_packet_lengths( host->endpoint[EP2I(ep)].transfer[i]->transfer, pkt_size); + + usbredirhost_set_iso_threshold( + host, pkts_per_transfer, transfer_count, + host->endpoint[EP2I(ep)].max_packetsize); break; case usb_redir_type_bulk: libusb_fill_bulk_transfer( @@ -1357,6 +1405,17 @@ /**************************************************************************/ +void usbredirhost_set_buffered_output_size_cb(struct usbredirhost *host, + usbredirhost_buffered_output_size buffered_output_size_func) +{ + if (!host) { + ERROR("invalid usbredirhost"); + return; + } + + host->buffered_output_size_func = buffered_output_size_func; +} + /* Return value: 0 All ok 1 Packet borked, continue with next packet / urb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirhost/usbredirhost.h new/usbredir-0.7.1/usbredirhost/usbredirhost.h --- old/usbredir-0.7/usbredirhost/usbredirhost.h 2013-05-13 10:27:56.000000000 +0200 +++ new/usbredir-0.7.1/usbredirhost/usbredirhost.h 2015-10-30 15:44:08.000000000 +0100 @@ -33,6 +33,8 @@ typedef void (*usbredirhost_flush_writes)(void *priv); +typedef uint64_t (*usbredirhost_buffered_output_size)(void *priv); + /* This function creates an usbredirhost instance, including its embedded libusbredirparser instance and sends the initial usb_redir_hello packet to the usb-guest. @@ -114,6 +116,18 @@ int usbredirhost_set_device(struct usbredirhost *host, libusb_device_handle *usb_dev_handle); +/* Call this function to set a callback in usbredirhost. + The usbredirhost_buffered_output_size callback should return the + application's pending writes buffer size (in bytes). + + usbredirhost will set two levels of threshold based in the information + provided by the usb device. In case the application's buffer is increasing + too much then usbredirhost uses the threshold limits to drop isochronous + packages but still send full frames whenever is possible. +*/ +void usbredirhost_set_buffered_output_size_cb(struct usbredirhost *host, + usbredirhost_buffered_output_size buffered_output_size_func); + /* Call this whenever there is data ready for the usbredirhost to read from the usb-guest returns 0 on success, or an error code from the below enum on error. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirparser/Makefile.am new/usbredir-0.7.1/usbredirparser/Makefile.am --- old/usbredir-0.7/usbredirparser/Makefile.am 2013-05-13 10:27:56.000000000 +0200 +++ new/usbredir-0.7.1/usbredirparser/Makefile.am 2015-05-11 12:00:22.000000000 +0200 @@ -13,3 +13,5 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libusbredirparser-0.5.pc + +-include $(top_srcdir)/git.mk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirparser/usbredirfilter.c new/usbredir-0.7.1/usbredirparser/usbredirfilter.c --- old/usbredir-0.7/usbredirparser/usbredirfilter.c 2012-09-26 12:37:50.000000000 +0200 +++ new/usbredir-0.7.1/usbredirparser/usbredirfilter.c 2015-10-19 11:52:48.000000000 +0200 @@ -172,7 +172,7 @@ uint16_t vendor_id, uint16_t product_id, uint16_t device_version_bcd, int flags) { - int i, rc; + int i, rc, num_skipped=0; if (usbredirfilter_verify(rules, rules_count)) return -EINVAL; @@ -190,9 +190,10 @@ for (i = 0; i < interface_count; i++) { if (!(flags & usbredirfilter_fl_dont_skip_non_boot_hid) && interface_count > 1 && interface_class[i] == 0x03 && - interface_subclass[i] == 0x00 && interface_protocol[i] == 0x00) + interface_subclass[i] == 0x00 && interface_protocol[i] == 0x00) { + num_skipped++; continue; - + } rc = usbredirfilter_check1(rules, rules_count, interface_class[i], vendor_id, product_id, device_version_bcd, flags & usbredirfilter_fl_default_allow); @@ -200,6 +201,20 @@ return rc; } + /* If all interfaces were skipped, then force check on that device, + * by recursively calling this function with a flag that forbids + * skipping (usbredirfilter_fl_dont_skip_non_boot_hid) + */ + if (num_skipped == interface_count) { + rc = usbredirfilter_check(rules, rules_count, + device_class, device_subclass, device_protocol, + interface_class, interface_subclass, + interface_protocol, interface_count, + vendor_id, product_id, device_version_bcd, + flags | usbredirfilter_fl_dont_skip_non_boot_hid); + return rc; + } + return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirparser/usbredirparser.c new/usbredir-0.7.1/usbredirparser/usbredirparser.c --- old/usbredir-0.7/usbredirparser/usbredirparser.c 2013-10-19 20:36:05.000000000 +0200 +++ new/usbredir-0.7.1/usbredirparser/usbredirparser.c 2015-10-29 16:57:50.000000000 +0100 @@ -161,7 +161,7 @@ { struct usbredirparser_priv *parser = (struct usbredirparser_priv *)parser_pub; - struct usb_redir_hello_header hello; + struct usb_redir_hello_header hello = { { 0 }, }; parser->flags = (flags & ~usbredirparser_fl_no_hello); if (parser->callb.alloc_lock_func) { @@ -1682,10 +1682,24 @@ memcpy(orig_caps, parser->our_caps, i); if (unserialize_data(parser, &state, &remain, &data, &i, "our_caps")) return -1; - if (memcmp(parser->our_caps, orig_caps, - USB_REDIR_CAPS_SIZE * sizeof(int32_t)) != 0) { - ERROR("error unserialize caps mismatch"); - return -1; + for (i =0; i < USB_REDIR_CAPS_SIZE; i++) { + if (parser->our_caps[i] != orig_caps[i]) { + /* orig_caps is our original settings + * parser->our_caps is off the wire. + * We want to allow reception from an older + * usbredir that doesn't have all our features. + */ + if (parser->our_caps[i] & ~orig_caps[i]) { + /* Source has a cap we don't */ + ERROR("error unserialize caps mismatch ours: %x recv: %x", + orig_caps[i], parser->our_caps[i]); + return -1; + } else { + /* We've got a cap the source doesn't - that's OK */ + WARNING("unserialize missing some caps; ours: %x recv: %x", + orig_caps[i], parser->our_caps[i]); + } + } } data = (uint8_t *)parser->peer_caps; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirparser/usbredirproto.h new/usbredir-0.7.1/usbredirparser/usbredirproto.h --- old/usbredir-0.7/usbredirparser/usbredirproto.h 2013-11-19 10:25:12.000000000 +0100 +++ new/usbredir-0.7.1/usbredirparser/usbredirproto.h 2015-10-30 15:44:08.000000000 +0100 @@ -46,7 +46,7 @@ extern "C" { #endif -#define USBREDIR_VERSION 0x000700 /* 0.7 [.0] */ +#define USBREDIR_VERSION 0x000701 /* 0.7 [.0] */ enum { usb_redir_success, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirserver/usbredirserver.c new/usbredir-0.7.1/usbredirserver/usbredirserver.c --- old/usbredir-0.7/usbredirserver/usbredirserver.c 2013-09-05 16:24:56.000000000 +0200 +++ new/usbredir-0.7.1/usbredirserver/usbredirserver.c 2015-05-11 12:00:22.000000000 +0200 @@ -35,6 +35,7 @@ #include <sys/types.h> #include <sys/time.h> #include <netdb.h> +#include <netinet/in.h> #include "usbredirhost.h" @@ -206,14 +207,14 @@ case 'p': port = strtol(optarg, &endptr, 10); if (*endptr != '\0') { - fprintf(stderr, "Inalid value for --port: '%s'\n", optarg); + fprintf(stderr, "Invalid value for --port: '%s'\n", optarg); usage(1, argv[0]); } break; case 'v': verbose = strtol(optarg, &endptr, 10); if (*endptr != '\0') { - fprintf(stderr, "Inalid value for --verbose: '%s'\n", optarg); + fprintf(stderr, "Invalid value for --verbose: '%s'\n", optarg); usage(1, argv[0]); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirtestclient/Makefile.am new/usbredir-0.7.1/usbredirtestclient/Makefile.am --- old/usbredir-0.7/usbredirtestclient/Makefile.am 2011-11-25 18:14:57.000000000 +0100 +++ new/usbredir-0.7.1/usbredirtestclient/Makefile.am 2015-05-11 12:00:22.000000000 +0200 @@ -3,3 +3,5 @@ usbredirtestclient_SOURCES = usbredirtestclient.c usbredirtestclient_LDADD = $(top_builddir)/usbredirparser/libusbredirparser.la usbredirtestclient_CFLAGS = -I$(top_srcdir)/usbredirparser + +-include $(top_srcdir)/git.mk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/usbredir-0.7/usbredirtestclient/usbredirtestclient.c new/usbredir-0.7.1/usbredirtestclient/usbredirtestclient.c --- old/usbredir-0.7/usbredirtestclient/usbredirtestclient.c 2013-05-13 10:27:56.000000000 +0200 +++ new/usbredir-0.7.1/usbredirtestclient/usbredirtestclient.c 2015-05-11 12:00:22.000000000 +0200 @@ -36,6 +36,7 @@ #include <sys/types.h> #include <sys/time.h> #include <netdb.h> +#include <netinet/in.h> #include "usbredirparser.h" /* Macros to go from an endpoint address to an index for our ep array */ @@ -404,6 +405,7 @@ } usbredirparser_send_control_packet(parser, id, &control_packet, data, data_len); + free(data); printf("Send control packet with id: %u\n", id); id++; return 1;