X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_socket.c;h=c4736dd184bbf495a544c6acabce8b94ce6319ee;hb=3ad91649ab3f5b74f08ac049683ea1a75e63535c;hp=ee5bc92f409c6c8f0877ca4a9e38410222ae5810;hpb=ae2948e2c649d8e63252d4b665f29b268858294e;p=palacios.git diff --git a/palacios/src/palacios/vmm_socket.c b/palacios/src/palacios/vmm_socket.c index ee5bc92..c4736dd 100644 --- a/palacios/src/palacios/vmm_socket.c +++ b/palacios/src/palacios/vmm_socket.c @@ -27,7 +27,7 @@ struct v3_socket_hooks * sock_hooks = 0; -static int v3_socket_api_test(void); +//int v3_socket_api_test(void); void V3_Init_Sockets(struct v3_socket_hooks * hooks) { @@ -36,7 +36,7 @@ void V3_Init_Sockets(struct v3_socket_hooks * hooks) { PrintDebug("V3 sockets inited\n"); - v3_socket_api_test(); + //v3_socket_api_test(); return; } @@ -118,8 +118,9 @@ void v3_zero_sockset(struct v3_sock_set * sock_set) { } } -#if 1 -static int +#if 0 + +int v3_socket_api_test(void) { unsigned int port; @@ -131,7 +132,7 @@ v3_socket_api_test(void) PrintDebug("\nIn Palacios: Test V3_Socket Macros\n"); sock = V3_Create_TCP_Socket(); - if( sock == NULL ){ + if( ((int)sock) < 0 ){ PrintDebug( "ERROR: tcp_socket() failed!\n"); return -1; } @@ -150,7 +151,7 @@ v3_socket_api_test(void) PrintDebug( "Going into mainloop: server listening on port %d\n", port); - client = V3_Accept_Socket(sock, &remote_ip , &port); + client = V3_Accept_Socket(sock, &remote_ip, &port); PrintDebug(" New connection from %d port: %d\n", remote_ip, port); @@ -159,7 +160,7 @@ v3_socket_api_test(void) while(1) { V3_Send(client, buf, rc); - rc = V3_Recv(client, buf, sizeof(buf)-1); + rc = V3_Recv(client, buf, sizeof(buf)-1); if( rc <= 0 ){ PrintDebug( "Closed connection\n"); V3_Close_Socket(client); @@ -177,6 +178,7 @@ v3_socket_api_test(void) #endif + #if 0 static int