Commit ded7d0bc authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dplayx: Cast-qual warnings fix.

parent ba645eaa
...@@ -691,7 +691,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody, ...@@ -691,7 +691,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody,
/* No reply expected */ /* No reply expected */
NS_AddRemoteComputerAsNameServer( lpcMessageHeader, NS_AddRemoteComputerAsNameServer( lpcMessageHeader,
This->dp2->spData.dwSPHeaderSize, This->dp2->spData.dwSPHeaderSize,
(LPDPMSG_ENUMSESSIONSREPLY)lpcMessageBody, lpcMessageBody,
This->dp2->lpNameServerData ); This->dp2->lpNameServerData );
break; break;
} }
...@@ -742,7 +742,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody, ...@@ -742,7 +742,7 @@ HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody,
#if 1 #if 1
case DPMSGCMD_JUSTENVELOPE: case DPMSGCMD_JUSTENVELOPE:
{ {
TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08lx\n", lpcMessageHeader, ((LPDWORD)lpcMessageHeader)[1] ); TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08lx\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] );
NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 ); NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 );
DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize );
} }
......
...@@ -96,21 +96,20 @@ static DPQ_DECL_COMPARECB( cbUglyPig, GUID ) ...@@ -96,21 +96,20 @@ static DPQ_DECL_COMPARECB( cbUglyPig, GUID )
} }
/* Store the given NS remote address for future reference */ /* Store the given NS remote address for future reference */
/* FIXME: LPDPMSG_ENUMSESSIONSREPLY should be const */ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr,
void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr, DWORD dwHdrSize,
DWORD dwHdrSize, LPCDPMSG_ENUMSESSIONSREPLY lpcMsg,
LPDPMSG_ENUMSESSIONSREPLY lpMsg, LPVOID lpNSInfo )
LPVOID lpNSInfo )
{ {
DWORD len; DWORD len;
lpNSCache lpCache = (lpNSCache)lpNSInfo; lpNSCache lpCache = (lpNSCache)lpNSInfo;
lpNSCacheData lpCacheNode; lpNSCacheData lpCacheNode;
TRACE( "%p, %p, %p\n", lpcNSAddrHdr, lpMsg, lpNSInfo ); TRACE( "%p, %p, %p\n", lpcNSAddrHdr, lpcMsg, lpNSInfo );
/* See if we can find this session. If we can, remove it as it's a dup */ /* See if we can find this session. If we can, remove it as it's a dup */
DPQ_REMOVE_ENTRY_CB( lpCache->first, next, data->guidInstance, cbUglyPig, DPQ_REMOVE_ENTRY_CB( lpCache->first, next, data->guidInstance, cbUglyPig,
lpMsg->sd.guidInstance, lpCacheNode ); lpcMsg->sd.guidInstance, lpCacheNode );
if( lpCacheNode != NULL ) if( lpCacheNode != NULL )
{ {
...@@ -140,11 +139,11 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr, ...@@ -140,11 +139,11 @@ void NS_AddRemoteComputerAsNameServer( LPCVOID lpcNSAddrHdr,
return; return;
} }
CopyMemory( lpCacheNode->data, &lpMsg->sd, sizeof( *lpCacheNode->data ) ); CopyMemory( lpCacheNode->data, &lpcMsg->sd, sizeof( *lpCacheNode->data ) );
len = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)(lpMsg+1), -1, NULL, 0, NULL, NULL ); len = WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)(lpcMsg+1), -1, NULL, 0, NULL, NULL );
if ((lpCacheNode->data->u1.lpszSessionNameA = HeapAlloc( GetProcessHeap(), 0, len ))) if ((lpCacheNode->data->u1.lpszSessionNameA = HeapAlloc( GetProcessHeap(), 0, len )))
{ {
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)(lpMsg+1), -1, WideCharToMultiByte( CP_ACP, 0, (LPCWSTR)(lpcMsg+1), -1,
lpCacheNode->data->u1.lpszSessionNameA, len, NULL, NULL ); lpCacheNode->data->u1.lpszSessionNameA, len, NULL, NULL );
} }
......
...@@ -32,7 +32,7 @@ void NS_SetLocalComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo ); ...@@ -32,7 +32,7 @@ void NS_SetLocalComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo );
void NS_SetRemoteComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo ); void NS_SetRemoteComputerAsNameServer( LPCDPSESSIONDESC2 lpsd, LPVOID lpNSInfo );
void NS_AddRemoteComputerAsNameServer( LPCVOID lpNSAddrHdr, void NS_AddRemoteComputerAsNameServer( LPCVOID lpNSAddrHdr,
DWORD dwHdrSize, DWORD dwHdrSize,
LPDPMSG_ENUMSESSIONSREPLY lpMsg, LPCDPMSG_ENUMSESSIONSREPLY lpcMsg,
LPVOID lpNSInfo ); LPVOID lpNSInfo );
LPVOID NS_GetNSAddr( LPVOID lpNSInfo ); LPVOID NS_GetNSAddr( LPVOID lpNSInfo );
DWORD NS_GetNsMagic( LPVOID lpNSInfo ); DWORD NS_GetNsMagic( LPVOID lpNSInfo );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment