corrected bad specified timeouts (ms versus us) M.Z.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user