Fixed userdata pointer and CHANNEL_EVENT_WRITE_CANCELLED message.

This commit is contained in:
Armin Novak 2019-10-28 16:43:47 +01:00
parent 1bcb799560
commit 75ed12f1f0
8 changed files with 9 additions and 9 deletions

View File

@ -875,7 +875,7 @@ static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -1274,7 +1274,7 @@ static void VCAPITYPE drdynvc_virtual_channel_open_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -1005,7 +1005,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_open_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -708,7 +708,7 @@ static VOID VCAPITYPE rail_virtual_channel_open_event_ex(LPVOID lpUserParam, DWO
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -233,11 +233,11 @@ static void VCAPITYPE VirtualChannelOpenEventEx(LPVOID lpUserParam, DWORD openHa
break; break;
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
free(lpUserParam); free(pData);
break; break;
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
SetEvent(plugin->writeComplete); SetEvent(plugin->writeComplete);
free(lpUserParam); free(pData);
break; break;
} }
} }

View File

@ -1590,7 +1590,7 @@ static VOID VCAPITYPE rdpdr_virtual_channel_open_event_ex(LPVOID lpUserParam, DW
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -993,7 +993,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_open_event_ex(LPVOID lpUserParam, D
case CHANNEL_EVENT_WRITE_CANCELLED: case CHANNEL_EVENT_WRITE_CANCELLED:
case CHANNEL_EVENT_WRITE_COMPLETE: case CHANNEL_EVENT_WRITE_COMPLETE:
{ {
wStream* s = (wStream*)lpUserParam; wStream* s = (wStream*)pData;
Stream_Free(s, TRUE); Stream_Free(s, TRUE);
} }
break; break;

View File

@ -86,13 +86,13 @@ static void channel_queue_message_free(wMessage* msg)
return; return;
ev = (CHANNEL_OPEN_EVENT*)msg->wParam; ev = (CHANNEL_OPEN_EVENT*)msg->wParam;
freerdp_channels_process_message_free(msg, CHANNEL_EVENT_WRITE_CANCELLED);
free(ev); free(ev);
} }
static void channel_queue_free(void* obj) static void channel_queue_free(void* obj)
{ {
wMessage* msg = (wMessage*)obj; wMessage* msg = (wMessage*)obj;
freerdp_channels_process_message_free(msg, CHANNEL_EVENT_WRITE_CANCELLED);
channel_queue_message_free(msg); channel_queue_message_free(msg);
} }