--- a/genericopenlibs/openenvcore/libc/test/testsocket/src/tsocketblocks.cpp Tue Aug 31 16:54:36 2010 +0300
+++ b/genericopenlibs/openenvcore/libc/test/testsocket/src/tsocketblocks.cpp Wed Sep 01 12:36:54 2010 +0100
@@ -1635,11 +1635,6 @@
}
newsock_fd = accept(sock_fd,(sockaddr*)&new_socket,0);
- if (newsock_fd > 0)
- {
- ret = KErrAccept;
- goto close;
- }
if (errno != EINVAL )
{
INFO_PRINTF2(_L("Accept return with errno = %d"), errno);
@@ -2101,7 +2096,7 @@
printf("[Client] send data to server fail\n");
break;
}
-//int bytes = ret;
+int bytes = ret;
printf("[Client] send %d bytes: %s\n",ret,tcpdata);
char buff[50];
@@ -2132,7 +2127,7 @@
TInt CTestSocket::TestSendReturnValue( )
{
- // int ret1=0;
+ int ret1=0;
pthread_t t;
int flag = 0;
_LIT(KWelcome,"Hello Open C and OPENENV!\n");
@@ -2147,7 +2142,7 @@
int set = 1;
setsockopt(servsockid, SOL_SOCKET, SO_REUSEADDR, &set, sizeof(set));
- // int result = -1;
+ int result = -1;
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons(5000);
@@ -2170,7 +2165,7 @@
}
- ret = pthread_create(&t, 0 , myclie, (void*) 5000 );
+ ret1= pthread_create(&t, 0 , myclie, (void*) 5000 );
socklen_t len = sizeof(addr);
@@ -2207,7 +2202,7 @@
printf("[Server] send data to client %d bytes: %s\n", ret, buff);
}
close(clientid);
- // result = 0;
+ result = 0;
}
while (0);
close(servsockid);
@@ -3420,10 +3415,6 @@
sleep(5);
ret = sendto(sock,&buf,sizeof(buf),0,(struct sockaddr*)&server,sizeof(struct sockaddr));
ret = sendto(sock,&buf,sizeof(buf),0,(struct sockaddr*)&server,sizeof(struct sockaddr));
- if( ret == -1 )
- {
- printf("sendto failed \n");
- }
close(sock);
return NULL;
}