Skip to content
Commit 1f3ee831 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Increase the size of the number of bytes sent from uint16_t to uint32_t in...

Increase the size of the number of bytes sent from uint16_t to uint32_t in order to avoid TCP errors with long sessions.  For exmple:

int hello_main(int argc, char *argv[])
{
   uint32_t i;
   for(i = 0; i < 65536; i++)
    {
      printf("Hello, World!!\n");
    }

  printf("press any key!!\n");
  if (getchar()=='t')
    return 0;
  else
    return 1;
}

When ran in a Telnet session, the "press any key" is not displayed because the tcp session closed unexpectedly with:

tcp_input: ERROR: conn->sndseq xx, conn->unacked xx"

This is fixed by increasing the width of conn->sent to 32-bits to prevent overflow.

From Rony XLN
parent c7a02488
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment