if (status == WAIT_FAILED)
{
ret = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", ret);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret);
break;
}
if (status == WAIT_FAILED)
{
ret = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", ret);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret);
break;
}
{
WLog_ERR(TAG, "calloc failed!");
error = CHANNEL_RC_NO_MEMORY;
-
- if (alsa->rdpcontext)
- setChannelError(alsa->rdpcontext, error, "calloc failed!");
-
goto out;
}
SND_PCM_STREAM_CAPTURE, 0)) < 0)
{
WLog_ERR(TAG, "snd_pcm_open (%s)", snd_strerror(error));
+ error = CHANNEL_RC_INITIALIZATION_ERROR;
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %ld!", error);
break;
}
if ((error = audin_alsa_thread_receive(alsa, buffer, error * rbytes_per_frame)))
{
- WLog_ERR(TAG, "audin_alsa_thread_receive failed with error %lu", error);
+ WLog_ERR(TAG, "audin_alsa_thread_receive failed with error %ld", error);
break;
}
}
if (WaitForSingleObject(alsa->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = audin_alsa_parse_addin_args(alsa, args)))
{
- WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %lu!", error);
+ WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %u!", error);
goto error_out;
}
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin,
(IAudinDevice*) alsa)))
{
- WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
goto error_out;
}
IFCALLRET(audin->device->SetFormat, error, audin->device, format, FramesPerPacket);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "SetFormat failed with errorcode %lu", error);
+ WLog_ERR(TAG, "SetFormat failed with errorcode %u", error);
return error;
}
IFCALLRET(audin->device->Open, error, audin->device, audin_receive_wave_data, callback);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Open failed with errorcode %lu", error);
+ WLog_ERR(TAG, "Open failed with errorcode %u", error);
return error;
}
}
IFCALLRET(audin->device->Close, error, audin->device);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Close failed with errorcode %lu", error);
+ WLog_ERR(TAG, "Close failed with errorcode %u", error);
return error;
}
IFCALLRET(audin->device->SetFormat, error, audin->device, format, 0);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "SetFormat failed with errorcode %lu", error);
+ WLog_ERR(TAG, "SetFormat failed with errorcode %u", error);
return error;
}
IFCALLRET(audin->device->Open, error, audin->device, audin_receive_wave_data, callback);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Open failed with errorcode %lu", error);
+ WLog_ERR(TAG, "Open failed with errorcode %u", error);
return error;
}
}
{
IFCALLRET(audin->device->Close, error, audin->device);
if (error != CHANNEL_RC_OK)
- WLog_ERR(TAG, "Close failed with errorcode %lu", error);
+ WLog_ERR(TAG, "Close failed with errorcode %u", error);
}
free(callback->formats);
IFCALLRET(audin->device->Free, error, audin->device);
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Free failed with errorcode %lu", error);
+ WLog_ERR(TAG, "Free failed with errorcode %u", error);
// dont stop on error
}
audin->device = NULL;
if ((error = entry(&entryPoints)))
{
- WLog_ERR(TAG, "%s entry returned error %lu.", name, error);
+ WLog_ERR(TAG, "%s entry returned error %u.", name, error);
return error;
}
{
if ((error = audin_set_subsystem(audin, arg->Value)))
{
- WLog_ERR(TAG, "audin_set_subsystem failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_set_subsystem failed with error %u!", error);
return FALSE;
}
}
{
if ((error = audin_set_device_name(audin, arg->Value)))
{
- WLog_ERR(TAG, "audin_set_device_name failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_set_device_name failed with error %u!", error);
return FALSE;
}
}
{
if ((error = audin_load_device_plugin((IWTSPlugin*) audin, audin->subsystem, args)))
{
- WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %lu!",
+ WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %u!",
audin->subsystem, error);
goto out;
}
{
if ((error = audin_set_subsystem(audin, entry->subsystem)))
{
- WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %lu!",
+ WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %u!",
entry->subsystem, error);
}
else if ((error = audin_set_device_name(audin, entry->device)))
{
- WLog_ERR(TAG, "audin_set_device_name for %s failed with error %lu!",
+ WLog_ERR(TAG, "audin_set_device_name for %s failed with error %u!",
entry->subsystem, error);
}
else if ((error = audin_load_device_plugin((IWTSPlugin*) audin, audin->subsystem, args)))
{
- WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %lu!",
+ WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %u!",
entry->subsystem, error);
}
if ((error = mac->receive(encoded_data, encoded_size, mac->user_data)))
{
- WLog_ERR(TAG, "mac->receive failed with error %lu", error);
+ WLog_ERR(TAG, "mac->receive failed with error %u", error);
SetLastError(ERROR_INTERNAL_ERROR);
return;
}
if ((error = audin_mac_parse_addin_args(mac, args)))
{
- WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %lu!", error);
+ WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %u!", error);
goto error_out;
}
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) mac)))
{
- WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
goto error_out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
rc = android_RecIn(opensles->stream, buffer.s, raw_size);
if (rc < 0)
{
- WLog_ERR(TAG, "android_RecIn %lu", rc);
+ WLog_ERR(TAG, "android_RecIn %d", rc);
continue;
}
if (WaitForSingleObject(opensles->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
CloseHandle(opensles->stopEvent);
if (status == WAIT_FAILED)
{
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError());
return -1;
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
goto err_out;
}
if ((error = oss->receive(encoded_data, encoded_size, oss->user_data)))
{
- WLog_ERR(TAG, "oss->receive failed with error %lu", error);
+ WLog_ERR(TAG, "oss->receive failed with error %u", error);
break;
}
}
if (WaitForSingleObject(oss->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = audin_oss_parse_addin_args(oss, args)))
{
- WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %lu!", error);
+ WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %u!", error);
goto error_out;
}
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin,
(IAudinDevice*) oss)))
{
- WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
goto error_out;
}
if ((error = audin_pulse_parse_addin_args(pulse, args)))
{
- WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %u!", error);
goto error_out;
}
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) pulse)))
{
- WLog_ERR(TAG, "RegisterAudinDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
goto error_out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
IFCALLRET(audin->context.Opening, success, &audin->context);
if (success)
- WLog_ERR(TAG, "context.Opening failed with error %lu", success);
+ WLog_ERR(TAG, "context.Opening failed with error %u", success);
return success;
}
IFCALLRET(audin->context.OpenResult, success, &audin->context, Result);
if (success)
- WLog_ERR(TAG, "context.OpenResult failed with error %lu", success);
+ WLog_ERR(TAG, "context.OpenResult failed with error %u", success);
return success;
}
IFCALLRET(audin->context.ReceiveSamples, success, &audin->context, src, frames);
if (success)
- WLog_ERR(TAG, "context.ReceiveSamples failed with error %lu", success);
+ WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", success);
return success;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
goto out;
}
{
if ((error = audin_server_send_version(audin, s)))
{
- WLog_ERR(TAG, "audin_server_send_version failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_send_version failed with error %u!", error);
goto out_capacity;
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
goto out;
}
case MSG_SNDIN_VERSION:
if ((error = audin_server_recv_version(audin, s, BytesReturned)))
{
- WLog_ERR(TAG, "audin_server_recv_version failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_recv_version failed with error %u!", error);
goto out_capacity;
}
if ((error = audin_server_send_formats(audin, s)))
{
- WLog_ERR(TAG, "audin_server_send_formats failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_send_formats failed with error %u!", error);
goto out_capacity;
}
case MSG_SNDIN_FORMATS:
if ((error = audin_server_recv_formats(audin, s, BytesReturned)))
{
- WLog_ERR(TAG, "audin_server_recv_formats failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_recv_formats failed with error %u!", error);
goto out_capacity;
}
if ((error = audin_server_send_open(audin, s)))
{
- WLog_ERR(TAG, "audin_server_send_open failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_send_open failed with error %u!", error);
goto out_capacity;
}
case MSG_SNDIN_OPEN_REPLY:
if ((error = audin_server_recv_open_reply(audin, s, BytesReturned)))
{
- WLog_ERR(TAG, "audin_server_recv_open_reply failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_recv_open_reply failed with error %u!", error);
goto out_capacity;
}
case MSG_SNDIN_DATA:
if ((error = audin_server_recv_data(audin, s, BytesReturned)))
{
- WLog_ERR(TAG, "audin_server_recv_data failed with error %lu!", error);
+ WLog_ERR(TAG, "audin_server_recv_data failed with error %u!", error);
goto out_capacity;
};
if (WaitForSingleObject(audin->thread, INFINITE) == WAIT_FAILED)
{
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError());
return FALSE;
}
IFCALLRET(context->ServerFormatListResponse, error, context, &formatListResponse);
if (error)
- WLog_ERR(TAG, "ServerFormatListResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerFormatListResponse failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerFormatDataRequest, error, context, &formatDataRequest);
if (error)
- WLog_ERR(TAG, "ServerFormatDataRequest failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerFormatDataRequest failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerFormatDataResponse, error, context, &formatDataResponse);
if (error)
- WLog_ERR(TAG, "ServerFormatDataResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerFormatDataResponse failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerCapabilities, error, context, &capabilities);
if (error)
- WLog_ERR(TAG, "ServerCapabilities failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error);
return error;
}
case CB_CAPSTYPE_GENERAL:
if ((error = cliprdr_process_general_capability(cliprdr, s)))
{
- WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %u!",
error);
return error;
}
IFCALLRET(context->MonitorReady, error, context, &monitorReady);
if (error)
- WLog_ERR(TAG, "MonitorReady failed with error %lu!", error);
+ WLog_ERR(TAG, "MonitorReady failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerFileContentsRequest, error, context, &request);
if (error)
- WLog_ERR(TAG, "ServerFileContentsRequest failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerFileContentsRequest failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerFileContentsResponse, error, context, &response);
if (error)
- WLog_ERR(TAG, "ServerFileContentsResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerFileContentsResponse failed with error %u!", error);
return error;
}
IFCALLRET(context->ServerLockClipboardData, error, context, &lockClipboardData);
if (error)
- WLog_ERR(TAG, "ServerLockClipboardData failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerLockClipboardData failed with error %u!", error);
return error;
}
&unlockClipboardData);
if (error)
- WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %u!", error);
return error;
}
{
case CB_CLIP_CAPS:
if ((error = cliprdr_process_clip_caps(cliprdr, s, dataLen, msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %u!", error);
break;
case CB_MONITOR_READY:
if ((error = cliprdr_process_monitor_ready(cliprdr, s, dataLen, msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_monitor_ready failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_process_monitor_ready failed with error %u!", error);
break;
case CB_FORMAT_LIST:
if ((error = cliprdr_process_format_list(cliprdr, s, dataLen, msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_format_list failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_process_format_list failed with error %u!", error);
break;
case CB_FORMAT_LIST_RESPONSE:
if ((error = cliprdr_process_format_list_response(cliprdr, s, dataLen,
msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_format_list_response failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_format_list_response failed with error %u!",
error);
break;
case CB_FORMAT_DATA_REQUEST:
if ((error = cliprdr_process_format_data_request(cliprdr, s, dataLen,
msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_format_data_request failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_format_data_request failed with error %u!",
error);
break;
case CB_FORMAT_DATA_RESPONSE:
if ((error = cliprdr_process_format_data_response(cliprdr, s, dataLen,
msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_format_data_response failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_format_data_response failed with error %u!",
error);
break;
case CB_FILECONTENTS_REQUEST:
if ((error = cliprdr_process_filecontents_request(cliprdr, s, dataLen,
msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %u!",
error);
break;
case CB_FILECONTENTS_RESPONSE:
if ((error = cliprdr_process_filecontents_response(cliprdr, s, dataLen,
msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %u!",
error);
break;
case CB_LOCK_CLIPDATA:
if ((error = cliprdr_process_lock_clipdata(cliprdr, s, dataLen, msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %u!", error);
break;
case CB_UNLOCK_CLIPDATA:
if ((error = cliprdr_process_unlock_clipdata(cliprdr, s, dataLen, msgFlags)))
- WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %u!", error);
break;
case CHANNEL_EVENT_DATA_RECEIVED:
if ((error = cliprdr_virtual_channel_event_data_received(cliprdr, pData, dataLength,
totalLength, dataFlags)))
- WLog_ERR(TAG, "failed with error %lu", error);
+ WLog_ERR(TAG, "failed with error %u", error);
break;
if ((error = cliprdr_order_recv(cliprdr, data)))
{
- WLog_ERR(TAG, "cliprdr_order_recv failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_order_recv failed with error %u!", error);
break;
}
}
&& (WaitForSingleObject(cliprdr->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
return rc;
}
case CHANNEL_EVENT_CONNECTED:
if ((error = cliprdr_virtual_channel_event_connected(cliprdr, pData,
dataLength)))
- WLog_ERR(TAG, "cliprdr_virtual_channel_event_connected failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_virtual_channel_event_connected failed with error %u!",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = cliprdr_virtual_channel_event_disconnected(cliprdr)))
WLog_ERR(TAG,
- "cliprdr_virtual_channel_event_disconnected failed with error %lu!", error);
+ "cliprdr_virtual_channel_event_disconnected failed with error %u!", error);
break;
case CHANNEL_EVENT_TERMINATED:
if ((error = cliprdr_virtual_channel_event_terminated(cliprdr)))
- WLog_ERR(TAG, "cliprdr_virtual_channel_event_terminated failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_virtual_channel_event_terminated failed with error %u!",
error);
break;
case CB_CAPSTYPE_GENERAL:
if ((error = cliprdr_server_receive_general_capability(context, s)))
{
- WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %lu",
+ WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %u",
error);
return error;
}
if ((slength = Stream_GetRemainingLength(s)) < 520)
{
WLog_ERR(TAG,
- "Stream_GetRemainingLength returned %d but should at least be 520", slength);
+ "Stream_GetRemainingLength returned %lu but should at least be 520", (unsigned long) slength);
return CHANNEL_RC_NO_MEMORY;
}
IFCALLRET(context->TempDirectory, error, context, &tempDirectory);
if (error)
- WLog_ERR(TAG, "TempDirectory failed with error %lu!", error);
+ WLog_ERR(TAG, "TempDirectory failed with error %u!", error);
return error;
}
IFCALLRET(context->ClientFormatList, error, context, &formatList);
if (error)
- WLog_ERR(TAG, "ClientFormatList failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFormatList failed with error %u!", error);
out:
&formatListResponse);
if (error)
- WLog_ERR(TAG, "ClientFormatListResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFormatListResponse failed with error %u!", error);
return error;
}
IFCALLRET(context->ClientLockClipboardData, error, context, &lockClipboardData);
if (error)
- WLog_ERR(TAG, "ClientLockClipboardData failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientLockClipboardData failed with error %u!", error);
return error;
}
&unlockClipboardData);
if (error)
- WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %u!", error);
return error;
}
IFCALLRET(context->ClientFormatDataRequest, error, context, &formatDataRequest);
if (error)
- WLog_ERR(TAG, "ClientFormatDataRequest failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFormatDataRequest failed with error %u!", error);
return error;
}
&formatDataResponse);
if (error)
- WLog_ERR(TAG, "ClientFormatDataResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFormatDataResponse failed with error %u!", error);
free(formatDataResponse.requestedFormatData);
return error;
IFCALLRET(context->ClientFileContentsRequest, error, context, &request);
if (error)
- WLog_ERR(TAG, "ClientFileContentsRequest failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFileContentsRequest failed with error %u!", error);
return error;
}
IFCALLRET(context->ClientFileContentsResponse, error, context, &response);
if (error)
- WLog_ERR(TAG, "ClientFileContentsResponse failed with error %lu!", error);
+ WLog_ERR(TAG, "ClientFileContentsResponse failed with error %u!", error);
return error;
}
{
case CB_CLIP_CAPS:
if ((error = cliprdr_server_receive_capabilities(context, s, header)))
- WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %u!",
error);
break;
case CB_TEMP_DIRECTORY:
if ((error = cliprdr_server_receive_temporary_directory(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_temporary_directory failed with error %lu!", error);
+ "cliprdr_server_receive_temporary_directory failed with error %u!", error);
break;
case CB_FORMAT_LIST:
if ((error = cliprdr_server_receive_format_list(context, s, header)))
- WLog_ERR(TAG, "cliprdr_server_receive_format_list failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_server_receive_format_list failed with error %u!",
error);
break;
case CB_FORMAT_LIST_RESPONSE:
if ((error = cliprdr_server_receive_format_list_response(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_format_list_response failed with error %lu!", error);
+ "cliprdr_server_receive_format_list_response failed with error %u!", error);
break;
case CB_LOCK_CLIPDATA:
if ((error = cliprdr_server_receive_lock_clipdata(context, s, header)))
- WLog_ERR(TAG, "cliprdr_server_receive_lock_clipdata failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_server_receive_lock_clipdata failed with error %u!",
error);
break;
case CB_UNLOCK_CLIPDATA:
if ((error = cliprdr_server_receive_unlock_clipdata(context, s, header)))
- WLog_ERR(TAG, "cliprdr_server_receive_unlock_clipdata failed with error %lu!",
+ WLog_ERR(TAG, "cliprdr_server_receive_unlock_clipdata failed with error %u!",
error);
break;
case CB_FORMAT_DATA_REQUEST:
if ((error = cliprdr_server_receive_format_data_request(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_format_data_request failed with error %lu!", error);
+ "cliprdr_server_receive_format_data_request failed with error %u!", error);
break;
case CB_FORMAT_DATA_RESPONSE:
if ((error = cliprdr_server_receive_format_data_response(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_format_data_response failed with error %lu!", error);
+ "cliprdr_server_receive_format_data_response failed with error %u!", error);
break;
case CB_FILECONTENTS_REQUEST:
if ((error = cliprdr_server_receive_filecontents_request(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_filecontents_request failed with error %lu!", error);
+ "cliprdr_server_receive_filecontents_request failed with error %u!", error);
break;
case CB_FILECONTENTS_RESPONSE:
if ((error = cliprdr_server_receive_filecontents_response(context, s, header)))
WLog_ERR(TAG,
- "cliprdr_server_receive_filecontents_response failed with error %lu!", error);
+ "cliprdr_server_receive_filecontents_response failed with error %u!", error);
break;
if ((error = context->ServerCapabilities(context, &capabilities)))
{
- WLog_ERR(TAG, "ServerCapabilities failed with error %lu!", error);
+ WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error);
return error;
}
if ((error = context->MonitorReady(context, &monitorReady)))
{
- WLog_ERR(TAG, "MonitorReady failed with error %lu!", error);
+ WLog_ERR(TAG, "MonitorReady failed with error %u!", error);
return error;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = cliprdr_server_receive_pdu(context, s, &header)))
{
- WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %lu!", error);
+ WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %u!", error);
return error;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = cliprdr_server_init(context)))
{
- WLog_ERR(TAG, "cliprdr_server_init failed with error %lu!", error);
+ WLog_ERR(TAG, "cliprdr_server_init failed with error %u!", error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
goto out;
}
{
if ((error = context->CheckEventHandle(context)))
{
- WLog_ERR(TAG, "CheckEventHandle failed with error %lu!", error);
+ WLog_ERR(TAG, "CheckEventHandle failed with error %u!", error);
break;
}
}
if (WaitForSingleObject(cliprdr->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if (pPlugin->Terminated)
if ((error = pPlugin->Terminated(pPlugin)))
- WLog_ERR(TAG, "Terminated failed with error %lu!", error);
+ WLog_ERR(TAG, "Terminated failed with error %u!", error);
}
dvcman->num_plugins = 0;
if (pPlugin->Initialize)
if ((error = pPlugin->Initialize(pPlugin, pChannelMgr)))
{
- WLog_ERR(TAG, "Initialize failed with error %lu!", error);
+ WLog_ERR(TAG, "Initialize failed with error %u!", error);
return error;
}
}
listener->iface.pInterface);
if (error)
- WLog_ERR(TAG, "context.ReceiveSamples failed with error %lu", error);
+ WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", error);
return error;
}
{
if (error)
{
- WLog_ERR(TAG, "OnNewChannelConnection failed with error %lu!", error);
+ WLog_ERR(TAG, "OnNewChannelConnection failed with error %u!", error);
return error;
}
else
if ((pCallback->OnOpen) && (error = pCallback->OnOpen(pCallback)))
{
- WLog_ERR(TAG, "OnOpen failed with eror %lu!", error);
+ WLog_ERR(TAG, "OnOpen failed with eror %u!", error);
return error;
}
if (error)
{
- WLog_ERR(TAG, "OnChannelDisconnected returned with error %lu!", error);
+ WLog_ERR(TAG, "OnChannelDisconnected returned with error %u!", error);
return error;
}
if ((ichannel->Close) && (error = ichannel->Close(ichannel)))
{
- WLog_ERR(TAG, "Close failed with eror %lu!", error);
+ WLog_ERR(TAG, "Close failed with eror %u!", error);
return error;
}
}
{
if ((status = dvcman_open_channel(drdynvc->channel_mgr, ChannelId)))
{
- WLog_ERR(TAG, "dvcman_open_channel failed with error %lu!", status);
+ WLog_ERR(TAG, "dvcman_open_channel failed with error %u!", status);
return status;
}
}
else
{
if ((status = dvcman_close_channel(drdynvc->channel_mgr, ChannelId)))
- WLog_ERR(TAG, "dvcman_close_channel failed with error %lu!", status);
+ WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", status);
}
return status;
if ((error = dvcman_close_channel(drdynvc->channel_mgr, ChannelId)))
{
- WLog_ERR(TAG, "dvcman_close_channel failed with error %lu!", error);
+ WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", error);
return error;
}
Cmd = (value & 0xf0) >> 4;
Sp = (value & 0x0c) >> 2;
cbChId = (value & 0x03) >> 0;
- WLog_DBG(TAG, "order_recv: Cmd=0x%x, Sp=%d cbChId=%d, ChannelId=%d", Cmd, Sp,
- cbChId);
+ WLog_DBG(TAG, "order_recv: Cmd=0x%x, Sp=%d cbChId=%d", Cmd, Sp,cbChId);
switch (Cmd)
{
case CHANNEL_EVENT_DATA_RECEIVED:
if ((error = drdynvc_virtual_channel_event_data_received(drdynvc, pData, dataLength, totalLength,
dataFlags)))
- WLog_ERR(TAG, "drdynvc_virtual_channel_event_data_received failed with error %lu", error);
+ WLog_ERR(TAG, "drdynvc_virtual_channel_event_data_received failed with error %u", error);
break;
if ((error = drdynvc_order_recv(drdynvc, data)))
{
Stream_Free(data, TRUE);
- WLog_ERR(TAG, "drdynvc_order_recv failed with error %lu!", error);
+ WLog_ERR(TAG, "drdynvc_order_recv failed with error %u!", error);
break;
}
if ((error = dvcman_init(drdynvc->channel_mgr)))
{
- WLog_ERR(TAG, "dvcman_init failed with error %lu!", error);
+ WLog_ERR(TAG, "dvcman_init failed with error %u!", error);
goto error;
}
(WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED))
{
status = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", status);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", status);
return status;
}
{
case CHANNEL_EVENT_CONNECTED:
if ((error = drdynvc_virtual_channel_event_connected(drdynvc, pData, dataLength)))
- WLog_ERR(TAG, "drdynvc_virtual_channel_event_connected failed with error %lu", error);
+ WLog_ERR(TAG, "drdynvc_virtual_channel_event_connected failed with error %u", error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = drdynvc_virtual_channel_event_disconnected(drdynvc)))
- WLog_ERR(TAG, "drdynvc_virtual_channel_event_disconnected failed with error %lu", error);
+ WLog_ERR(TAG, "drdynvc_virtual_channel_event_disconnected failed with error %u", error);
break;
case CHANNEL_EVENT_TERMINATED:
if ((error = drdynvc_virtual_channel_event_terminated(drdynvc)))
- WLog_ERR(TAG, "drdynvc_virtual_channel_event_terminated failed with error %lu", error);
+ WLog_ERR(TAG, "drdynvc_virtual_channel_event_terminated failed with error %u", error);
break;
}
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
hFd = CreateFileA(file->fullpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFd == INVALID_HANDLE_VALUE)
{
- WLog_ERR(TAG, "Unable to set file time %s to %d", file->fullpath);
+ WLog_ERR(TAG, "Unable to create file %s", file->fullpath);
return FALSE;
}
if (liCreationTime.QuadPart != 0)
}
if (!SetFileTime(hFd, pftCreationTime, pftLastAccessTime, pftLastWriteTime))
{
- WLog_ERR(TAG, "Unable to set file time %s to %d", file->fullpath);
+ WLog_ERR(TAG, "Unable to set file time on %s", file->fullpath);
CloseHandle(hFd);
return FALSE;
}
hFd = CreateFileA(file->fullpath, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFd == INVALID_HANDLE_VALUE)
{
- WLog_ERR(TAG, "Unable to truncate %s to %d", file->fullpath, size);
+ WLog_ERR(TAG, "Unable to truncate %s to %lld", file->fullpath, (long long) size);
return FALSE;
}
liSize.QuadPart = size;
if (SetFilePointer(hFd, liSize.LowPart, &liSize.HighPart, FILE_BEGIN) == 0)
{
- WLog_ERR(TAG, "Unable to truncate %s to %d", file->fullpath, size);
+ WLog_ERR(TAG, "Unable to truncate %s to %lld", file->fullpath, (long long) size);
CloseHandle(hFd);
return FALSE;
}
if (irp)
if ((error = drive_process_irp(drive, irp)))
{
- WLog_ERR(TAG, "drive_process_irp failed with error %lu!", error);
+ WLog_ERR(TAG, "drive_process_irp failed with error %u!", error);
break;
}
}
&& (WaitForSingleObject(drive->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) drive)))
{
- WLog_ERR(TAG, "RegisterDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterDevice failed with error %u!", error);
goto out_error;
}
if (WaitForSingleObject(hEvent, 1000) == WAIT_FAILED)
{
Error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", Error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long)Error);
return Error;
}
if ((error = echo_server_open_channel(echo)))
{
UINT error2 = 0;
- WLog_ERR(TAG, "echo_server_open_channel failed with error %lu!", error);
+ WLog_ERR(TAG, "echo_server_open_channel failed with error %u!", error);
IFCALLRET(echo->context.OpenResult, error2, &echo->context,
ECHO_SERVER_OPEN_RESULT_NOTSUPPORTED);
if (error2)
- WLog_ERR(TAG, "echo server's OpenResult callback failed with error %lu",
+ WLog_ERR(TAG, "echo server's OpenResult callback failed with error %u",
error2);
goto out;
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
break;
}
ECHO_SERVER_OPEN_RESULT_CLOSED);
if (error)
- WLog_ERR(TAG, "OpenResult failed with error %lu!", error);
+ WLog_ERR(TAG, "OpenResult failed with error %u!", error);
break;
}
ECHO_SERVER_OPEN_RESULT_ERROR);
if (error)
- WLog_ERR(TAG, "OpenResult failed with error %lu!", error);
+ WLog_ERR(TAG, "OpenResult failed with error %u!", error);
break;
}
ECHO_SERVER_OPEN_RESULT_OK);
if (error)
- WLog_ERR(TAG, "OpenResult failed with error %lu!", error);
+ WLog_ERR(TAG, "OpenResult failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
break;
}
if (error)
{
- WLog_ERR(TAG, "Response failed with error %lu!", error);
+ WLog_ERR(TAG, "Response failed with error %u!", error);
break;
}
}
if (WaitForSingleObject(echo->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
IFCALLRET(context->FilterUpdated, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->FilterUpdated failed with error %lu", error);
+ WLog_ERR(TAG, "context->FilterUpdated failed with error %u", error);
return error;
}
if ((error = encomsp_read_unicode_string(s, &(pdu.Name))))
{
- WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error);
+ WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
return error;
}
IFCALLRET(context->ApplicationCreated, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ApplicationCreated failed with error %lu", error);
+ WLog_ERR(TAG, "context->ApplicationCreated failed with error %u", error);
return error;
}
IFCALLRET(context->ApplicationRemoved, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ApplicationRemoved failed with error %lu", error);
+ WLog_ERR(TAG, "context->ApplicationRemoved failed with error %u", error);
return error;
}
if ((error = encomsp_read_unicode_string(s, &(pdu.Name))))
{
- WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error);
+ WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
return error;
}
IFCALLRET(context->WindowCreated, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->WindowCreated failed with error %lu", error);
+ WLog_ERR(TAG, "context->WindowCreated failed with error %u", error);
return error;
}
IFCALLRET(context->WindowRemoved, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->WindowRemoved failed with error %lu", error);
+ WLog_ERR(TAG, "context->WindowRemoved failed with error %u", error);
return error;
}
IFCALLRET(context->ShowWindow, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ShowWindow failed with error %lu", error);
+ WLog_ERR(TAG, "context->ShowWindow failed with error %u", error);
return error;
}
if ((error = encomsp_read_unicode_string(s, &(pdu.FriendlyName))))
{
- WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %lu", error);
+ WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
return error;
}
IFCALLRET(context->ParticipantCreated, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ParticipantCreated failed with error %lu", error);
+ WLog_ERR(TAG, "context->ParticipantCreated failed with error %u", error);
return error;
}
IFCALLRET(context->ParticipantRemoved, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ParticipantRemoved failed with error %lu", error);
+ WLog_ERR(TAG, "context->ParticipantRemoved failed with error %u", error);
return error;
}
IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %lu",
+ WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u",
error);
return error;
if ((error = encomsp_write_header(s, (ENCOMSP_ORDER_HEADER*) pdu)))
{
- WLog_ERR(TAG, "encomsp_write_header failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_write_header failed with error %u!", error);
return error;
}
IFCALLRET(context->GraphicsStreamPaused, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %lu", error);
+ WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %u", error);
return error;
}
IFCALLRET(context->GraphicsStreamResumed, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %lu", error);
+ WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %u", error);
return error;
}
{
if ((error = encomsp_read_header(s, &header)))
{
- WLog_ERR(TAG, "encomsp_read_header failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error);
return error;
}
case ODTYPE_FILTER_STATE_UPDATED:
if ((error = encomsp_recv_filter_updated_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_filter_updated_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_recv_filter_updated_pdu failed with error %u!", error);
return error;
}
case ODTYPE_APP_REMOVED:
if ((error = encomsp_recv_application_removed_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %u!",
error);
return error;
}
case ODTYPE_APP_CREATED:
if ((error = encomsp_recv_application_created_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %u!",
error);
return error;
}
case ODTYPE_WND_REMOVED:
if ((error = encomsp_recv_window_removed_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_window_removed_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_recv_window_removed_pdu failed with error %u!", error);
return error;
}
case ODTYPE_WND_CREATED:
if ((error = encomsp_recv_window_created_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_window_created_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_recv_window_created_pdu failed with error %u!", error);
return error;
}
case ODTYPE_WND_SHOW:
if ((error = encomsp_recv_show_window_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_show_window_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_recv_show_window_pdu failed with error %u!", error);
return error;
}
case ODTYPE_PARTICIPANT_REMOVED:
if ((error = encomsp_recv_participant_removed_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_participant_removed_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_participant_removed_pdu failed with error %u!",
error);
return error;
}
case ODTYPE_PARTICIPANT_CREATED:
if ((error = encomsp_recv_participant_created_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_participant_created_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_participant_created_pdu failed with error %u!",
error);
return error;
}
&header)))
{
WLog_ERR(TAG,
- "encomsp_recv_change_participant_control_level_pdu failed with error %lu!",
+ "encomsp_recv_change_participant_control_level_pdu failed with error %u!",
error);
return error;
}
case ODTYPE_GRAPHICS_STREAM_PAUSED:
if ((error = encomsp_recv_graphics_stream_paused_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_graphics_stream_paused_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_graphics_stream_paused_pdu failed with error %u!",
error);
return error;
}
case ODTYPE_GRAPHICS_STREAM_RESUMED:
if ((error = encomsp_recv_graphics_stream_resumed_pdu(encomsp, s, &header)))
{
- WLog_ERR(TAG, "encomsp_recv_graphics_stream_resumed_pdu failed with error %lu!",
+ WLog_ERR(TAG, "encomsp_recv_graphics_stream_resumed_pdu failed with error %u!",
error);
return error;
}
if ((error = encomsp_virtual_channel_event_data_received(encomsp, pData,
dataLength, totalLength, dataFlags)))
WLog_ERR(TAG,
- "encomsp_virtual_channel_event_data_received failed with error %lu", error);
+ "encomsp_virtual_channel_event_data_received failed with error %u", error);
break;
if ((error = encomsp_process_receive(encomsp, data)))
{
- WLog_ERR(TAG, "encomsp_process_receive failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_process_receive failed with error %u!", error);
break;
}
}
&& (WaitForSingleObject(encomsp->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
return rc;
}
case CHANNEL_EVENT_CONNECTED:
if ((error = encomsp_virtual_channel_event_connected(encomsp, pData,
dataLength)))
- WLog_ERR(TAG, "encomsp_virtual_channel_event_connected failed with error %lu",
+ WLog_ERR(TAG, "encomsp_virtual_channel_event_connected failed with error %u",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = encomsp_virtual_channel_event_disconnected(encomsp)))
WLog_ERR(TAG,
- "encomsp_virtual_channel_event_disconnected failed with error %lu", error);
+ "encomsp_virtual_channel_event_disconnected failed with error %u", error);
break;
IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %lu",
+ WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u",
error);
return error;
{
if ((error = encomsp_read_header(s, &header)))
{
- WLog_ERR(TAG, "encomsp_read_header failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error);
return error;
}
&header)))
{
WLog_ERR(TAG,
- "encomsp_recv_change_participant_control_level_pdu failed with error %lu!",
+ "encomsp_recv_change_participant_control_level_pdu failed with error %u!",
error);
return error;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
break;
}
if ((error = encomsp_server_receive_pdu(context, s)))
{
- WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %u!", error);
break;
}
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
&& (WaitForSingleObject(parallel->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) parallel)))
{
- WLog_ERR(TAG, "RegisterDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "RegisterDevice failed with error %u!", error);
goto error_out;
}
if (error)
{
- WLog_ERR(TAG, "printjob->Write failed with error %lu!", error);
+ WLog_ERR(TAG, "printjob->Write failed with error %u!", error);
return error;
}
case IRP_MJ_CREATE:
if ((error = printer_process_irp_create(printer_dev, irp)))
{
- WLog_ERR(TAG, "printer_process_irp_create failed with error %lu!", error);
+ WLog_ERR(TAG, "printer_process_irp_create failed with error %u!", error);
return error;
}
case IRP_MJ_CLOSE:
if ((error = printer_process_irp_close(printer_dev, irp)))
{
- WLog_ERR(TAG, "printer_process_irp_close failed with error %lu!", error);
+ WLog_ERR(TAG, "printer_process_irp_close failed with error %u!", error);
return error;
}
case IRP_MJ_WRITE:
if ((error = printer_process_irp_write(printer_dev, irp)))
{
- WLog_ERR(TAG, "printer_process_irp_write failed with error %lu!", error);
+ WLog_ERR(TAG, "printer_process_irp_write failed with error %u!", error);
return error;
}
case IRP_MJ_DEVICE_CONTROL:
if ((error = printer_process_irp_device_control(printer_dev, irp)))
{
- WLog_ERR(TAG, "printer_process_irp_device_control failed with error %lu!",
+ WLog_ERR(TAG, "printer_process_irp_device_control failed with error %u!",
error);
return error;
}
if (rc == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (WaitForSingleObject(printer_dev->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
return error;
}
if ((error = printer_register(pEntryPoints, printer)))
{
- WLog_ERR(TAG, "printer_register failed with error %lu!", error);
+ WLog_ERR(TAG, "printer_register failed with error %u!", error);
return error;
}
}
if ((error = printer_register(pEntryPoints, printer)))
{
- WLog_ERR(TAG, "printer_register failed with error %lu!", error);
+ WLog_ERR(TAG, "printer_register failed with error %u!", error);
free(printers);
return error;
}
if ((error = rail_write_client_sysparam_order(s, sysparam)))
{
- WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error);
Stream_Free(s, TRUE);
return error;
}
if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_SYSPARAM)))
{
- WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error);
}
Stream_Free(s, TRUE);
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
if ((error = rail_send_client_sysparam(context, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
return error;
}
}
case CHANNEL_EVENT_DATA_RECEIVED:
if ((error = rail_virtual_channel_event_data_received(rail, pData, dataLength,
totalLength, dataFlags)))
- WLog_ERR(TAG, "rail_virtual_channel_event_data_received failed with error %lu!",
+ WLog_ERR(TAG, "rail_virtual_channel_event_data_received failed with error %u!",
error);
break;
&& (WaitForSingleObject(rail->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
return rc;
}
{
case CHANNEL_EVENT_CONNECTED:
if ((error = rail_virtual_channel_event_connected(rail, pData, dataLength)))
- WLog_ERR(TAG, "rail_virtual_channel_event_connected failed with error %lu!",
+ WLog_ERR(TAG, "rail_virtual_channel_event_connected failed with error %u!",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = rail_virtual_channel_event_disconnected(rail)))
- WLog_ERR(TAG, "rail_virtual_channel_event_disconnected failed with error %lu!",
+ WLog_ERR(TAG, "rail_virtual_channel_event_disconnected failed with error %u!",
error);
break;
Stream_Write_UINT16(s, exec->arguments.length); /* argumentsLength (2 bytes) */
if ((error = rail_write_unicode_string_value(s, &exec->exeOrFile)))
{
- WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error);
+ WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error);
return error;
}
if ((error = rail_write_unicode_string_value(s, &exec->workingDir)))
{
- WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error);
+ WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error);
return error;
}
if ((error = rail_write_unicode_string_value(s, &exec->arguments)))
{
- WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %lu", error);
+ WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error);
return error;
}
return error;
if ((error = rail_read_handshake_order(s, handshake)))
{
- WLog_ERR(TAG, "rail_read_handshake_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_handshake_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerHandshake, error, context, handshake);
if (error)
- WLog_ERR(TAG, "context.ServerHandshake failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerHandshake failed with error %u", error);
}
return error;
if ((error = rail_read_handshake_ex_order(s, handshakeEx)))
{
- WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ClientHandshakeEx, error, context, handshakeEx);
if (error)
- WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %lu", error);
+ WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %u", error);
}
if ((error = rail_read_server_exec_result_order(s, execResult)))
{
- WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerExecuteResult, error, context, execResult);
if (error)
- WLog_ERR(TAG, "context.ServerExecuteResult failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerExecuteResult failed with error %u", error);
}
if ((error = rail_read_server_sysparam_order(s, sysparam)))
{
- WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerSystemParam, error, context, sysparam);
if (error)
- WLog_ERR(TAG, "context.ServerSystemParam failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerSystemParam failed with error %u", error);
}
return error;
if ((error = rail_read_server_minmaxinfo_order(s, minMaxInfo)))
{
- WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerMinMaxInfo, error, context, minMaxInfo);
if (error)
- WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %u", error);
}
return error;
if ((error = rail_read_server_localmovesize_order(s, localMoveSize)))
{
- WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerLocalMoveSize, error, context, localMoveSize);
if (error)
- WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %u", error);
}
return error;
if ((error = rail_read_server_get_appid_resp_order(s, getAppIdResp)))
{
- WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerGetAppIdResponse, error, context, getAppIdResp);
if (error)
- WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %u", error);
}
return error;
if ((error = rail_read_langbar_info_order(s, langBarInfo)))
{
- WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %u!", error);
return error;
}
{
IFCALLRET(context->ServerLanguageBarInfo, error, context, langBarInfo);
if (error)
- WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %lu", error);
+ WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %u", error);
}
return error;
if ((error = rail_read_pdu_header(s, &orderType, &orderLength)))
{
- WLog_ERR(TAG, "rail_read_pdu_header failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_read_pdu_header failed with error %u!", error);
return error;
}
- WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%lu",
- RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
+ WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%u",
+ RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], (unsigned)orderLength);
switch (orderType)
{
if ((error = rail_write_client_exec_order(s, exec)))
{
- WLog_ERR(TAG, "rail_write_client_exec_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_write_client_exec_order failed with error %u!", error);
return error;
}
if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_EXEC)))
{
- WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error);
return error;
}
Stream_Free(s, TRUE);
if ((error = rail_write_client_sysparam_order(s, sysparam)))
{
- WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error);
return error;
}
if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_SYSPARAM)))
{
- WLog_ERR(TAG, "rail_send_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error);
return error;
}
sysparam->param = SPI_SET_HIGH_CONTRAST;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_TASKBAR_POS;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_SET_MOUSE_BUTTON_SWAP;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_SET_KEYBOARD_PREF;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_SET_DRAG_FULL_WINDOWS;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_SET_KEYBOARD_CUES;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
sysparam->param = SPI_SET_WORK_AREA;
if ((error = rail_send_client_sysparam_order(rail, sysparam)))
{
- WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %lu!", error);
+ WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %u!", error);
return error;
}
}
if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids)))
{
// dont end on error, just report ?
- WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!",
error);
}
if (rdpdr->hotplug_wnd && !PostMessage(rdpdr->hotplug_wnd, WM_QUIT, 0, 0))
{
error = GetLastError();
- WLog_ERR(TAG, "PostMessage failed with error %lu", error);
+ WLog_ERR(TAG, "PostMessage failed with error %u", error);
}
return error;
if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids)))
{
- WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!",
error);
goto cleanup;
}
{
if ((error = handle_hotplug(rdpdr)))
{
- WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error);
+ WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
}
else
rdpdr_send_device_list_announce_request(rdpdr, TRUE);
if ((error = handle_hotplug(rdpdr)))
{
- WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error);
+ WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
}
}
if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids)))
{
- WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!",
error);
goto cleanup;
}
if ((error = handle_hotplug(rdpdr)))
{
- WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error);
+ WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
goto out;
}
/* file /proc/mounts changed, handle this */
if ((error = handle_hotplug(rdpdr)))
{
- WLog_ERR(TAG, "handle_hotplug failed with error %lu!", error);
+ WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
goto out;
}
else
if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = devman_load_device_service(rdpdr->devman, device,
rdpdr->rdpcontext)))
{
- WLog_ERR(TAG, "devman_load_device_service failed with error %lu!", error);
+ WLog_ERR(TAG, "devman_load_device_service failed with error %u!", error);
return error;
}
}
if (!irp)
{
- WLog_ERR(TAG, "irp_new failed with %lu!", error);
+ WLog_ERR(TAG, "irp_new failed with %u!", error);
return error;
}
IFCALLRET(irp->device->IRPRequest, error, irp->device, irp);
if (error)
- WLog_ERR(TAG, "device->IRPRequest failed with error %lu", error);
+ WLog_ERR(TAG, "device->IRPRequest failed with error %u", error);
return error;
}
if ((error = rdpdr_send_client_announce_reply(rdpdr)))
{
- WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %lu", error);
+ WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %u", error);
return error;
}
if ((error = rdpdr_send_client_name_request(rdpdr)))
{
- WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %lu", error);
+ WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %u", error);
return error;
}
if ((error = rdpdr_process_init(rdpdr)))
{
- WLog_ERR(TAG, "rdpdr_process_init failed with error %lu", error);
+ WLog_ERR(TAG, "rdpdr_process_init failed with error %u", error);
return error;
}
if ((error = rdpdr_send_capability_response(rdpdr)))
{
- WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %lu", error);
+ WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %u", error);
return error;
}
if ((error = rdpdr_send_device_list_announce_request(rdpdr, FALSE)))
{
- WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %lu",
+ WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %u",
error);
return error;
}
case PAKID_CORE_USER_LOGGEDON:
if ((error = rdpdr_send_device_list_announce_request(rdpdr, TRUE)))
{
- WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %lu",
+ WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %u",
error);
return error;
}
case PAKID_CORE_DEVICE_IOREQUEST:
if ((error = rdpdr_process_irp(rdpdr, s)))
{
- WLog_ERR(TAG, "rdpdr_process_irp failed with error %lu", error);
+ WLog_ERR(TAG, "rdpdr_process_irp failed with error %u", error);
return error;
}
if ((error = rdpdr_virtual_channel_event_data_received(rdpdr, pData,
dataLength, totalLength, dataFlags)))
WLog_ERR(TAG,
- "rdpdr_virtual_channel_event_data_received failed with error %lu!", error);
+ "rdpdr_virtual_channel_event_data_received failed with error %u!", error);
break;
if ((error = rdpdr_process_connect(rdpdr)))
{
- WLog_ERR(TAG, "rdpdr_process_connect failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpdr_process_connect failed with error %u!", error);
if (rdpdr->rdpcontext)
setChannelError(rdpdr->rdpcontext, error,
if ((error = rdpdr_process_receive(rdpdr, data)))
{
- WLog_ERR(TAG, "rdpdr_process_receive failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpdr_process_receive failed with error %u!", error);
if (rdpdr->rdpcontext)
setChannelError(rdpdr->rdpcontext, error,
&& (WaitForSingleObject(rdpdr->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = drive_hotplug_thread_terminate(rdpdr)))
{
- WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %lu!", error);
+ WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %u!", error);
return error;
}
case CHANNEL_EVENT_CONNECTED:
if ((error = rdpdr_virtual_channel_event_connected(rdpdr, pData, dataLength)))
- WLog_ERR(TAG, "rdpdr_virtual_channel_event_connected failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_virtual_channel_event_connected failed with error %u!",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = rdpdr_virtual_channel_event_disconnected(rdpdr)))
- WLog_ERR(TAG, "rdpdr_virtual_channel_event_disconnected failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_virtual_channel_event_disconnected failed with error %u!",
error);
break;
if ((error = rdpdr_server_write_general_capability_set(context, s)))
{
WLog_ERR(TAG,
- "rdpdr_server_write_general_capability_set failed with error %lu!", error);
+ "rdpdr_server_write_general_capability_set failed with error %u!", error);
return error;
}
{
if ((error = rdpdr_server_write_drive_capability_set(context, s)))
{
- WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %u!",
error);
return error;
}
{
if ((error = rdpdr_server_write_port_capability_set(context, s)))
{
- WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %u!",
error);
return error;
}
if ((error = rdpdr_server_write_printer_capability_set(context, s)))
{
WLog_ERR(TAG,
- "rdpdr_server_write_printer_capability_set failed with error %lu!", error);
+ "rdpdr_server_write_printer_capability_set failed with error %u!", error);
return error;
}
}
if ((error = rdpdr_server_write_smartcard_capability_set(context, s)))
{
WLog_ERR(TAG,
- "rdpdr_server_write_printer_capability_set failed with error %lu!", error);
+ "rdpdr_server_write_printer_capability_set failed with error %u!", error);
return error;
}
}
{
if ((status = rdpdr_server_read_capability_set_header(s, &capabilityHeader)))
{
- WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %u!",
status);
return status;
}
if ((status = rdpdr_server_read_general_capability_set(context, s,
&capabilityHeader)))
{
- WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %u!",
status);
return status;
}
if ((status = rdpdr_server_read_printer_capability_set(context, s,
&capabilityHeader)))
{
- WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %u!",
status);
return status;
}
if ((status = rdpdr_server_read_port_capability_set(context, s,
&capabilityHeader)))
{
- WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %u!",
status);
return status;
}
if ((status = rdpdr_server_read_drive_capability_set(context, s,
&capabilityHeader)))
{
- WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %u!",
status);
return status;
}
&capabilityHeader)))
{
WLog_ERR(TAG,
- "rdpdr_server_read_smartcard_capability_set failed with error %lu!", status);
+ "rdpdr_server_read_smartcard_capability_set failed with error %u!", status);
return status;
}
case PAKID_CORE_CLIENTID_CONFIRM:
if ((error = rdpdr_server_receive_announce_response(context, s, header)))
{
- WLog_ERR(TAG, "rdpdr_server_receive_announce_response failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_receive_announce_response failed with error %u!",
error);
return error;
}
case PAKID_CORE_CLIENT_NAME:
if ((error = rdpdr_server_receive_client_name_request(context, s, header)))
{
- WLog_ERR(TAG, "rdpdr_server_receive_client_name_request failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_receive_client_name_request failed with error %u!",
error);
return error;
}
if ((error = rdpdr_server_send_core_capability_request(context)))
{
WLog_ERR(TAG,
- "rdpdr_server_send_core_capability_request failed with error %lu!", error);
+ "rdpdr_server_send_core_capability_request failed with error %u!", error);
return error;
}
if ((error = rdpdr_server_send_client_id_confirm(context)))
{
- WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %u!",
error);
return error;
}
if ((error = rdpdr_server_receive_core_capability_response(context, s, header)))
{
WLog_ERR(TAG,
- "rdpdr_server_receive_core_capability_response failed with error %lu!", error);
+ "rdpdr_server_receive_core_capability_response failed with error %u!", error);
return error;
}
if (context->priv->UserLoggedOnPdu)
if ((error = rdpdr_server_send_user_logged_on(context)))
{
- WLog_ERR(TAG, "rdpdr_server_send_user_logged_on failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpdr_server_send_user_logged_on failed with error %u!", error);
return error;
}
header)))
{
WLog_ERR(TAG,
- "rdpdr_server_receive_device_list_announce_request failed with error %lu!",
+ "rdpdr_server_receive_device_list_announce_request failed with error %u!",
error);
return error;
}
if ((error = rdpdr_server_receive_device_io_completion(context, s, header)))
{
WLog_ERR(TAG,
- "rdpdr_server_receive_device_io_completion failed with error %lu!", error);
+ "rdpdr_server_receive_device_io_completion failed with error %u!", error);
return error;
}
header)))
{
WLog_ERR(TAG,
- "rdpdr_server_receive_device_io_completion failed with error %lu!", error);
+ "rdpdr_server_receive_device_io_completion failed with error %u!", error);
return error;
}
if ((error = rdpdr_server_send_announce_request(context)))
{
- WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %lu!",
+ WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %u!",
error);
goto out_stream;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
goto out_stream;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
goto out_stream;
}
if ((error = rdpdr_server_receive_pdu(context, s, &header)))
{
- WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %u!", error);
goto out_stream;
}
}
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = rdpdr_server_read_file_directory_information(s, &fdi)))
{
WLog_ERR(TAG,
- "rdpdr_server_read_file_directory_information failed with error %lu!", error);
+ "rdpdr_server_read_file_directory_information failed with error %u!", error);
return error;
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if ((error = rdpei_add_frame(context)))
{
- WLog_ERR(TAG, "rdpei_add_frame failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_add_frame failed with error %u!", error);
break;
}
{
if ((error = rdpei_send_frame(context)))
{
- WLog_ERR(TAG, "rdpei_send_frame failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_send_frame failed with error %u!", error);
break;
}
}
if ((status = rdpei_write_touch_frame(s, frame)))
{
- WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %lu!", status);
+ WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %u!", status);
Stream_Free(s, TRUE);
return status;
}
IFCALLRET(rdpei->SuspendTouch, error, rdpei);
if (error)
- WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %u!", error);
return error;
}
IFCALLRET(rdpei->ResumeTouch, error, rdpei);
if (error)
- WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %u!", error);
return error;
}
case EVENTID_SC_READY:
if ((error = rdpei_recv_sc_ready_pdu(callback, s)))
{
- WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %u!", error);
return error;
}
if ((error = rdpei_send_cs_ready_pdu(callback)))
{
- WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %u!", error);
return error;
}
case EVENTID_SUSPEND_TOUCH:
if ((error = rdpei_recv_suspend_touch_pdu(callback, s)))
{
- WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %u!", error);
return error;
}
case EVENTID_RESUME_TOUCH:
if ((error = rdpei_recv_resume_touch_pdu(callback, s)))
{
- WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %u!", error);
return error;
}
if ((error = pChannelMgr->CreateListener(pChannelMgr, RDPEI_DVC_CHANNEL_NAME, 0,
(IWTSListenerCallback*) rdpei->listener_callback, &(rdpei->listener))))
{
- WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %lu!", error);
+ WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %u!", error);
goto error_out;
}
if (WaitForSingleObject(rdpei->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = rdpei_send_touch_event_pdu(callback, &rdpei->frame)))
{
- WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %u!", error);
return error;
}
{
if ((error = context->TouchUpdate(context, externalId, x, y, &tempvalue)))
{
- WLog_ERR(TAG, "context->TouchUpdate failed with error %lu!", error);
+ WLog_ERR(TAG, "context->TouchUpdate failed with error %u!", error);
return error;
}
}
if ((error = context->AddContact(context, &contact)))
{
- WLog_ERR(TAG, "context->AddContact failed with error %lu!", error);
+ WLog_ERR(TAG, "context->AddContact failed with error %u!", error);
return error;
}
if ((error = pEntryPoints->RegisterPlugin(pEntryPoints, "rdpei",
(IWTSPlugin*) rdpei)))
{
- WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %lu!", error);
+ WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %u!", error);
error = CHANNEL_RC_NO_MEMORY;
goto error_out;
}
IFCALLRET(context->onClientReady, error, context);
if (error)
- WLog_ERR(TAG, "context->onClientReady failed with error %lu", error);
+ WLog_ERR(TAG, "context->onClientReady failed with error %u", error);
return error;
}
{
if ((error = read_touch_contact_data(context, s, contact)))
{
- WLog_ERR(TAG, "read_touch_contact_data failed with error %lu!", error);
+ WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error);
frame->contactCount = i;
touch_frame_reset(frame);
return error;
{
if ((error = read_touch_frame(context, s, frame)))
{
- WLog_ERR(TAG, "read_touch_contact_data failed with error %lu!", error);
+ WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error);
event->frameCount = i;
goto out_cleanup;
}
IFCALLRET(context->onTouchEvent, error, context, event);
if (error)
- WLog_ERR(TAG, "context->onTouchEvent failed with error %lu", error);
+ WLog_ERR(TAG, "context->onTouchEvent failed with error %u", error);
out_cleanup:
touch_event_reset(event);
IFCALLRET(context->onTouchReleased, error, context, contactId);
if (error)
- WLog_ERR(TAG, "context->onTouchReleased failed with error %lu", error);
+ WLog_ERR(TAG, "context->onTouchReleased failed with error %u", error);
return error;
}
if ((error = read_cs_ready_message(context, s)))
{
- WLog_ERR(TAG, "read_cs_ready_message failed with error %lu", error);
+ WLog_ERR(TAG, "read_cs_ready_message failed with error %u", error);
return error;
}
break;
case EVENTID_TOUCH:
if ((error = read_touch_event(context, s)))
{
- WLog_ERR(TAG, "read_touch_event failed with error %lu", error);
+ WLog_ERR(TAG, "read_touch_event failed with error %u", error);
return error;
}
break;
case EVENTID_DISMISS_HOVERING_CONTACT:
if ((error = read_dismiss_hovering_contact(context, s)))
{
- WLog_ERR(TAG, "read_dismiss_hovering_contact failed with error %lu", error);
+ WLog_ERR(TAG, "read_dismiss_hovering_contact failed with error %u", error);
return error;
}
break;
regionRect = &(meta->regionRects[index]);
if ((error = rdpgfx_read_rect16(s, regionRect)))
{
- WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
goto error_out;
}
WLog_DBG(TAG, "regionRects[%d]: left: %d top: %d right: %d bottom: %d",
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.meta))))
{
- WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error);
return error;
}
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
- WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
}
free(h264.meta.regionRects);
pos1 = Stream_GetPosition(s);
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[0].meta))))
{
- WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error);
return error;
}
pos2 = Stream_GetPosition(s);
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[1].meta))))
{
- WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error);
return error;
}
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
- WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
}
free(h264.bitstream[0].meta.regionRects);
case RDPGFX_CODECID_AVC420:
if ((error = rdpgfx_decode_AVC420(gfx, cmd)))
{
- WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %u", error);
return error;
}
break;
case RDPGFX_CODECID_AVC444:
if ((error = rdpgfx_decode_AVC444(gfx, cmd)))
{
- WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %u", error);
return error;
}
break;
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
- WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
}
break;
}
if ((error = rdpgfx_write_header(s, &header)))
{
- WLog_ERR(TAG, "rdpgfx_write_header failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error);
return error;
}
if ((error = rdpgfx_write_header(s, &header)))
{
- WLog_ERR(TAG, "rdpgfx_write_header failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error);
return error;
}
IFCALLRET(context->ResetGraphics, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->ResetGraphics failed with error %lu", error);
+ WLog_ERR(TAG, "context->ResetGraphics failed with error %u", error);
}
free(pdu.monitorDefArray);
IFCALLRET(context->EvictCacheEntry, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->EvictCacheEntry failed with error %lu", error);
+ WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error);
}
return error;
IFCALLRET(context->CacheImportReply, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->CacheImportReply failed with error %lu", error);
+ WLog_ERR(TAG, "context->CacheImportReply failed with error %u", error);
}
free(pdu.cacheSlots);
IFCALLRET(context->CreateSurface, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->CreateSurface failed with error %lu", error);
+ WLog_ERR(TAG, "context->CreateSurface failed with error %u", error);
}
return error;
IFCALLRET(context->DeleteSurface, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->DeleteSurface failed with error %lu", error);
+ WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error);
}
return error;
IFCALLRET(context->StartFrame, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->StartFrame failed with error %lu", error);
+ WLog_ERR(TAG, "context->StartFrame failed with error %u", error);
}
gfx->UnacknowledgedFrames++;
}
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
- WLog_DBG(TAG, "RecvEndFramePdu: frameId: %d", pdu.frameId);
+ WLog_DBG(TAG, "RecvEndFramePdu: frameId: %lu", (unsigned long) pdu.frameId);
if (context)
{
if (error)
{
- WLog_ERR(TAG, "context->EndFrame failed with error %lu", error);
+ WLog_ERR(TAG, "context->EndFrame failed with error %u", error);
return error;
}
}
if (gfx->TotalDecodedFrames == 1)
if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
- WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %u", error);
}
else
{
ack.queueDepth = QUEUE_DEPTH_UNAVAILABLE;
if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
- WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %u", error);
}
return error;
if ((error = rdpgfx_read_rect16(s, &(pdu.destRect)))) /* destRect (8 bytes) */
{
- WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u", error);
return error;
}
pdu.bitmapData = Stream_Pointer(s);
Stream_Seek(s, pdu.bitmapDataLength);
WLog_DBG(TAG,
- "RecvWireToSurface1Pdu: surfaceId: %lu codecId: %s (0x%04lX) pixelFormat: 0x%04lX "
- "destRect: left: %lu top: %lu right: %lu bottom: %lu bitmapDataLength: %lu",
- pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId,
- pdu.pixelFormat,
- pdu.destRect.left, pdu.destRect.top, pdu.destRect.right, pdu.destRect.bottom,
- pdu.bitmapDataLength);
+ "RecvWireToSurface1Pdu: surfaceId: %lu codecId: %s (0x%04lX) pixelFormat: 0x%04lX "
+ "destRect: left: %lu top: %lu right: %lu bottom: %lu bitmapDataLength: %lu",
+ (unsigned long) pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId),
+ (unsigned long) pdu.codecId, (unsigned long) pdu.pixelFormat,
+ (unsigned long) pdu.destRect.left, (unsigned long) pdu.destRect.top,
+ (unsigned long) pdu.destRect.right, (unsigned long) pdu.destRect.bottom,
+ (unsigned long) pdu.bitmapDataLength);
cmd.surfaceId = pdu.surfaceId;
cmd.codecId = pdu.codecId;
cmd.contextId = 0;
cmd.data = pdu.bitmapData;
if ((error = rdpgfx_decode(gfx, &cmd)))
- WLog_ERR(TAG, "rdpgfx_decode failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_decode failed with error %u!", error);
return error;
}
IFCALLRET(context->SurfaceCommand, error, context, &cmd);
if (error)
- WLog_ERR(TAG, "context->SurfaceCommand failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
}
return error;
IFCALLRET(context->DeleteEncodingContext, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %lu", error);
+ WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %u", error);
}
return error;
if ((error = rdpgfx_read_color32(s,
&(pdu.fillPixel)))) /* fillPixel (4 bytes) */
{
- WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %u!", error);
return error;
}
if ((error = rdpgfx_read_rect16(s, fillRect)))
{
- WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
free(pdu.fillRects);
return error;
}
IFCALLRET(context->SolidFill, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->SolidFill failed with error %lu", error);
+ WLog_ERR(TAG, "context->SolidFill failed with error %u", error);
}
free(pdu.fillRects);
if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */
{
- WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
return error;
}
if ((error = rdpgfx_read_point16(s, destPt)))
{
- WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u!", error);
free(pdu.destPts);
return error;
}
IFCALLRET(context->SurfaceToSurface, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->SurfaceToSurface failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceToSurface failed with error %u", error);
}
free(pdu.destPts);
if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */
{
- WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
return error;
}
IFCALLRET(context->SurfaceToCache, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->SurfaceToCache failed with error %lu", error);
+ WLog_ERR(TAG, "context->SurfaceToCache failed with error %u", error);
}
return error;
if ((error = rdpgfx_read_point16(s, destPt)))
{
- WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u", error);
free(pdu.destPts);
return error;
}
IFCALLRET(context->CacheToSurface, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->CacheToSurface failed with error %lu", error);
+ WLog_ERR(TAG, "context->CacheToSurface failed with error %u", error);
}
free(pdu.destPts);
IFCALLRET(context->MapSurfaceToOutput, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %lu", error);
+ WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %u", error);
}
return error;
IFCALLRET(context->MapSurfaceToWindow, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %lu", error);
+ WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %u", error);
}
return error;
if ((error = rdpgfx_read_header(s, &header)))
{
- WLog_ERR(TAG, "rdpgfx_read_header failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error);
return error;
}
{
case RDPGFX_CMDID_WIRETOSURFACE_1:
if ((error = rdpgfx_recv_wire_to_surface_1_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_1_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_1_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_WIRETOSURFACE_2:
if ((error = rdpgfx_recv_wire_to_surface_2_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_2_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_2_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_DELETEENCODINGCONTEXT:
if ((error = rdpgfx_recv_delete_encoding_context_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_delete_encoding_context_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_delete_encoding_context_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_SOLIDFILL:
if ((error = rdpgfx_recv_solid_fill_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_solid_fill_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_solid_fill_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_SURFACETOSURFACE:
if ((error = rdpgfx_recv_surface_to_surface_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_surface_to_surface_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_surface_to_surface_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_SURFACETOCACHE:
if ((error = rdpgfx_recv_surface_to_cache_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_surface_to_cache_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_surface_to_cache_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_CACHETOSURFACE:
if ((error = rdpgfx_recv_cache_to_surface_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_cache_to_surface_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_cache_to_surface_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_EVICTCACHEENTRY:
if ((error = rdpgfx_recv_evict_cache_entry_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_evict_cache_entry_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_evict_cache_entry_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_CREATESURFACE:
if ((error = rdpgfx_recv_create_surface_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_create_surface_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_create_surface_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_DELETESURFACE:
if ((error = rdpgfx_recv_delete_surface_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_delete_surface_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_delete_surface_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_STARTFRAME:
if ((error = rdpgfx_recv_start_frame_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_start_frame_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_start_frame_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_ENDFRAME:
if ((error = rdpgfx_recv_end_frame_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_end_frame_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_end_frame_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_RESETGRAPHICS:
if ((error = rdpgfx_recv_reset_graphics_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_reset_graphics_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_reset_graphics_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_MAPSURFACETOOUTPUT:
if ((error = rdpgfx_recv_map_surface_to_output_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_output_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_output_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_CACHEIMPORTREPLY:
if ((error = rdpgfx_recv_cache_import_reply_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_cache_import_reply_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_cache_import_reply_pdu failed with error %u!",
error);
break;
case RDPGFX_CMDID_CAPSCONFIRM:
if ((error = rdpgfx_recv_caps_confirm_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_caps_confirm_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_caps_confirm_pdu failed with error %u!", error);
break;
case RDPGFX_CMDID_MAPSURFACETOWINDOW:
if ((error = rdpgfx_recv_map_surface_to_window_pdu(callback, s)))
- WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_window_pdu failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_window_pdu failed with error %u!",
error);
break;
{
if ((error = rdpgfx_recv_pdu(callback, s)))
{
- WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %u!", error);
break;
}
}
if (error)
{
- WLog_ERR(TAG, "context->DeleteSurface failed with error %lu", error);
+ WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error);
free(pKeys);
free(context);
free(gfx);
if (error)
{
- WLog_ERR(TAG, "context->EvictCacheEntry failed with error %lu", error);
+ WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error);
free(context);
free(gfx);
return error;
if ((error = rdpgfx_server_packet_init_header(s, cmdId, pduLength)))
{
- WLog_ERR(TAG, "Failed to init header with error %lu!", error);
+ WLog_ERR(TAG, "Failed to init header with error %u!", error);
goto error;
}
if (pdu->monitorCount >= 16)
{
WLog_ERR(TAG, "Monitor count MUST be less than or equal to 16: %lu",
- pdu->monitorCount);
+ (unsigned long) pdu->monitorCount);
return ERROR_INVALID_DATA;
}
if ((error = rdpgfx_write_rect16(s, regionRect)))
{
- WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
return error;
}
}
if ((error = rdpgfx_write_h264_metablock(s, &(havc420->meta))))
{
- WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %lu!",
+ WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %u!",
error);
return error;
}
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Failed to init header with error %lu!", error);
+ WLog_ERR(TAG, "Failed to init header with error %u!", error);
goto error;
}
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Failed to init header with error %lu!", error);
+ WLog_ERR(TAG, "Failed to init header with error %u!", error);
goto error;
}
if (error != CHANNEL_RC_OK)
{
- WLog_ERR(TAG, "Failed to init header with error %lu!", error);
+ WLog_ERR(TAG, "Failed to init header with error %u!", error);
goto error;
}
/* fillPixel (4 bytes) */
if ((error = rdpgfx_write_color32(s, &(pdu->fillPixel))))
{
- WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %u!", error);
goto error;
}
if ((error = rdpgfx_write_rect16(s, fillRect)))
{
- WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
goto error;
}
}
/* rectSrc (8 bytes ) */
if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc))))
{
- WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
goto error;
}
if ((error = rdpgfx_write_point16(s, destPt)))
{
- WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u!", error);
goto error;
}
}
/* rectSrc (8 bytes ) */
if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc))))
{
- WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
goto error;
}
if ((error = rdpgfx_write_point16(s, destPt)))
{
- WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %lu", error);
+ WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u", error);
goto error;
}
}
IFCALLRET(context->FrameAcknowledge, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->FrameAcknowledge failed with error %lu",
+ WLog_ERR(TAG, "context->FrameAcknowledge failed with error %u",
error);
}
IFCALLRET(context->CacheImportOffer, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->CacheImportOffer failed with error %lu",
+ WLog_ERR(TAG, "context->CacheImportOffer failed with error %u",
error);
}
if (capsDataLength != 4)
{
- WLog_ERR(TAG, "capsDataLength does not equal to 4: %lu",
+ WLog_ERR(TAG, "capsDataLength does not equal to 4: %u",
capsDataLength);
free(capsSets);
return ERROR_INVALID_DATA;
IFCALLRET(context->CapsAdvertise, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->CapsAdvertise failed with error %lu", error);
+ WLog_ERR(TAG, "context->CapsAdvertise failed with error %u", error);
}
free(capsSets);
IFCALLRET(context->QoeFrameAcknowledge, error, context, &pdu);
if (error)
- WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %lu",
+ WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %u",
error);
}
if ((error = rdpgfx_read_header(s, &header)))
{
- WLog_ERR(TAG, "rdpgfx_read_header failed with error %lu!", error);
+ WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error);
return error;
}
case RDPGFX_CMDID_FRAMEACKNOWLEDGE:
if ((error = rdpgfx_recv_frame_acknowledge_pdu(context, s)))
WLog_ERR(TAG, "rdpgfx_recv_frame_acknowledge_pdu "
- "failed with error %lu!", error);
+ "failed with error %u!", error);
break;
case RDPGFX_CMDID_CACHEIMPORTOFFER:
if ((error = rdpgfx_recv_cache_import_offer_pdu(context, s)))
WLog_ERR(TAG, "rdpgfx_recv_cache_import_offer_pdu "
- "failed with error %lu!", error);
+ "failed with error %u!", error);
break;
case RDPGFX_CMDID_CAPSADVERTISE:
if ((error = rdpgfx_recv_caps_advertise_pdu(context, s)))
WLog_ERR(TAG, "rdpgfx_recv_caps_advertise_pdu "
- "failed with error %lu!", error);
+ "failed with error %u!", error);
break;
case RDPGFX_CMDID_QOEFRAMEACKNOWLEDGE:
if ((error = rdpgfx_recv_qoe_frame_acknowledge_pdu(context, s)))
WLog_ERR(TAG, "rdpgfx_recv_qoe_frame_acknowledge_pdu "
- "failed with error %lu!", error);
+ "failed with error %u!", error);
break;
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
break;
}
if ((error = rdpgfx_server_handle_messages(context)))
{
- WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %lu",
+ WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %u",
error);
break;
}
if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu",
- GetLastError());
+ (unsigned long)GetLastError());
return FALSE;
}
if ((ret = rdpgfx_server_receive_pdu(context, s)))
{
WLog_ERR(TAG, "rdpgfx_server_receive_pdu "
- "failed with error %lu!", ret);
+ "failed with error %u!", ret);
return ret;
}
}
{
if ((error = rdpsnd_alsa_parse_addin_args((rdpsndDevicePlugin *) alsa, args)))
{
- WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %lu", error);
+ WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %u", error);
goto error_parse_args;
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
entryPoints.args = args;
if ((error = entry(&entryPoints)))
- WLog_ERR(TAG, "%s entry returns error %lu", name, error);
+ WLog_ERR(TAG, "%s entry returns error %u", name, error);
WLog_INFO(TAG, "Loaded %s backend for rdpsnd", name);
return error;
if ((status = rdpsnd_load_device_plugin(rdpsnd, rdpsnd->subsystem, args)))
{
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
rdpsnd->subsystem, status);
return status;
}
device_name = "";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "default";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "default";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
device_name = "";
if ((status = rdpsnd_load_device_plugin(rdpsnd, subsystem_name, args)))
- WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %lu",
+ WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
subsystem_name, status);
}
if (WaitForSingleObject(rdpsnd->ScheduleThread, INFINITE) == WAIT_FAILED)
{
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
return;
}
if ((error = rdpsnd_virtual_channel_event_data_received(rdpsnd, pData,
dataLength, totalLength, dataFlags)))
WLog_ERR(TAG,
- "rdpsnd_virtual_channel_event_data_received failed with error %lu", error);
+ "rdpsnd_virtual_channel_event_data_received failed with error %u", error);
break;
if (WaitForSingleObject(rdpsnd->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
{
case CHANNEL_EVENT_CONNECTED:
if ((error = rdpsnd_virtual_channel_event_connected(plugin, pData, dataLength)))
- WLog_ERR(TAG, "rdpsnd_virtual_channel_event_connected failed with error %lu!",
+ WLog_ERR(TAG, "rdpsnd_virtual_channel_event_connected failed with error %u!",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = rdpsnd_virtual_channel_event_disconnected(plugin)))
WLog_ERR(TAG,
- "rdpsnd_virtual_channel_event_disconnected failed with error %lu!", error);
+ "rdpsnd_virtual_channel_event_disconnected failed with error %u!", error);
break;
if (plugin->thread != NULL)
if ((error = rdpsnd_virtual_channel_event_disconnected(plugin)))
WLog_ERR(TAG,
- "rdpsnd_virtual_channel_event_disconnected failed with error %lu!", error);
+ "rdpsnd_virtual_channel_event_disconnected failed with error %u!", error);
rdpsnd_virtual_channel_event_terminated(plugin);
plugin = NULL;
IFCALLRET(context->ConfirmBlock, error, context, confirmBlockNum, timestamp);
if (error)
- WLog_ERR(TAG, "context->ConfirmBlock failed with error %lu", error);
+ WLog_ERR(TAG, "context->ConfirmBlock failed with error %u", error);
return error;
}
if ((error = rdpsnd_server_send_formats(context, context->priv->rdpsnd_pdu)))
{
- WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %lu", error);
+ WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %u", error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
if ((error = rdpsnd_server_handle_messages(context)))
{
- WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %lu", error);
+ WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %u", error);
break;
}
}
{
if ((error = rdpsnd_server_send_audio_pdu(context, wTimestamp)))
{
- WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error);
break;
}
}
}
else if ((error = rdpsnd_server_send_audio_pdu(context, 0)))
{
- WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error);
}
}
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((ChannelNameLen % 2) != 0)
{
- WLog_ERR(TAG, "ChannelNameLen % 2) != 0 ");
+ WLog_ERR(TAG, "ChannelNameLen %% 2) != 0 ");
return ERROR_INVALID_DATA;
}
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
if ((error = remdesk_generate_expert_blob(remdesk)))
{
- WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu", error);
+ WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u", error);
return error;
}
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
out:
free(raConnectionStringW);
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
out:
free(raConnectionStringW);
if ((error = remdesk_generate_expert_blob(remdesk)))
{
- WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error);
return error;
}
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
out:
free(expertBlobW);
if ((error = remdesk_generate_expert_blob(remdesk)))
{
- WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error);
return error;
}
case REMDESK_CTL_RESULT:
if ((error = remdesk_recv_ctl_result_pdu(remdesk, s, header, &result)))
- WLog_ERR(TAG, "remdesk_recv_ctl_result_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "remdesk_recv_ctl_result_pdu failed with error %u", error);
break;
case REMDESK_CTL_SERVER_ANNOUNCE:
if ((error = remdesk_recv_ctl_server_announce_pdu(remdesk, s, header)))
- WLog_ERR(TAG, "remdesk_recv_ctl_server_announce_pdu failed with error %lu",
+ WLog_ERR(TAG, "remdesk_recv_ctl_server_announce_pdu failed with error %u",
error);
break;
case REMDESK_CTL_VERSIONINFO:
if ((error = remdesk_recv_ctl_version_info_pdu(remdesk, s, header)))
{
- WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %u", error);
break;
}
{
if ((error = remdesk_send_ctl_version_info_pdu(remdesk)))
{
- WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u", error);
break;
}
if ((error = remdesk_send_ctl_authenticate_pdu(remdesk)))
{
- WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %lu", error);
+ WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %u", error);
break;
}
if ((error = remdesk_send_ctl_remote_control_desktop_pdu(remdesk)))
{
WLog_ERR(TAG,
- "remdesk_send_ctl_remote_control_desktop_pdu failed with error %lu", error);
+ "remdesk_send_ctl_remote_control_desktop_pdu failed with error %u", error);
break;
}
}
{
if ((error = remdesk_send_ctl_expert_on_vista_pdu(remdesk)))
{
- WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %lu",
+ WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %u",
error);
break;
}
if ((error = remdesk_send_ctl_verify_password_pdu(remdesk)))
{
- WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %lu",
+ WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %u",
error);
break;
}
if ((status = remdesk_read_channel_header(s, &header)))
{
- WLog_ERR(TAG, "remdesk_read_channel_header failed with error %lu", status);
+ WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u", status);
return status;
}
if ((error = remdesk_virtual_channel_event_data_received(remdesk, pData,
dataLength, totalLength, dataFlags)))
WLog_ERR(TAG,
- "remdesk_virtual_channel_event_data_received failed with error %lu!", error);
+ "remdesk_virtual_channel_event_data_received failed with error %u!", error);
break;
break;
default:
- WLog_ERR(TAG, "unhandled event %lu!", event);
+ WLog_ERR(TAG, "unhandled event %u!", event);
error = ERROR_INTERNAL_ERROR;
}
if ((error = remdesk_process_receive(remdesk, data)))
{
- WLog_ERR(TAG, "remdesk_process_receive failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_process_receive failed with error %u!", error);
break;
}
}
&& (WaitForSingleObject(remdesk->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", rc);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
return rc;
}
case CHANNEL_EVENT_CONNECTED:
if ((error = remdesk_virtual_channel_event_connected(remdesk, pData,
dataLength)))
- WLog_ERR(TAG, "remdesk_virtual_channel_event_connected failed with error %lu",
+ WLog_ERR(TAG, "remdesk_virtual_channel_event_connected failed with error %u",
error);
break;
case CHANNEL_EVENT_DISCONNECTED:
if ((error = remdesk_virtual_channel_event_disconnected(remdesk)))
WLog_ERR(TAG,
- "remdesk_virtual_channel_event_disconnected failed with error %lu", error);
+ "remdesk_virtual_channel_event_disconnected failed with error %u", error);
break;
if ((ChannelNameLen % 2) != 0)
{
- WLog_ERR(TAG, "(ChannelNameLen % 2) != 0!");
+ WLog_ERR(TAG, "(ChannelNameLen %% 2) != 0!");
return ERROR_INVALID_DATA;
}
if ((error = remdesk_write_channel_header(s,
(REMDESK_CHANNEL_HEADER*) ctlHeader)))
{
- WLog_ERR(TAG, "remdesk_write_channel_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_write_channel_header failed with error %u!", error);
return error;
}
if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_RESULT,
4)))
{
- WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error);
return error;
}
if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader))))
{
- WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error);
goto out;
}
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(context, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
out:
Stream_Free(s, TRUE);
if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader),
REMDESK_CTL_VERSIONINFO, 8)))
{
- WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error);
return error;
}
if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader))))
{
- WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error);
goto out;
}
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(context, s)))
- WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
out:
Stream_Free(s, TRUE);
free(pdu.raConnectionString);
if ((error = remdesk_send_ctl_result_pdu(context, 0)))
- WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %u!", error);
return error;
}
WLog_INFO(TAG, "ExpertBlob: %s", pdu.expertBlob);
if ((error = remdesk_send_ctl_result_pdu(context, 0)))
- WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %u!", error);
return error;
}
if ((error = remdesk_recv_ctl_remote_control_desktop_pdu(context, s, header)))
{
WLog_ERR(TAG,
- "remdesk_recv_ctl_remote_control_desktop_pdu failed with error %lu!", error);
+ "remdesk_recv_ctl_remote_control_desktop_pdu failed with error %u!", error);
return error;
}
case REMDESK_CTL_AUTHENTICATE:
if ((error = remdesk_recv_ctl_authenticate_pdu(context, s, header)))
{
- WLog_ERR(TAG, "remdesk_recv_ctl_authenticate_pdu failed with error %lu!",
+ WLog_ERR(TAG, "remdesk_recv_ctl_authenticate_pdu failed with error %u!",
error);
return error;
}
case REMDESK_CTL_VERSIONINFO:
if ((error = remdesk_recv_ctl_version_info_pdu(context, s, header)))
{
- WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %lu!",
+ WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %u!",
error);
return error;
}
case REMDESK_CTL_VERIFY_PASSWORD:
if ((error = remdesk_recv_ctl_verify_password_pdu(context, s, header)))
{
- WLog_ERR(TAG, "remdesk_recv_ctl_verify_password_pdu failed with error %lu!",
+ WLog_ERR(TAG, "remdesk_recv_ctl_verify_password_pdu failed with error %u!",
error);
return error;
}
if ((error = remdesk_read_channel_header(s, &header)))
{
- WLog_ERR(TAG, "remdesk_read_channel_header failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u!", error);
return error;
}
{
if ((error = remdesk_recv_ctl_pdu(context, s, &header)))
{
- WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %u!", error);
return error;
}
}
if ((error = remdesk_send_ctl_version_info_pdu(context)))
{
- WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %lu!",
+ WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u!",
error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
break;
}
if ((error = remdesk_server_receive_pdu(context, s)))
{
- WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %lu!", error);
+ WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %u!", error);
break;
}
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
irp->IoStatus = _GetLastErrorToIoStatus(serial);
}
- WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes written to %s", nbWritten,
+ WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes written to %s", (unsigned long) nbWritten,
serial->device.name);
Stream_Write_UINT32(irp->output, nbWritten); /* Length (4 bytes) */
Stream_Write_UINT8(irp->output, 0); /* Padding (1 byte) */
case IRP_MJ_READ:
if ((error = serial_process_irp_read(serial, irp)))
- WLog_ERR(TAG, "serial_process_irp_read failed with error %lu!", error);
+ WLog_ERR(TAG, "serial_process_irp_read failed with error %u!", error);
break;
case IRP_MJ_DEVICE_CONTROL:
if ((error = serial_process_irp_device_control(serial, irp)))
- WLog_ERR(TAG, "serial_process_irp_device_control failed with error %lu!",
+ WLog_ERR(TAG, "serial_process_irp_device_control failed with error %u!",
error);
break;
/* blocks until the end of the request */
if ((error = serial_process_irp(data->serial, data->irp)))
{
- WLog_ERR(TAG, "serial_process_irp failed with error %lu", error);
+ WLog_ERR(TAG, "serial_process_irp failed with error %u", error);
goto error_out;
}
if (WaitForSingleObject(serial->MainThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) serial)))
{
- WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %lu!", error);
+ WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %u!", error);
goto error_out;
}
if (waitStatus == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (waitStatus == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
{
if ((status = smartcard_irp_device_control_call(smartcard, operation)))
{
- WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %lu",
+ WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %u",
status);
break;
}
if (MessageQueue_PostQuit(pContext->IrpQueue, 0)
&& (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED))
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
CloseHandle(pContext->thread);
MessageQueue_Free(pContext->IrpQueue);
if (MessageQueue_PostQuit(pContext->IrpQueue, 0)
&& (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED))
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
CloseHandle(pContext->thread);
MessageQueue_Free(pContext->IrpQueue);
&& (WaitForSingleObject(smartcard->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
{
if ((status = smartcard_irp_device_control_call(smartcard, operation)))
{
- WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %lu!",
+ WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %ld!",
status);
return (UINT32)status;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
goto out;
}
if ((error = smartcard_complete_irp(smartcard, irp)))
{
- WLog_ERR(TAG, "smartcard_complete_irp failed with error %lu!", error);
+ WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error);
goto out;
}
}
{
if ((error = smartcard_process_irp(smartcard, irp)))
{
- WLog_ERR(TAG, "smartcard_process_irp failed with error %lu!", error);
+ WLog_ERR(TAG, "smartcard_process_irp failed with error %u!", error);
goto out;
}
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
goto out;
}
- WLog_ERR(TAG, "smartcard_complete_irp failed with error %lu!", error);
+ WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error);
goto out;
}
}
if ((status = smartcard_unpack_establish_context_call(smartcard, irp->input, call)))
{
- WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %ld", status);
return status;
}
smartcard_trace_establish_context_call(smartcard, call);
}
else
{
- WLog_ERR(TAG, "SCardEstablishContext failed with error %lu", status);
+ WLog_ERR(TAG, "SCardEstablishContext failed with error %ld", status);
return status;
}
smartcard_trace_establish_context_return(smartcard, &ret);
if ((status = smartcard_pack_establish_context_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_establish_context_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_establish_context_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
smartcard_trace_context_call(smartcard, call, "ReleaseContext");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
}
else
{
- WLog_ERR(TAG, "SCardReleaseContext failed with error %lu", status);
+ WLog_ERR(TAG, "SCardReleaseContext failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
smartcard_trace_context_call(smartcard, call, "IsValidContext");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
Long_Return ret;
if ((status = ret.ReturnCode = SCardIsValidContext(operation->hContext)))
{
- WLog_ERR(TAG, "SCardIsValidContext failed with error %lu", status);
+ WLog_ERR(TAG, "SCardIsValidContext failed with error %ld", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "IsValidContext");
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_list_readers_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %ld", status);
smartcard_trace_list_readers_call(smartcard, call, FALSE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
if (status)
{
- WLog_ERR(TAG, "SCardListReadersA failed with error %lu", status);
+ WLog_ERR(TAG, "SCardListReadersA failed with error %ld", status);
return status;
}
smartcard_trace_list_readers_return(smartcard, &ret, FALSE);
if ((status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_list_readers_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %ld", status);
smartcard_trace_list_readers_call(smartcard, call, TRUE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
if (status)
{
- WLog_ERR(TAG, "SCardListReadersW failed with error %lu", status);
+ WLog_ERR(TAG, "SCardListReadersW failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_get_status_change_a_call(smartcard, irp->input, call)))
{
- WLog_ERR(TAG, "smartcard_unpack_get_status_change_a_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_get_status_change_a_call failed with error %ld", status);
return status;
}
smartcard_trace_get_status_change_return(smartcard, &ret, FALSE);
if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_get_status_change_w_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_get_status_change_w_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_get_status_change_w_call failed with error %ld", status);
smartcard_trace_get_status_change_w_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
smartcard_trace_get_status_change_return(smartcard, &ret, TRUE);
if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
smartcard_trace_context_call(smartcard, call, "Cancel");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
if ((status = ret.ReturnCode = SCardCancel(operation->hContext)))
{
- WLog_ERR(TAG, "SCardCancel failed with error %lu", status);
+ WLog_ERR(TAG, "SCardCancel failed with error %ld", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "Cancel");
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_connect_a_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_connect_a_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_connect_a_call failed with error %ld", status);
smartcard_trace_connect_a_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext));
return status;
if (status)
{
- WLog_ERR(TAG, "SCardConnectA failed with error %lu", status);
+ WLog_ERR(TAG, "SCardConnectA failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_connect_w_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_connect_w_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_connect_w_call failed with error %ld", status);
smartcard_trace_connect_w_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext));
if (status)
{
- WLog_ERR(TAG, "SCardConnectW failed with error %lu", status);
+ WLog_ERR(TAG, "SCardConnectW failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_reconnect_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %ld", status);
smartcard_trace_reconnect_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
smartcard_trace_reconnect_return(smartcard, &ret);
if ((status = smartcard_pack_reconnect_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_reconnect_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_reconnect_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status);
smartcard_trace_hcard_and_disposition_call(smartcard, call, "Disconnect");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
Long_Return ret;
if ((status = ret.ReturnCode = SCardDisconnect(operation->hCard, call->dwDisposition)))
{
- WLog_ERR(TAG, "SCardDisconnect failed with error %lu", status);
+ WLog_ERR(TAG, "SCardDisconnect failed with error %ld", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "Disconnect");
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status);
smartcard_trace_hcard_and_disposition_call(smartcard, call, "BeginTransaction");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
Long_Return ret;
if ((ret.ReturnCode = SCardBeginTransaction(operation->hCard)))
{
- WLog_ERR(TAG, "SCardBeginTransaction failed with error %lu", ret.ReturnCode);
+ WLog_ERR(TAG, "SCardBeginTransaction failed with error %ld", ret.ReturnCode);
return ret.ReturnCode;
}
smartcard_trace_long_return(smartcard, &ret, "BeginTransaction");
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_hcard_and_disposition_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %ld", status);
smartcard_trace_hcard_and_disposition_call(smartcard, call, "EndTransaction");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
Long_Return ret;
if ((ret.ReturnCode = SCardEndTransaction(operation->hCard, call->dwDisposition)))
{
- WLog_ERR(TAG, "SCardEndTransaction failed with error %lu", ret.ReturnCode);
+ WLog_ERR(TAG, "SCardEndTransaction failed with error %ld", ret.ReturnCode);
return ret.ReturnCode;
}
smartcard_trace_long_return(smartcard, &ret, "EndTransaction");
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_state_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %ld", status);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
return status;
ret.ReturnCode = SCardState(operation->hCard, &ret.dwState, &ret.dwProtocol, (BYTE*) &ret.rgAtr, &ret.cbAtrLen);
if ((status = smartcard_pack_state_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_state_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_state_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_status_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status);
smartcard_trace_status_call(smartcard, call, FALSE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
smartcard_trace_status_return(smartcard, &ret, FALSE);
if ((status = smartcard_pack_status_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_status_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_status_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_status_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status);
smartcard_trace_status_call(smartcard, call, TRUE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
smartcard_trace_status_return(smartcard, &ret, TRUE);
if ((status = smartcard_pack_status_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_status_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_status_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_transmit_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %ld", status);
smartcard_trace_transmit_call(smartcard, call);
smartcard_trace_transmit_return(smartcard, &ret);
if ((status = smartcard_pack_transmit_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_transmit_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_transmit_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_control_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %ld", status);
smartcard_trace_control_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
smartcard_trace_control_return(smartcard, &ret);
if ((status = smartcard_pack_control_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_control_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_control_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_get_attrib_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_get_attrib_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_get_attrib_call failed with error %ld", status);
smartcard_trace_get_attrib_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
operation->hCard = smartcard_scard_handle_native_from_redir(smartcard, &(call->hCard));
if ((status = smartcard_pack_get_attrib_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %ld", status);
return status;
}
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_locate_cards_by_atr_a_call(smartcard, irp->input, call)))
- WLog_ERR(TAG, "smartcard_unpack_locate_cards_by_atr_a_call failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_locate_cards_by_atr_a_call failed with error %ld", status);
smartcard_trace_locate_cards_by_atr_a_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
smartcard_trace_get_status_change_return(smartcard, &ret, FALSE);
if ((status = smartcard_pack_get_status_change_return(smartcard, irp->output, &ret)))
{
- WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %ld", status);
return status;
}
if (Stream_GetRemainingLength(irp->input) < 32)
{
- WLog_WARN(TAG, "Device Control Request is too short: %d",
- (int) Stream_GetRemainingLength(irp->input));
+ WLog_WARN(TAG, "Device Control Request is too short: %lu",
+ (unsigned long) Stream_GetRemainingLength(irp->input));
return SCARD_F_INTERNAL_ERROR;
}
if (Stream_Length(irp->input) != (Stream_GetPosition(irp->input) + inputBufferLength))
{
- WLog_WARN(TAG, "InputBufferLength mismatch: Actual: %d Expected: %d",
- Stream_Length(irp->input), Stream_GetPosition(irp->input) + inputBufferLength);
+ WLog_WARN(TAG, "InputBufferLength mismatch: Actual: %lu Expected: %lu",
+ (unsigned long) Stream_Length(irp->input),
+ (unsigned long) (Stream_GetPosition(irp->input) + inputBufferLength));
return SCARD_F_INTERNAL_ERROR;
}
{
if ((status = smartcard_unpack_common_type_header(smartcard, irp->input)))
{
- WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %ld", status);
return SCARD_F_INTERNAL_ERROR;
}
if ((status = smartcard_unpack_private_type_header(smartcard, irp->input)))
{
- WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %ld", status);
return SCARD_F_INTERNAL_ERROR;
}
}
Stream_Write_UINT32(irp->output, outputBufferLength); /* OutputBufferLength (4 bytes) */
if ((result = smartcard_pack_common_type_header(smartcard, irp->output))) /* CommonTypeHeader (8 bytes) */
{
- WLog_ERR(TAG, "smartcard_pack_common_type_header failed with error %lu", result);
+ WLog_ERR(TAG, "smartcard_pack_common_type_header failed with error %ld", result);
return result;
}
if ((result = smartcard_pack_private_type_header(smartcard, irp->output, objectBufferLength))) /* PrivateTypeHeader (8 bytes) */
{
- WLog_ERR(TAG, "smartcard_pack_private_type_header failed with error %lu", result);
+ WLog_ERR(TAG, "smartcard_pack_private_type_header failed with error %ld", result);
return result;
}
if (objectBufferLength != Stream_GetRemainingLength(s))
{
- WLog_WARN(TAG, "PrivateTypeHeader ObjectBufferLength mismatch: Actual: %d, Expected: %d",
- (int) objectBufferLength, Stream_GetRemainingLength(s));
+ WLog_WARN(TAG, "PrivateTypeHeader ObjectBufferLength mismatch: Actual: %lu, Expected: %lu",
+ (unsigned long) objectBufferLength, (unsigned long)Stream_GetRemainingLength(s));
return STATUS_INVALID_PARAMETER;
}
if ((context->cbContext != sizeof(ULONG_PTR)) && (context->cbContext != 0))
{
- WLog_WARN(TAG, "REDIR_SCARDCONTEXT does not match native size: Actual: %d, Expected: %d",
- context->cbContext, sizeof(ULONG_PTR));
+ WLog_WARN(TAG, "REDIR_SCARDCONTEXT does not match native size: Actual: %lu, Expected: %lu",
+ (unsigned long) context->cbContext, (unsigned long) sizeof(ULONG_PTR));
return 0;
}
if (handle->cbHandle != sizeof(ULONG_PTR))
{
- WLog_WARN(TAG, "REDIR_SCARDHANDLE does not match native size: Actual: %d, Expected: %d",
- handle->cbHandle, sizeof(ULONG_PTR));
+ WLog_WARN(TAG, "REDIR_SCARDHANDLE does not match native size: Actual: %lu, Expected: %lu",
+ (unsigned long) handle->cbHandle, (unsigned long) sizeof(ULONG_PTR));
return 0;
}
if ((status = smartcard_pack_redir_scard_context(smartcard, s, &(ret->hContext))))
{
- WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_redir_scard_context_ref(smartcard, s, &(ret->hContext))))
- WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if (unicode)
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) call->mszGroups, call->cBytes / 2, &mszGroupsA, 0, NULL, NULL);
- WLog_DBG(TAG, "ListReaders%S_Call {", unicode ? "W" : "A");
+ WLog_DBG(TAG, "ListReaders%s_Call {", unicode ? "W" : "A");
pb = (BYTE*) &(call->hContext.pbContext);
if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cBytes, 4)))
{
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", error);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", error);
return error;
}
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(common->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_connect_common(smartcard, s, &(call->Common))))
{
- WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %ld", status);
return status;
}
call->szReader[count] = '\0';
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_connect_common(smartcard, s, &(call->Common))))
{
- WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_connect_common failed with error %ld", status);
return status;
}
call->szReader[count] = '\0';
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->Common.hContext))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_redir_scard_context(smartcard, s, &(ret->hContext))))
{
- WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_redir_scard_handle(smartcard, s, &(ret->hCard))))
{
- WLog_ERR(TAG, "smartcard_pack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_redir_scard_context_ref(smartcard, s, &(ret->hContext))))
{
- WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_pack_redir_scard_handle_ref(smartcard, s, &(ret->hCard))))
- WLog_ERR(TAG, "smartcard_pack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
Stream_Write(s, ret->rgAtr, ret->cbAtrLen); /* rgAtr */
if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cbAtrLen, 4)))
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
Stream_Zero(s, ret->cBytes);
if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cBytes, 4)))
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
Stream_Write(s, ret->pbAttr, ret->cbAttrLen); /* pbAttr */
if ((status = smartcard_pack_write_size_align(smartcard, s, ret->cbAttrLen, 4)))
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
Stream_Write(s, ret->pvOutBuffer, ret->cbOutBufferSize); /* pvOutBuffer */
if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cbOutBufferSize, 4)))
{
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu", error);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld", error);
return error;
}
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_handle_ref failed with error %ld", status);
return status;
}
Stream_Write(s, pbExtraBytes, cbExtraBytes);
if ((error = smartcard_pack_write_size_align(smartcard, s, cbExtraBytes, 4)))
{
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu!", error);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld!", error);
return error;
}
}
Stream_Write(s, ret->pbRecvBuffer, ret->cbRecvLength);
if ((error = smartcard_pack_write_size_align(smartcard, s, ret->cbRecvLength, 4)))
{
- WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %lu!", error);
+ WLog_ERR(TAG, "smartcard_pack_write_size_align failed with error %ld!", error);
return error;
}
}
if ((status = smartcard_unpack_redir_scard_context(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context failed with error %ld", status);
return status;
}
if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext))))
{
- WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %lu", status);
+ WLog_ERR(TAG, "smartcard_unpack_redir_scard_context_ref failed with error %ld", status);
return status;
}
UINT64 ThrottleDuration;
UINT32 SampleExtensions;
UINT32 cbData;
- UINT error;
+ UINT error;
if (Stream_GetRemainingLength(ifman->input) < 60)
return ERROR_INVALID_DATA;
if ((error = tsmf_presentation_sync(presentation)))
{
- WLog_ERR(TAG, "tsmf_presentation_sync failed with error %lu", error);
+ WLog_ERR(TAG, "tsmf_presentation_sync failed with error %u", error);
return error;
}
ifman->output_pending = TRUE;
if (ev == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
break;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
break;
}
if (WaitForSingleObject(stream->ready, 500) == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
return error;
}
}
SetEvent(stream->stopEvent);
if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED)
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
error_ack_thread:
SetEvent(stream->stopEvent);
if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED)
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
error_play_thread:
Queue_Free(stream->sample_ack_list);
{
if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED)
{
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
return;
}
{
if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED)
{
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
return;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
return 0;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
error = GetLastError();
- WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", error);
+ WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if ((status == WAIT_FAILED))
{
- WLog_ERR(TAG, "WaitForMultipleObjects failed with %lu [%08lX]",
- status, GetLastError());
+ WLog_ERR(TAG, "WaitForMultipleObjects failed with %u [%08lX]",
+ (unsigned)status, GetLastError());
break;
}
if (status == WAIT_FAILED)
{
WLog_ERR(TAG, "%s: WaitForMultipleObjects failed with %lu", __FUNCTION__,
- status);
+ (unsigned long) status);
break;
}
else
{
WLog_ERR(TAG,
- "failed to retrieve raw format list: data=%p, length=%lu, format=%d, type=%d (expected=%d)",
- data, length, format, type, clipboard->raw_format_list_atom);
+ "failed to retrieve raw format list: data=%p, length=%lu, format=%d, type=%lu (expected=%lu)",
+ data, length, format, (unsigned long) type, (unsigned long) clipboard->raw_format_list_atom);
}
if (data)
{
if (!data)
{
- WLog_ERR(TAG, "XGetWindowProperty set length = %d but data is NULL", length);
+ WLog_ERR(TAG, "XGetWindowProperty set length = %lu but data is NULL", length);
goto out;
}
if (!(formats = (CLIPRDR_FORMAT*) calloc(length, sizeof(CLIPRDR_FORMAT))))
{
- WLog_ERR(TAG, "failed to allocate %d CLIPRDR_FORMAT structs", length);
+ WLog_ERR(TAG, "failed to allocate %lu CLIPRDR_FORMAT structs", length);
goto out;
}
}
if (actual_type == None)
{
- WLog_INFO(TAG, "Property %lu does not exist", property);
+ WLog_INFO(TAG, "Property %lu does not exist", (unsigned long) property);
return FALSE;
}
CommandLineSwitchCase(arg, "max-loop-time")
{
settings->MaxTimeInCheckLoop = atoi(arg->Value);
- if (settings->MaxTimeInCheckLoop < 0)
+ if ((long) settings->MaxTimeInCheckLoop < 0)
{
WLog_ERR(TAG, "invalid max loop time: %s", arg->Value);
return COMMAND_LINE_ERROR;
}
- if (settings->MaxTimeInCheckLoop == 0)
+ if ((long) settings->MaxTimeInCheckLoop <= 0)
{
settings->MaxTimeInCheckLoop = 10 * 60 * 60 * 1000; /* 10 hours can be considered as infinite */
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to get OpenH264 default parameters (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to get OpenH264 default parameters (status=%d)", status);
return status;
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to initialize OpenH264 encoder (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to initialize OpenH264 encoder (status=%d)", status);
return status;
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to get initial OpenH264 encoder parameters (status=%ld)",
+ WLog_ERR(TAG, "Failed to get initial OpenH264 encoder parameters (status=%d)",
status);
return status;
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to set encoder bitrate (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to set encoder bitrate (status=%d)", status);
return status;
}
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to set encoder framerate (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to set encoder framerate (status=%d)", status);
return status;
}
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to set encoder parameters (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to set encoder parameters (status=%d)", status);
return status;
}
}
if (status < 0)
{
- WLog_ERR(TAG, "Failed to encode frame (status=%ld)", status);
+ WLog_ERR(TAG, "Failed to encode frame (status=%d)", status);
return status;
}
status = clear_decompress(clear, pSrcData, SrcSize, 128, 128,
pDstData, PIXEL_FORMAT_XRGB32, 0, 1, 1, 128, 128,
NULL);
- printf("clear_decompress example %lu status: %d\n", nr, status);
+ printf("clear_decompress example %lu status: %d\n", (unsigned long) nr, status);
fflush(stdout);
clear_context_free(clear);
#if 0
return FALSE;
#else
- fprintf(stderr, "%s: TODO Test %lu not working!!!\n", __FUNCTION__, nr);
+ fprintf(stderr, "%s: TODO Test %lu not working!!!\n", __FUNCTION__, (unsigned long) nr);
#endif
return TRUE;
}
if (autodetectReqPdu->headerLength != 0x06)
return FALSE;
- WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", GetTickCountPrecise());
+ WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Start PDU - time=%lu", (unsigned long) GetTickCountPrecise());
/* Initialize bandwidth measurement parameters */
rdp->autodetect->bandwidthMeasureStartTime = GetTickCountPrecise();
{
if (WaitForSingleObject(context->channelErrorEvent, 0) == WAIT_OBJECT_0)
{
- WLog_ERR(TAG, "%s. Error was %lu", context->errorDescription,
+ WLog_ERR(TAG, "%s. Error was %u", context->errorDescription,
context->channelErrorNum);
return FALSE;
}
{
if ((cbDomain % 2) || cbDomain > 52)
{
- WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", cbDomain);
+ WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", (unsigned long) cbDomain);
goto fail;
}
wstr = (WCHAR*) Stream_Pointer(s);
{
if ((cbUserName % 2) || cbUserName > 512)
{
- WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", cbUserName);
+ WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", (unsigned long) cbUserName);
goto fail;
}
wstr = (WCHAR*) Stream_Pointer(s);
{
if ((cbDomain % 2) || cbDomain > 52)
{
- WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", cbDomain);
+ WLog_ERR(TAG, "protocol error: invalid cbDomain value: %lu", (unsigned long) cbDomain);
goto fail;
}
if (Stream_GetRemainingLength(s) < (size_t) cbDomain)
{
if ((cbUserName % 2) || cbUserName < 2 || cbUserName > 512)
{
- WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", cbUserName);
+ WLog_ERR(TAG, "protocol error: invalid cbUserName value: %lu", (unsigned long) cbUserName);
goto fail;
}
if (Stream_GetRemainingLength(s) < (size_t) cbUserName)
if ((length % 2) || length < 2 || length > maxLength)
{
- WLog_ERR(TAG, "rdp_redirection_read_string failure: invalid unicode string length: %lu", length);
+ WLog_ERR(TAG, "rdp_redirection_read_string failure: invalid unicode string length: %lu", (unsigned long) length);
return FALSE;
}
if (Stream_GetRemainingLength(s) < length)
{
- WLog_ERR(TAG, "rdp_redirection_read_string failure: insufficient stream length (%lu bytes required)", length);
+ WLog_ERR(TAG, "rdp_redirection_read_string failure: insufficient stream length (%lu bytes required)", (unsigned long) length);
return FALSE;
}
status = WSAEventSelect(sockfd, handles[count++], FD_READ | FD_WRITE | FD_CONNECT | FD_CLOSE);
if (status < 0)
{
- WLog_ERR(TAG, "WSAEventSelect failed with %lX", WSAGetLastError());
+ WLog_ERR(TAG, "WSAEventSelect failed with %d", WSAGetLastError());
return FALSE;
}
if (status < 0)
{
- WLog_ERR(TAG, "WSAEventSelect failed with %lX", WSAGetLastError());
+ WLog_ERR(TAG, "WSAEventSelect failed with %d", WSAGetLastError());
return FALSE;
}
if (!certificate_get_stored_data(tls->certificate_store,
certificate_data, &old_subject,
&old_issuer, &old_fingerprint))
- WLog_WARN(TAG, "Failed to get certificate entry for %s:hu",
+ WLog_WARN(TAG, "Failed to get certificate entry for %s:%d",
hostname, port);
if (instance->VerifyChangedCertificate)
{
if (dst[i] != (src[i] & val))
{
- printf("AND %s FAIL[%d] 0x%08x&0x%08x=0x%08x, got 0x%08x\n",
- name, i, src[i], val, src[i] & val, dst[i]);
+
+ printf("AND %s FAIL[%lu] 0x%08lx&0x%08lx=0x%08lx, got 0x%08lx\n",
+ name,
+ (unsigned long) i,
+ (unsigned long) src[i],
+ (unsigned long) val,
+ (unsigned long) (src[i] & val),
+ (unsigned long) dst[i]);
+
return FALSE;
}
}
for (x = 0; x < size; x++)
{
- volatile double val1 = (double)src[x];
- volatile double val2 = (double)dst[x];
- volatile double diff = val1 - val2;
+ int diff = src[x] - dst[x];
if (abs(diff) > 2)
{
- fprintf(stderr, "%lu %02X : %02X diff=%lf\n", (unsigned long)x, val1, val2, diff);
+ fprintf(stderr, "%lu %02X : %02X diff=%d\n", (unsigned long)x, src[x], dst[x], abs(diff));
return FALSE;
}
}
awidth = roi.width + 16 - roi.width % 16;
aheight = roi.height + 16 - roi.height % 16;
fprintf(stderr, "Running YUVCombine on frame size %lux%lu [%lux%lu]\n",
- roi.width, roi.height, awidth, aheight);
+ (unsigned long) roi.width, (unsigned long) roi.height,
+ (unsigned long) awidth, (unsigned long) aheight);
if (!prims || !prims->YUV420CombineToYUV444)
goto fail;
}
fprintf(stderr, "Running AVC%s on frame size %lux%lu\n", use444 ? "444" : "420",
- roi.width, roi.height);
+ (unsigned long) roi.width, (unsigned long) roi.height);
/* Test RGB to YUV444 conversion and vice versa */
if (!(rgb = set_padding(size * sizeof(UINT32), padding)))
}
Stream_SetPosition(s, BytesReturned);
- WLog_DBG(TAG, "got %lu bytes", BytesReturned);
+ WLog_DBG(TAG, "got %lu bytes", (unsigned long) BytesReturned);
}
Stream_Free(s, TRUE);
if (error)
{
- WLog_ERR(TAG, "CreateSurface failed with error %lu", error);
+ WLog_ERR(TAG, "CreateSurface failed with error %u", error);
return FALSE;
}
if (error)
{
- WLog_ERR(TAG, "MapSurfaceToOutput failed with error %lu", error);
+ WLog_ERR(TAG, "MapSurfaceToOutput failed with error %u", error);
return FALSE;
}
if (error)
{
- WLog_ERR(TAG, "DeleteSurface failed with error %lu", error);
+ WLog_ERR(TAG, "DeleteSurface failed with error %u", error);
return FALSE;
}
if (error)
{
- WLog_ERR(TAG, "ResetGraphics failed with error %lu", error);
+ WLog_ERR(TAG, "ResetGraphics failed with error %u", error);
return FALSE;
}
if (error)
{
- WLog_ERR(TAG, "SurfaceFrameCommand failed with error %lu", error);
+ WLog_ERR(TAG, "SurfaceFrameCommand failed with error %u", error);
return FALSE;
}
}
if (*Addend != 10)
{
- printf("InterlockedIncrement failure: Actual: %d, Expected: %d\n", (int) *Addend, 10);
+ printf("InterlockedIncrement failure: Actual: %ld, Expected: 10\n", (long) *Addend);
return -1;
}
if (*Addend != 0)
{
- printf("InterlockedDecrement failure: Actual: %d, Expected: %d\n", (int) *Addend, 0);
+ printf("InterlockedDecrement failure: Actual: %ld, Expected: 0\n", (long) *Addend);
return -1;
}
if (oldValue != 0xAA)
{
- printf("InterlockedExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAA);
+ printf("InterlockedExchange failure: Actual: 0x%08lX, Expected: 0xAA\n", (long) oldValue);
return -1;
}
if (*Target != 0xFF)
{
- printf("InterlockedExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Target, 0xFF);
+ printf("InterlockedExchange failure: Actual: 0x%08lX, Expected: 0xFF\n", (long) *Target);
return -1;
}
if (oldValue != 25)
{
- printf("InterlockedExchangeAdd failure: Actual: %d, Expected: %d\n", (int) oldValue, 25);
+ printf("InterlockedExchangeAdd failure: Actual: %ld, Expected: 25\n", (long) oldValue);
return -1;
}
if (*Addend != 125)
{
- printf("InterlockedExchangeAdd failure: Actual: %d, Expected: %d\n", (int) *Addend, 125);
+ printf("InterlockedExchangeAdd failure: Actual: %ld, Expected: 125\n", (long) *Addend);
return -1;
}
if (oldValue != 0xAABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) oldValue);
return -1;
}
if (*Destination != 0xCCDDEEFF)
{
- printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Destination, 0xCCDDEEFF);
+ printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xCCDDEEFF\n", (long) *Destination);
return -1;
}
if (oldValue != 0xAABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) oldValue, 0xAABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) oldValue);
return -1;
}
if (*Destination != 0xAABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: 0x%08X, Expected: 0x%08X\n", (int) *Destination, 0xAABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%08lX, Expected: 0xAABBCCDD\n", (long) *Destination);
return -1;
}
if (oldValue64 != 0x66778899AABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", oldValue64, (LONGLONG) 0x66778899AABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) oldValue64);
return -1;
}
if (*Destination64 != 0x8899AABBCCDDEEFF)
{
- printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", *Destination64, (LONGLONG) 0x8899AABBCCDDEEFF);
+ printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x8899AABBCCDDEEFF\n", (long long) *Destination64);
return -1;
}
if (oldValue64 != 0x66778899AABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", oldValue64, (LONGLONG) 0x66778899AABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) oldValue64);
return -1;
}
if (*Destination64 != 0x66778899AABBCCDD)
{
- printf("InterlockedCompareExchange failure: Actual: %lld, Expected: %lld\n", *Destination64, (LONGLONG) 0x66778899AABBCCDD);
+ printf("InterlockedCompareExchange failure: Actual: 0x%016llX, Expected: 0x66778899AABBCCDD\n", (long long) *Destination64);
return -1;
}
return TRUE;
}
- WLog_ERR(TAG, "calling %s on a handle that is not a semaphore");
+ WLog_ERR(TAG, "calling %s on a handle that is not a semaphore", __FUNCTION__);
return FALSE;
}
if (SymGetLineFromAddr64(process, address, &displacement, line))
{
- sprintf_s(vlines[i], line_len, "%08lX: %s in %s:%lu", symbol->Address, symbol->Name, line->FileName, line->LineNumber);
+ sprintf_s(vlines[i], line_len, "%08lX: %s in %s:%lu", symbol->Address, symbol->Name, line->FileName, (unsigned long) line->LineNumber);
}
else
sprintf_s(vlines[i], line_len, "%08lX: %s", symbol->Address, symbol->Name);
wLog* logB;
wLogLayout* layout;
wLogAppender* appender;
- char* tmp_path;
- char* wlog_file;
+ char* tmp_path = NULL;
+ char* wlog_file = NULL;
+ int result = 1;
if (!(tmp_path = GetKnownPath(KNOWN_PATH_TEMP)))
{
fprintf(stderr, "Failed to get temporary directory!\n");
- return -1;
+ goto out;
}
WLog_Init();
appender = WLog_GetLogAppender(root);
if(!WLog_ConfigureAppender(appender, "outputfilename", "test_w.log"))
- return 1;
+ goto out;
if(!WLog_ConfigureAppender(appender, "outputfilepath", tmp_path))
- return 1;
+ goto out;
layout = WLog_GetLogLayout(root);
WLog_Layout_SetPrefixFormat(root, layout, "[%lv:%mn] [%fl|%fn|%ln] - ");
WLog_Uninit();
if ((wlog_file = GetCombinedPath(tmp_path, "test_w.log")))
- {
DeleteFileA(wlog_file);
- free(wlog_file);
- }
- return 0;
+ result = 0;
+out:
+ free(wlog_file);
+ free(tmp_path);
+
+ return result;
}