event checking in test's slave

git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@880 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
drdani 2006-08-25 12:18:28 +00:00 committed by Adam Visegradi
parent 3327cc15b7
commit 555fb9b896
1 changed files with 26 additions and 0 deletions

View File

@ -76,7 +76,33 @@ main(int argc, char *argv[])
cyc--;
i++;
printf("\nCycle %d. starting...\n", i);
{
DC_ClientEvent *e= DC_checkClientEvent();
if (e)
{
switch (e->type)
{
case DC_CLIENT_CHECKPOINT:
{
break;
}
case DC_CLIENT_FINISH:
{
break;
}
case DC_CLIENT_MESSAGE:
{
printf("At cyc=%d got a message: \"%s\"\n", i,
e->message);
break;
}
}
DC_destroyClientEvent(e);
}
}
sleep(1);
if (sub &&
i%sub == 0)
send_subresult(i);