Hi,
I wrote a simple
TCP-server program base on Rowley webserver demo (from FreeRTOS
website) using lwip for ARM7. To test my server, I use Telnet
from Windows.
But I have a problem with this part of
my code :
-----------------------------------------------------------------
portCHAR *pcRxString;
char * command;
for(;;)
{
pxRxBuffer =
netconn_recv( pxNetCon );
if( pxRxBuffer !=
NULL )
{
netbuf_data( pxRxBuffer, ( void * ) &pcRxString, &usLength
);
strcat(command, pcRxString);
/* Do
something special */
netbuf_delete( pxRxBuffer );
}
}
-----------------------------------------------------------------
In
Telnet, when I hit a caracter, the server receive the data, copy it in
the command array and wait the next caracter. When I hit a second
caracter, the server freeze in netbuf_data function, precisely at
buf->ptr->payload.
Did
someone know why ? How can I correct this
?
Regards
Nico