This commit is contained in:
Carl-Benedikt Krüger 2011-08-03 13:54:36 +02:00
parent c121c38912
commit b89c4096a5
2 changed files with 8 additions and 8 deletions

View file

@ -9,9 +9,9 @@ int cli_sendBuffer(Client* cli,void* pBuffer, unsigned int bufferlen)
int iResult;
ClientEventArgs e;
//abfragen ob client existiert!! wichtig
// if (cli->sSocket != SOCKET_ERROR)
// {
iResult= send(cli->sSocket,(char*)pBuffer,bufferlen,0);
if (cli->sSocket != SOCKET_ERROR)
{
iResult= send(cli->sSocket,(char*)pBuffer,bufferlen,0);
if (cli->_OnWrite != 0)
{
e.dwLen = iResult;
@ -19,9 +19,9 @@ int cli_sendBuffer(Client* cli,void* pBuffer, unsigned int bufferlen)
cli->_OnWrite(&e);
}
return iResult;
// }
// else
// return -3;
}
else
return -3;
}
int cli_ConnectTo(Client* cli,char * pAdresse,unsigned short Port,int webAdresse)

View file

@ -326,7 +326,7 @@ void* client_task(void* e)
while (err)
{
err = cli_ConnectTo(&cli,"192.168.0.1",5555,0);
err = cli_ConnectTo(&cli,"192.168.0.2",5555,0);
SHELLDEBUGPRINTF("retry connect err = %d socket: %d\n",err,cli.sSocket);
}
SHELLDEBUGPRINTF("connected\n");
@ -423,7 +423,7 @@ int test_init(void)
sleep(10);
SHELLDEBUGPRINTF("hello World! I AM CORE NO. %d =) \n",RCCE_ue());
if (!RCCE_ue())
if (RCCE_ue())
create_kernel_task(NULL,server_task,NULL);
else
create_kernel_task(NULL,client_task,NULL);