From 6fbd2a72122d6bcd70edbf599baa7465e3e9acb6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 2 Aug 2009 07:35:00 +0200 Subject: include config.h and defined ENABLE_HACKS Use --disable-hacks to NOT enable hacks like the N*128/N*512 hack when running configure. Hacks are enabled by default. --- src/usbmux.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/usbmux.c b/src/usbmux.c index 2157e05..37538da 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -15,6 +15,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include #include @@ -845,6 +848,7 @@ int usbmux_send(usbmux_client_t client, const char *data, uint32_t datalen, uint32_t curlen = datalen; uint32_t packetsize = blocksize; +#ifdef ENABLE_HACKS // BEGIN HACK if ((blocksize % 128) == 0) { int cutoff = 28; @@ -886,6 +890,7 @@ int usbmux_send(usbmux_client_t client, const char *data, uint32_t datalen, fullsendresult -= sizeof(usbmux_tcp_header); } // END HACK +#endif // Set the length client->header->length = packetsize; -- cgit v1.1-32-gdbae