corrected bad specified timeouts (ms versus us) M.Z.

This commit is contained in:
cvs
2004-11-17 11:25:43 +00:00
parent db94826248
commit 4e06a17518
4 changed files with 66 additions and 55 deletions

View File

@@ -9,6 +9,10 @@
Use internal connection.
Mark Koennecke, July 2002
changed timeout units in NETRead from us to ms
the timing could be optimized (no need for SicsWait
when timeout properly choosen (could be in the region of 1 second )
M.Zolliker, August 04
*/
#include "sics.h"
#include "network.h"
@@ -34,7 +38,7 @@ static void syncLogin(void)
connection = NETConnect(hostname, port);
for(i = 0; i < 10; i++)
{
NETRead(connection,pBueffel,1020,10*1000);
NETRead(connection,pBueffel,1020,10); /* 10 ms M.Z */
if(strstr(pBueffel,"OK") != NULL)
{
break;
@@ -60,7 +64,7 @@ static void syncLogin(void)
for(i = 0; i < 60; i++)
{
memset(pRead,0,80);
test = NETRead(connection,pRead,70,10*1000);
test = NETRead(connection,pRead,70,10); /* 10 ms M.Z. */
if(test < 0)
{
NETClosePort(connection);
@@ -212,7 +216,7 @@ int Synchronize(SConnection *pCon, SicsInterp *pSics, void *pData,
for(i = 0; i < 60; i++)
{
pRead[0] = '\0';
test = NETRead(connection,pRead,75,20*1000);
test = NETRead(connection,pRead,75,20); /* 20 ms M.Z. */
if(test < 0)
{
NETClosePort(connection);