(file) Return to wsock32_main.c CVS log (file) (dir) Up to [RizwankCVS] / wine4 / wine / dlls / wsock32 / tests

Diff for /wine4/wine/dlls/wsock32/tests/wsock32_main.c between version 1.13 and 1.14

version 1.13, 2005/02/22 05:38:50 version 1.14, 2005/02/22 05:56:04
Line 139 
Line 139 
         clientsDone++;         clientsDone++;
 } }
  
 void ProcessConnection(SOCKET *ConnectedSocket)  void ProcessConnection(struct ServerThread t)
 { {
         // this will handle all connections to the server, it's in its own function to allow for multithreading         // this will handle all connections to the server, it's in its own function to allow for multithreading
         int bClosed;         int bClosed;
         bClosed = close(ConnectedSocket);          bClosed = close(t.ConnectedSocket);
         //ok(bClosed,"Error closing socket");         //ok(bClosed,"Error closing socket");
 } }
  
Line 167 
Line 167 
  
         for (ThreadIndex = 0; ThreadIndex < NUM_CLIENTS; ThreadIndex++)         for (ThreadIndex = 0; ThreadIndex < NUM_CLIENTS; ThreadIndex++)
         {         {
                         Threads[ThreadIndex].ConnectedSocket = accept(sock, (SOCKADDR *) &Threads[ThreadIndex].Client, &sizeof(SOCKADDR_IN)); // this can be modified to include the address of the remote socket                          Threads[ThreadIndex].ConnectedSocket = accept(sock, (SOCKADDR *) &Threads[ThreadIndex].Client, &sizeofSOCKADDR_IN); // this can be modified to include the address of the remote socket
                         ok(Threads[ThreadIndex].ConnectedSockets != INVALID_SOCKET, "error accepting socket");                          ok(Threads[ThreadIndex].ConnectedSocket != INVALID_SOCKET, "error accepting socket");
  
                         Threads[ThreadIndex].ServerThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) &ProcessConnection, &(Threads[ThreadIndex].ConnectedSocket), 0, &Threads[ThreadIndex].ServerThreadID);                         Threads[ThreadIndex].ServerThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) &ProcessConnection, &(Threads[ThreadIndex].ConnectedSocket), 0, &Threads[ThreadIndex].ServerThreadID);
         }         }
Line 207 
Line 207 
 { {
         // initialize application         // initialize application
         WSADATA wsaData;         WSADATA wsaData;
   int wsastartup_result = WSAStartup(MAKEWORD(1,1), &wsaData);    int wsastartup_result;
         if ( (LOBYTE(wsaData.wVersion) != 1) && (HIBYTE(wsaData.wVersion) != 1) )          int versionOK;
         {  
                 ok( 0 , "WSAStartup returns an incompatible sockets version");          wsastartup_result = WSAStartup(MAKEWORD(1,1), &wsaData);
           versionOK = (LOBYTE(wsaData.wVersion) == 1) && (HIBYTE(wsaData.wVersion) == 1);
   
           ok( versionOK , "WSAStartup returns an incompatible sockets version");
           if ( !versionOK ) {
                 WSACleanup();                 WSACleanup();
                 exit(0);                 exit(0);
         }         }
Line 218 
Line 222 
    ok((wsastartup_result == NO_ERROR), "Error in WSAStartup()");    ok((wsastartup_result == NO_ERROR), "Error in WSAStartup()");
 } }
  
   
 START_TEST(wsock32_main) START_TEST(wsock32_main)
 { {
   trace("test 1 of 2:\n");   trace("test 1 of 2:\n");


Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

Rizwan Kassim
Powered by
ViewCVS 0.9.2