I am having trouble trying to build a global buffer between TCP_DATAREADY callbacks. I have attached the code for the callback. Here are the lines that are giving me trouble.
strcat(ptrMem->pszScript,&szBuffer[12]);
printf(ptrMem->pszScript);
It seems that each strcat is working like a strcpy and eradicating the previous value of the strcat. The linked list is declared globally. The pointer to the particular node I am dealing with is re-found each time I get a new buffer in with TCP_DATAREADY. When it is all done, and I try printing with printf(ptrMem->pszScript), I only print the last buffer, not the accumulated buffers. Please help. I am out of ideas.