update pilot-link-libs to 0.9.5nb2:

fix error recovery (in SLP and PADP protocols)
This commit is contained in:
dillo 2002-01-30 10:05:13 +00:00
parent 4d3918b43d
commit cffbbdc06a
4 changed files with 55 additions and 3 deletions

View file

@ -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]

View file

@ -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

View file

@ -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) {

View file

@ -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;