Skip to content

Commit

Permalink
Fixed bug in dynamic buffer
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1052 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Dec 4, 2003
1 parent f1ec732 commit f782de9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modeq/runtime/socketimpl.c
Expand Up @@ -88,11 +88,10 @@ RML_BEGIN_LABEL(Socket__handlerequest)
RML_TAILCALLK(rmlFC);
}
len = recv(sock,buf,bufSize,0);

FD_ZERO(&sockSet);
FD_SET(sock,&sockSet); // create fd set of
if (len == bufSize) { // If we filled the buffer, check for more
while ( select(1,&sockSet,NULL,NULL,&timeout) > 0) {
while ( select(sock+1,&sockSet,NULL,NULL,&timeout) > 0) {
tmpBufSize*=(int)(bufSize*1.4);
nAdditionalElts = tmpBufSize-bufSize;
tmpBuf=(char*)malloc(tmpBufSize);
Expand Down

0 comments on commit f782de9

Please sign in to comment.