I have tested this now and it seems to be ok and ought to fix the obvious bug.
Regards,
Tim.
On Thu, 9 May 2002, Tim Woodall wrote:
> On Mon, 6 May 2002, Duncan Sands wrote:
>
> >
> > I've noticed some problems with async mode: occasional network
> > failures (reproducible) that disappear without async. For example,
> > posting data to certain web pages (get time out), the backup program
> > unison timing out while waiting for info from my machine. These problems
> > occurred every time I tried them (over the space of two days) but went
> > away the moment I turned off async. What can I do to help track this down?
> >
> OK. I've had chance to have another look at this and I have fscked up :-(
>
> (The line numbers won't match exactly as I have some extra changes but
> see if this makes any difference)
>
> (Untested yet - I need to reboot my firewall as I don't have the correct
> modules in this kernel)
>
> Regards,
>
> Tim.
>
>
> Index: src/pppoa3.c
> ===================================================================
> RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
> retrieving revision 1.23
> diff -u -r1.23 pppoa3.c
> --- src/pppoa3.c 18 Apr 2002 19:46:28 -0000 1.23
> +++ src/pppoa3.c 9 May 2002 18:17:45 -0000
> @@ -1190,10 +1192,8 @@
> report(2, REPORT_DEBUG|REPORT_DATE|REPORT_DUMP, "PPP
>packet read from ppp(d) (%d bytes long)\n", async_buf, data, data);
> }
>
> - /* ASSERT data>0 here */
> - --data;
> -
> - if(PPPState == STATE_WAITFOR_FRAME_ADDR) {
> + if(data && PPPState == STATE_WAITFOR_FRAME_ADDR) {
> + data--;
> if (*ptr++ == FRAME_ADDR) {
> PPPState = STATE_DROP_PROTO;
> PPPPacketSize = 0;
> @@ -1201,15 +1201,17 @@
> }
> }
>
> - if(PPPState == STATE_DROP_PROTO) {
> + if(data && PPPState == STATE_DROP_PROTO) {
> + data--;
> if (*ptr++ == (FRAME_CTRL ^ FRAME_ENC)) {
> PPPState = STATE_BUILDING_PACKET;
> }
> }
>
> /* Start building frame */
> - if(PPPState == STATE_BUILDING_PACKET) {
> + if(data && PPPState == STATE_BUILDING_PACKET) {
> unsigned char c = *ptr++;
> + data--;
> switch(c) {
> case FRAME_ESC:
> PPPXorValue = FRAME_ENC;
>
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://tjw.hn.org/ http://www.locofungus.btinternet.co.uk/
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe