[channels,rdpdr] better logging of device manager

if a device could not be found print a better log message
This commit is contained in:
Armin Novak 2022-12-14 13:38:34 +01:00 committed by Martin Fleisz
parent 231babef5e
commit 186e97e0a8
2 changed files with 5 additions and 1 deletions

View File

@ -128,9 +128,14 @@ DEVICE* devman_get_device_by_id(DEVMAN* devman, UINT32 id)
void* key = (void*)(size_t)id;
if (!devman)
{
WLog_ERR(TAG, "[%s] device manager=%p", __FUNCTION__, devman);
return NULL;
}
device = (DEVICE*)ListDictionary_GetItemValue(devman->devices, key);
if (!device)
WLog_WARN(TAG, "[%s] could not find device ID 0x%08" PRIx32, __FUNCTION__, id);
return device;
}

View File

@ -106,7 +106,6 @@ IRP* irp_new(DEVMAN* devman, wStreamPool* pool, wStream* s, UINT* error)
if (!device)
{
WLog_WARN(TAG, "devman_get_device_by_id failed!");
if (error)
*error = CHANNEL_RC_OK;