[rdpdr] filter empty device announce
This commit is contained in:
parent
b988e8fba7
commit
318b55adc1
@ -165,6 +165,9 @@ static UINT rdpdr_send_device_list_remove_request(rdpdrPlugin* rdpdr, UINT32 cou
|
|||||||
WINPR_ASSERT(rdpdr);
|
WINPR_ASSERT(rdpdr);
|
||||||
WINPR_ASSERT(ids || (count == 0));
|
WINPR_ASSERT(ids || (count == 0));
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
return CHANNEL_RC_OK;
|
||||||
|
|
||||||
s = StreamPool_Take(rdpdr->pool, count * sizeof(UINT32) + 8);
|
s = StreamPool_Take(rdpdr->pool, count * sizeof(UINT32) + 8);
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
@ -1330,6 +1333,11 @@ static UINT rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
|
|||||||
if (!device_foreach(rdpdr, TRUE, device_announce, &arg))
|
if (!device_foreach(rdpdr, TRUE, device_announce, &arg))
|
||||||
return ERROR_INVALID_DATA;
|
return ERROR_INVALID_DATA;
|
||||||
|
|
||||||
|
if (arg.count == 0)
|
||||||
|
{
|
||||||
|
Stream_Release(s);
|
||||||
|
return CHANNEL_RC_OK;
|
||||||
|
}
|
||||||
pos = Stream_GetPosition(s);
|
pos = Stream_GetPosition(s);
|
||||||
Stream_SetPosition(s, count_pos);
|
Stream_SetPosition(s, count_pos);
|
||||||
Stream_Write_UINT32(s, arg.count);
|
Stream_Write_UINT32(s, arg.count);
|
||||||
|
@ -1235,7 +1235,7 @@ BOOL pf_channel_rdpdr_client_handle(pClientContext* pc, UINT16 channelId, const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
return pf_channel_rdpdr_client_send_to_server(ps, s);
|
return pf_channel_rdpdr_client_send_to_server(rdpdr, ps, s);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
WLog_ERR(TAG,
|
WLog_ERR(TAG,
|
||||||
|
Loading…
Reference in New Issue
Block a user