From cffbbdc06a06d6e7d2d9009086e08114a008aea9 Mon Sep 17 00:00:00 2001 From: dillo Date: Wed, 30 Jan 2002 10:05:13 +0000 Subject: [PATCH] update pilot-link-libs to 0.9.5nb2: fix error recovery (in SLP and PADP protocols) --- comms/pilot-link-libs/Makefile | 4 ++-- comms/pilot-link/distinfo | 4 +++- comms/pilot-link/patches/patch-ae | 21 +++++++++++++++++++++ comms/pilot-link/patches/patch-af | 29 +++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 comms/pilot-link/patches/patch-ae create mode 100644 comms/pilot-link/patches/patch-af diff --git a/comms/pilot-link-libs/Makefile b/comms/pilot-link-libs/Makefile index 9c86710573e2..6eef95220ee5 100644 --- a/comms/pilot-link-libs/Makefile +++ b/comms/pilot-link-libs/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.3 2001/11/29 01:12:27 hubertf Exp $ +# $NetBSD: Makefile,v 1.4 2002/01/30 10:05:14 dillo Exp $ # .include "../../comms/pilot-link/Makefile.common" PKGNAME= pilot-link-libs-${PILOT_LINK_VERS} -PKGREVISION= 1 +PKGREVISION= 2 COMMENT= Libraries for talking to the 3Com Pilot PDA CONFLICTS+= pilot-link-0.8.* pilot-link-0.9.[0-3] diff --git a/comms/pilot-link/distinfo b/comms/pilot-link/distinfo index e1006b87651a..b6251852e6ed 100644 --- a/comms/pilot-link/distinfo +++ b/comms/pilot-link/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2001/10/23 20:46:46 jlam Exp $ +$NetBSD: distinfo,v 1.7 2002/01/30 10:05:13 dillo Exp $ SHA1 (pilot-link.0.9.5.tar.bz2) = cb026637bebad22a273b38edfd8633853d13e065 Size (pilot-link.0.9.5.tar.bz2) = 424794 bytes @@ -6,3 +6,5 @@ SHA1 (patch-aa) = 17e0beeb35335b8ed0d2fe06e67327be82ad5148 SHA1 (patch-ab) = 098d934009c87949a4d6f3dbaed78c9803df1029 SHA1 (patch-ac) = 5d37048f9524e8d96b387c4ee22b4f91d4d4b6d7 SHA1 (patch-ad) = 4b2673db8f1ed28ab8e29a5d43dcecd44f0ec7d6 +SHA1 (patch-ae) = 8f28d723dda9347817a4089bd7629895e1240494 +SHA1 (patch-af) = 4033574cf8373fdb6f44dd3ddb75e9d8d867c023 diff --git a/comms/pilot-link/patches/patch-ae b/comms/pilot-link/patches/patch-ae new file mode 100644 index 000000000000..9cb83241ab43 --- /dev/null +++ b/comms/pilot-link/patches/patch-ae @@ -0,0 +1,21 @@ +$NetBSD: patch-ae,v 1.1 2002/01/30 10:05:13 dillo Exp $ + +diff -r -u pilot-link.0.9.5/libsock/padp.c work/pilot-link.0.9.5/libsock/padp.c +--- libsock/padp.c.orig Tue Jun 19 07:50:11 2001 ++++ libsock/padp.c Wed Jan 30 10:09:18 2002 +@@ -173,13 +173,13 @@ + && (padp.type == + (unsigned char) padData) + && (slp->id == ps->xid) +- && (len == 0)) { ++ && (len == count+tlen)) { + fprintf(stderr, "Missing ack\n"); + /* Incoming padData from response to + this transmission. Maybe the Ack + was lost */ + /* Don't consume packet, and return success. */ +- count = 0; ++ count = len; + goto done; + return 0; + } else if (padp.type == (unsigned char) 4) { diff --git a/comms/pilot-link/patches/patch-af b/comms/pilot-link/patches/patch-af new file mode 100644 index 000000000000..bed4f74766e4 --- /dev/null +++ b/comms/pilot-link/patches/patch-af @@ -0,0 +1,29 @@ +$NetBSD: patch-af,v 1.1 2002/01/30 10:05:13 dillo Exp $ + +diff -r -u pilot-link.0.9.5/libsock/slp.c work/pilot-link.0.9.5/libsock/slp.c +--- libsock/slp.c.orig Wed Jun 6 10:16:56 2001 ++++ libsock/slp.c Wed Jan 30 09:44:42 2002 +@@ -136,6 +141,8 @@ + ps->mac->state++; + ps->mac->expect = 1; + ps->mac->buf++; ++ } else if (v == 0xbe) { ++ ps->mac->expect = 1; + } + break; + +@@ -143,9 +155,14 @@ + if (v == 0xed) { + /* OK. we think we're sync'ed, so go for the rest + of the header */ + ps->mac->state++; + ps->mac->expect = 7; + ps->mac->buf++; ++ } else if (v == 0xbe) { ++ --ps->mac->buf; ++ ps->mac->buf[-1] = v; ++ ps->mac->expect = 1; ++ ps->mac->state = 2; + } + break; +