-- v2: dplayx/tests: Test receiving ADDFORWARDREPLY. dplayx: Handle ADDFORWARDREPLY and return error. dplayx/tests: Test receiving REQUESTPLAYERREPLY with error result. dplayx: Check reply result in DP_MSG_SendRequestPlayerId(). dplayx: Use the documented reply layout in DP_MSG_SendRequestPlayerId(). dplayx: Free message header on error path in DP_MSG_SendRequestPlayerId().
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/dplayx_messages.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c index 4ecee05d79e..0568a74cb3d 100644 --- a/dlls/dplayx/dplayx_messages.c +++ b/dlls/dplayx/dplayx_messages.c @@ -276,6 +276,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *
if ( dwMsgSize < sizeof( DPMSG_NEWPLAYERIDREPLY ) ) { + free( msgHeader ); free( lpMsg ); return DPERR_GENERIC; }
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/dplayx_messages.c | 8 -------- dlls/dplayx/dplayx_messages.h | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c index 0568a74cb3d..e851d881c7f 100644 --- a/dlls/dplayx/dplayx_messages.c +++ b/dlls/dplayx/dplayx_messages.c @@ -286,14 +286,6 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *
TRACE( "Received reply for id = 0x%08lx\n", lpcReply->dpidNewPlayerId );
- /* FIXME: I think that the rest of the message has something to do - * with remote data for the player that perhaps I need to setup. - * However, with the information that is passed, all that it could - * be used for is a standardized initialization value, which I'm - * guessing we can do without. Unless the message content is the same - * for several different messages? - */ - free( msgHeader ); free( lpMsg ); } diff --git a/dlls/dplayx/dplayx_messages.h b/dlls/dplayx/dplayx_messages.h index ac0850ef170..f29b52b5ae1 100644 --- a/dlls/dplayx/dplayx_messages.h +++ b/dlls/dplayx/dplayx_messages.h @@ -209,10 +209,10 @@ typedef struct tagDPMSG_NEWPLAYERIDREPLY
DPID dpidNewPlayerId;
- /* Assume that this is data that is tacked on to the end of the message - * that comes from the SP remote data stored that needs to be propagated. - */ - BYTE unknown[36]; /* This appears to always be 0 - not sure though */ + DPSECURITYDESC secDesc; + DWORD sspiProviderOffset; + DWORD capiProviderOffset; + HRESULT result; } DPMSG_NEWPLAYERIDREPLY, *LPDPMSG_NEWPLAYERIDREPLY; typedef const DPMSG_NEWPLAYERIDREPLY* LPCDPMSG_NEWPLAYERIDREPLY;
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/dplayx_messages.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c index e851d881c7f..7ca6ba5a52c 100644 --- a/dlls/dplayx/dplayx_messages.c +++ b/dlls/dplayx/dplayx_messages.c @@ -282,6 +282,14 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID * } lpcReply = lpMsg;
+ if ( FAILED( lpcReply->result ) ) + { + hr = lpcReply->result; + free( msgHeader ); + free( lpMsg ); + return hr; + } + *lpdpidAllocatedId = lpcReply->dpidNewPlayerId;
TRACE( "Received reply for id = 0x%08lx\n", lpcReply->dpidNewPlayerId );
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/tests/dplayx.c | 49 ++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index d5dcd2d9807..f8e74ae727d 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -2132,8 +2132,13 @@ static void checkPlayerList_( int line, IDirectPlay4 *dp, ExpectedPlayer *expect data.actualPlayerCount ); }
-#define check_Open( dp, dpsd, serverDpsd, requestExpected, port, expectedPassword, expectedHr ) check_Open_( __LINE__, dp, dpsd, serverDpsd, requestExpected, port, expectedPassword, expectedHr ) -static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, const DPSESSIONDESC2 *serverDpsd, BOOL requestExpected, unsigned short port, const WCHAR *expectedPassword, HRESULT expectedHr ) +#define check_Open( dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, port, expectedPassword, \ + idReplyHr, expectedHr ) \ + check_Open_( __LINE__, dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, port, expectedPassword, \ + idReplyHr, expectedHr ) +static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, const DPSESSIONDESC2 *serverDpsd, + BOOL idRequestExpected, BOOL forwardRequestExpected, unsigned short port, + const WCHAR *expectedPassword, HRESULT idReplyHr, HRESULT expectedHr ) { SOCKET listenSock; OpenParam *param; @@ -2150,7 +2155,7 @@ static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, cons
param = openAsync( dp, dpsd, DPOPEN_JOIN );
- if ( requestExpected ) + if ( idRequestExpected ) { unsigned short port;
@@ -2161,8 +2166,11 @@ static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, cons
sendSock = connectTcp_( line, port );
- sendRequestPlayerReply( sendSock, port, 0x12345678, DP_OK ); + sendRequestPlayerReply( sendSock, port, 0x12345678, idReplyHr ); + }
+ if ( forwardRequestExpected ) + { receiveAddForwardRequest_( line, recvSock, 0x12345678, expectedPassword, serverDpsd->dwReserved1 );
sendSuperEnumPlayersReply( sendSock, port, 2399, serverDpsd, L"normal" ); @@ -2192,16 +2200,19 @@ static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, cons
hr = IDirectPlayX_Close( dp ); checkHR( DP_OK, hr ); - - closesocket( sendSock ); - closesocket( recvSock ); } else { - hr = openAsyncWait( param, 2000 ); + hr = openAsyncWait( param, 7000 ); ok_( __FILE__, line )( hr == expectedHr, "Open() returned %#lx.\n", hr ); }
+ if ( idRequestExpected ) + { + closesocket( sendSock ); + closesocket( recvSock ); + } + checkNoMoreAccepts_( line, listenSock );
closesocket( listenSock ); @@ -2270,9 +2281,9 @@ static void test_Open(void)
dpsd = dpsdZero; dpsd.dwSize = 0; - check_Open( dp, &dpsd, NULL, FALSE, 2349, NULL, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS );
- check_Open( dp, &dpsdZero, NULL, FALSE, 2349, NULL, DPERR_UNINITIALIZED ); + check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_UNINITIALIZED );
init_TCPIP_provider( dp, "127.0.0.1", 0 );
@@ -2280,19 +2291,19 @@ static void test_Open(void) /* - Checking how strict dplay is with sizes */ dpsd = dpsdZero; dpsd.dwSize = 0; - check_Open( dp, &dpsd, NULL, FALSE, 2349, NULL, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS );
dpsd = dpsdZero; dpsd.dwSize = sizeof( DPSESSIONDESC2 ) - 1; - check_Open( dp, &dpsd, NULL, FALSE, 2349, NULL, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS );
dpsd = dpsdZero; dpsd.dwSize = sizeof( DPSESSIONDESC2 ) + 1; - check_Open( dp, &dpsd, NULL, FALSE, 2349, NULL, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS );
- check_Open( dp, &dpsdZero, NULL, FALSE, 2349, NULL, DPERR_NOSESSIONS ); + check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_NOSESSIONS );
- check_Open( dp, &dpsdAppGuid, NULL, FALSE, 2349, NULL, DPERR_NOSESSIONS ); + check_Open( dp, &dpsdAppGuid, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_NOSESSIONS );
enumSock = bindUdp( 47624 );
@@ -2326,13 +2337,15 @@ static void test_Open(void) break; }
- check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, 2349, L"", DP_OK ); + check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, FALSE, 2349, L"", DPERR_CANTCREATEPLAYER, DPERR_CANTCREATEPLAYER ); + + check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, TRUE, 2349, L"", DP_OK, DP_OK );
dpsd = dpsdAppGuid; dpsd.guidInstance = appGuid2; replyDpsd = normalDpsd; replyDpsd.guidInstance = appGuid2; - check_Open( dp, &dpsd, &replyDpsd, TRUE, 2348, L"", DP_OK ); + check_Open( dp, &dpsd, &replyDpsd, TRUE, TRUE, 2348, L"", DP_OK, DP_OK );
/* Join to protected session */ for ( tryIndex = 0; ; ++tryIndex ) @@ -2363,7 +2376,7 @@ static void test_Open(void)
dpsd = dpsdAppGuid; dpsd.lpszPasswordA = (char *) "hadouken"; - check_Open( dp, &dpsd, &protectedDpsd, TRUE, 2349, L"hadouken", DP_OK ); + check_Open( dp, &dpsd, &protectedDpsd, TRUE, TRUE, 2349, L"hadouken", DP_OK, DP_OK );
closesocket( enumSock );
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/dplay.c | 5 +---- dlls/dplayx/dplayx_messages.c | 34 +++++++++++++++++++++------------- dlls/dplayx/dplayx_messages.h | 8 ++++++-- 3 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 26dfd0279a1..83970be9c41 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -383,6 +383,7 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody,
case DPMSGCMD_GETNAMETABLEREPLY: case DPMSGCMD_NEWPLAYERIDREPLY: + case DPMSGCMD_FORWARDADDPLAYERNACK: case DPMSGCMD_SUPERENUMPLAYERSREPLY: DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize, lpcMessageHeader ); break; @@ -397,10 +398,6 @@ HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody, DP_MSG_ToSelf( This, 1 ); /* This is a hack right now */ break;
- case DPMSGCMD_FORWARDADDPLAYERNACK: - DP_MSG_ErrorReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); - break; - default: FIXME( "Unknown wCommandId %u. Ignoring message\n", wCommandId ); DebugBreak(); diff --git a/dlls/dplayx/dplayx_messages.c b/dlls/dplayx/dplayx_messages.c index 7ca6ba5a52c..90091d0aa03 100644 --- a/dlls/dplayx/dplayx_messages.c +++ b/dlls/dplayx/dplayx_messages.c @@ -495,7 +495,8 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer, WC
/* Send the message */ { - WORD replyCommands[] = { DPMSGCMD_GETNAMETABLEREPLY, DPMSGCMD_SUPERENUMPLAYERSREPLY }; + WORD replyCommands[] = { DPMSGCMD_GETNAMETABLEREPLY, DPMSGCMD_SUPERENUMPLAYERSREPLY, + DPMSGCMD_FORWARDADDPLAYERNACK }; SGBUFFER buffers[ 6 ] = { 0 }; DPSP_SENDEXDATA data = { 0 };
@@ -588,6 +589,25 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer, WC { FIXME( "Name Table reply received: stub\n" ); } + else if( envelope->wCommandId == DPMSGCMD_FORWARDADDPLAYERNACK ) + { + DPSP_MSG_ADDFORWARDREPLY *addForwardReply; + + if( dwMsgSize < sizeof( DPSP_MSG_ADDFORWARDREPLY ) ) + { + free( msgHeader ); + free( lpMsg ); + return DPERR_GENERIC; + } + addForwardReply = (DPSP_MSG_ADDFORWARDREPLY *) envelope; + + hr = addForwardReply->error; + + free( msgHeader ); + free( lpMsg ); + + return hr; + } free( msgHeader ); free( lpMsg ); } @@ -720,15 +740,3 @@ void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) &lpMsg, &dwMsgSize, &msgHeader ); } } - -void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpMsgBody, - DWORD dwMsgBodySize ) -{ - LPCDPMSG_FORWARDADDPLAYERNACK lpcErrorMsg; - - lpcErrorMsg = lpMsgBody; - - ERR( "Received error message %u. Error is %s\n", - wCommandId, DPLAYX_HresultToString( lpcErrorMsg->errorCode) ); - DebugBreak(); -} diff --git a/dlls/dplayx/dplayx_messages.h b/dlls/dplayx/dplayx_messages.h index f29b52b5ae1..e8453200d26 100644 --- a/dlls/dplayx/dplayx_messages.h +++ b/dlls/dplayx/dplayx_messages.h @@ -55,8 +55,6 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer, WC void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId, LPCVOID lpMsgBody, DWORD dwMsgBodySize, const void *msgHeader ); -void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, - LPCVOID lpMsgBody, DWORD dwMsgBodySize ); void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf );
/* Timings -> 1000 ticks/sec */ @@ -255,6 +253,12 @@ typedef struct #define DPLAYI_SUPERPACKEDPLAYER_PARENT_ID_PRESENT 0x100 #define DPLAYI_SUPERPACKEDPLAYER_SHORTCUT_COUNT_SIZE( mask ) (((mask) >> 9) & 0x3)
+typedef struct +{ + DPMSG_SENDENVELOPE envelope; + HRESULT error; +} DPSP_MSG_ADDFORWARDREPLY; + typedef struct { DPMSG_SENDENVELOPE envelope;
From: Anton Baskanov baskanov@gmail.com
--- dlls/dplayx/tests/dplayx.c | 102 ++++++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 24 deletions(-)
diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index f8e74ae727d..8f82f8640fc 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -869,6 +869,12 @@ typedef struct DWORD passwordOffset; } SuperEnumPlayersReply;
+typedef struct +{ + MessageHeader header; + HRESULT result; +} AddForwardReply; + #include "poppack.h"
#define bindUdp( port ) bindUdp_( __LINE__, port ) @@ -1004,6 +1010,7 @@ static int receiveMessage_( int line, SOCKET sock, void *buffer, int size ) static void checkNoMoreMessages_( int line, SOCKET sock ) { struct timeval timeout; + char buffer[ 1024 ]; int wsResult; fd_set fds;
@@ -1011,8 +1018,10 @@ static void checkNoMoreMessages_( int line, SOCKET sock ) FD_SET( sock, &fds ); timeout.tv_sec = 0; timeout.tv_usec = 100000; - wsResult = select( sock + 1, &fds, NULL, &fds, &timeout ); - ok_( __FILE__, line )( !wsResult, "select() returned %d.\n", wsResult ); + select( sock + 1, &fds, NULL, &fds, &timeout ); + + wsResult = recv( sock, buffer, sizeof( buffer ), 0 ); + ok_( __FILE__, line )( !wsResult || wsResult == SOCKET_ERROR, "recv() returned %d.\n", wsResult ); }
#define checkSpHeader( header, expectedSize, sizeTodo ) checkSpHeader_( __LINE__, header, expectedSize, sizeTodo ) @@ -1412,6 +1421,41 @@ static void sendSuperEnumPlayersReply_( int line, SOCKET sock, unsigned short tc ok_( __FILE__, line )( wsResult == sizeof( reply ), "send() returned %d.\n", wsResult ); }
+#define sendAddForwardReply( sock, port, result ) sendAddForwardReply_( __LINE__, sock, port, result ) +static void sendAddForwardReply_( int line, SOCKET sock, unsigned short port, HRESULT result ) +{ + struct + { + SpHeader spHeader; + AddForwardReply reply; + } reply = + { + .spHeader = + { + .mixed = 0xfab00000 + sizeof( reply ), + .addr = + { + .sin_family = AF_INET, + .sin_port = htons( port ), + }, + }, + .reply = + { + .header = + { + .magic = 0x79616c70, + .command = 36, + .version = 14, + }, + .result = result, + }, + }; + int wsResult; + + wsResult = send( sock, (char *) &reply, sizeof( reply ), 0 ); + ok_( __FILE__, line )( wsResult == sizeof( reply ), "send() returned %d.\n", wsResult ); +} + static void init_TCPIP_provider( IDirectPlay4 *pDP, LPCSTR strIPAddressString, WORD port ) {
@@ -2133,12 +2177,13 @@ static void checkPlayerList_( int line, IDirectPlay4 *dp, ExpectedPlayer *expect }
#define check_Open( dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, port, expectedPassword, \ - idReplyHr, expectedHr ) \ + idReplyHr, addForwardReplyHr, expectedHr ) \ check_Open_( __LINE__, dp, dpsd, serverDpsd, idRequestExpected, forwardRequestExpected, port, expectedPassword, \ - idReplyHr, expectedHr ) + idReplyHr, addForwardReplyHr, expectedHr ) static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, const DPSESSIONDESC2 *serverDpsd, BOOL idRequestExpected, BOOL forwardRequestExpected, unsigned short port, - const WCHAR *expectedPassword, HRESULT idReplyHr, HRESULT expectedHr ) + const WCHAR *expectedPassword, HRESULT idReplyHr, HRESULT addForwardReplyHr, + HRESULT expectedHr ) { SOCKET listenSock; OpenParam *param; @@ -2173,14 +2218,17 @@ static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, cons { receiveAddForwardRequest_( line, recvSock, 0x12345678, expectedPassword, serverDpsd->dwReserved1 );
- sendSuperEnumPlayersReply( sendSock, port, 2399, serverDpsd, L"normal" ); - - checkNoMoreMessages_( line, recvSock ); + if ( addForwardReplyHr == DP_OK ) + sendSuperEnumPlayersReply( sendSock, port, 2399, serverDpsd, L"normal" ); + else + sendAddForwardReply( sendSock, 2349, addForwardReplyHr );
- hr = openAsyncWait( param, 2000 ); + hr = openAsyncWait( param, 7000 ); ok_( __FILE__, line )( hr == expectedHr, "Open() returned %#lx.\n", hr );
- if ( expectedHr == DP_OK ) + checkNoMoreMessages_( line, recvSock ); + + if ( hr == DP_OK ) { BYTE expectedPlayerData[] = { 1, 2, 3, 4, }; ExpectedPlayer expectedPlayers[] = { @@ -2196,10 +2244,10 @@ static void check_Open_( int line, IDirectPlay4A *dp, DPSESSIONDESC2 *dpsd, cons };
checkPlayerList_( line, dp, expectedPlayers, ARRAYSIZE( expectedPlayers ) ); - }
- hr = IDirectPlayX_Close( dp ); - checkHR( DP_OK, hr ); + hr = IDirectPlayX_Close( dp ); + checkHR( DP_OK, hr ); + } } else { @@ -2281,9 +2329,9 @@ static void test_Open(void)
dpsd = dpsdZero; dpsd.dwSize = 0; - check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_INVALIDPARAMS );
- check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_UNINITIALIZED ); + check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_UNINITIALIZED );
init_TCPIP_provider( dp, "127.0.0.1", 0 );
@@ -2291,19 +2339,19 @@ static void test_Open(void) /* - Checking how strict dplay is with sizes */ dpsd = dpsdZero; dpsd.dwSize = 0; - check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_INVALIDPARAMS );
dpsd = dpsdZero; dpsd.dwSize = sizeof( DPSESSIONDESC2 ) - 1; - check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_INVALIDPARAMS );
dpsd = dpsdZero; dpsd.dwSize = sizeof( DPSESSIONDESC2 ) + 1; - check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_INVALIDPARAMS ); + check_Open( dp, &dpsd, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_INVALIDPARAMS );
- check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_NOSESSIONS ); + check_Open( dp, &dpsdZero, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_NOSESSIONS );
- check_Open( dp, &dpsdAppGuid, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DPERR_NOSESSIONS ); + check_Open( dp, &dpsdAppGuid, NULL, FALSE, FALSE, 2349, NULL, DP_OK, DP_OK, DPERR_NOSESSIONS );
enumSock = bindUdp( 47624 );
@@ -2337,15 +2385,16 @@ static void test_Open(void) break; }
- check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, FALSE, 2349, L"", DPERR_CANTCREATEPLAYER, DPERR_CANTCREATEPLAYER ); + check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, FALSE, 2349, L"", DPERR_CANTCREATEPLAYER, DP_OK, + DPERR_CANTCREATEPLAYER );
- check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, TRUE, 2349, L"", DP_OK, DP_OK ); + check_Open( dp, &dpsdAppGuid, &normalDpsd, TRUE, TRUE, 2349, L"", DP_OK, DP_OK, DP_OK );
dpsd = dpsdAppGuid; dpsd.guidInstance = appGuid2; replyDpsd = normalDpsd; replyDpsd.guidInstance = appGuid2; - check_Open( dp, &dpsd, &replyDpsd, TRUE, TRUE, 2348, L"", DP_OK, DP_OK ); + check_Open( dp, &dpsd, &replyDpsd, TRUE, TRUE, 2348, L"", DP_OK, DP_OK, DP_OK );
/* Join to protected session */ for ( tryIndex = 0; ; ++tryIndex ) @@ -2376,7 +2425,12 @@ static void test_Open(void)
dpsd = dpsdAppGuid; dpsd.lpszPasswordA = (char *) "hadouken"; - check_Open( dp, &dpsd, &protectedDpsd, TRUE, TRUE, 2349, L"hadouken", DP_OK, DP_OK ); + check_Open( dp, &dpsd, &protectedDpsd, TRUE, TRUE, 2349, L"hadouken", DP_OK, DP_OK, DP_OK ); + + dpsd = dpsdAppGuid; + dpsd.lpszPasswordA = (char *) "sonic boom"; + check_Open( dp, &dpsd, &protectedDpsd, TRUE, TRUE, 2349, L"sonic boom", DP_OK, DPERR_INVALIDPASSWORD, + DPERR_INVALIDPASSWORD );
closesocket( enumSock );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148911
Your paranoid android.
=== w7u_el (32 bit report) ===
dplayx: dplayx.c:3003: Test failed: recv() returned 52. dplayx.c:2407: Test failed: got flags 0.
=== debian11 (32 bit hi:IN report) ===
dplayx: dplayx.c:2432: Test failed: got mixed 0xfab00086. dplayx.c:2432: Test failed: recv() returned 6. dplayx.c:2432: Test failed: got password L"". dplayx.c:2432: Test failed: recv() returned -1. dplayx.c:2432: Test failed: got tick count 0xcccccccc.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000000C000D4, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032
v2: - Free the message header on error path in `DP_MSG_SendRequestPlayerId()`.