fix string format specifiers

- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
This commit is contained in:
Norbert Federa 2016-12-13 22:47:08 +01:00
parent 73ac495870
commit f71b6b46e8
310 changed files with 3187 additions and 3200 deletions

View File

@ -97,8 +97,8 @@ static BOOL audin_alsa_set_params(AudinALSADevice* alsa,
if ((alsa->actual_rate != alsa->target_rate) ||
(alsa->actual_channels != alsa->target_channels))
{
DEBUG_DVC("actual rate %d / channel %d is "
"different from target rate %d / channel %d, resampling required.",
DEBUG_DVC("actual rate %"PRIu32" / channel %"PRIu32" is "
"different from target rate %"PRIu32" / channel %"PRIu32", resampling required.",
alsa->actual_rate, alsa->actual_channels,
alsa->target_rate, alsa->target_channels);
}
@ -136,7 +136,7 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src,
alsa->actual_channels, alsa->actual_rate, size / rbytes_per_frame,
alsa->target_channels, alsa->target_rate);
frames = alsa->dsp_context->resampled_frames;
DEBUG_DVC("resampled %d frames at %d to %d frames at %d",
DEBUG_DVC("resampled %d frames at %"PRIu32" to %d frames at %"PRIu32"",
size / rbytes_per_frame, alsa->actual_rate, frames, alsa->target_rate);
size = frames * tbytes_per_frame;
src = alsa->dsp_context->resampled_buffer;
@ -149,7 +149,7 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src,
if (status == WAIT_FAILED)
{
ret = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", ret);
break;
}
@ -193,7 +193,7 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src,
if (status == WAIT_FAILED)
{
ret = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", ret);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", ret);
break;
}
@ -391,7 +391,7 @@ static UINT audin_alsa_set_format(IAudinDevice* device, audinFormat* format,
bs = (format->nBlockAlign - 4 * format->nChannels) * 4;
alsa->frames_per_packet = (alsa->frames_per_packet * format->nChannels * 2 /
bs + 1) * bs / (format->nChannels * 2);
DEBUG_DVC("aligned FramesPerPacket=%d",
DEBUG_DVC("aligned FramesPerPacket=%"PRIu32"",
alsa->frames_per_packet);
break;
}
@ -463,7 +463,7 @@ static UINT audin_alsa_close(IAudinDevice* device)
if (WaitForSingleObject(alsa->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -562,7 +562,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS
if ((error = audin_alsa_parse_addin_args(alsa, args)))
{
WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %u!", error);
WLog_ERR(TAG, "audin_alsa_parse_addin_args failed with errorcode %"PRIu32"!", error);
goto error_out;
}
@ -597,7 +597,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin,
(IAudinDevice*) alsa)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -109,7 +109,7 @@ static UINT audin_process_version(IWTSVirtualChannelCallback* pChannelCallback,
Stream_Read_UINT32(s, Version);
DEBUG_DVC("Version=%d", Version);
DEBUG_DVC("Version=%"PRIu32"", Version);
out = Stream_New(NULL, 5);
@ -159,10 +159,10 @@ static UINT audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback,
UINT32 cbSizeFormatsPacket;
Stream_Read_UINT32(s, NumFormats);
DEBUG_DVC("NumFormats %d", NumFormats);
DEBUG_DVC("NumFormats %"PRIu32"", NumFormats);
if ((NumFormats < 1) || (NumFormats > 1000))
{
WLog_ERR(TAG, "bad NumFormats %d", NumFormats);
WLog_ERR(TAG, "bad NumFormats %"PRIu32"", NumFormats);
return ERROR_INVALID_DATA;
}
Stream_Seek_UINT32(s); /* cbSizeFormatsPacket */
@ -199,8 +199,8 @@ static UINT audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback,
format.data = Stream_Pointer(s);
Stream_Seek(s, format.cbSize);
DEBUG_DVC("wFormatTag=%d nChannels=%d nSamplesPerSec=%d "
"nBlockAlign=%d wBitsPerSample=%d cbSize=%d",
DEBUG_DVC("wFormatTag=%"PRIu16" nChannels=%"PRIu16" nSamplesPerSec=%"PRIu32" "
"nBlockAlign=%"PRIu16" wBitsPerSample=%"PRIu16" cbSize=%"PRIu16"",
format.wFormatTag, format.nChannels, format.nSamplesPerSec,
format.nBlockAlign, format.wBitsPerSample, format.cbSize);
@ -358,12 +358,12 @@ static UINT audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wSt
Stream_Read_UINT32(s, FramesPerPacket);
Stream_Read_UINT32(s, initialFormat);
DEBUG_DVC("FramesPerPacket=%d initialFormat=%d",
DEBUG_DVC("FramesPerPacket=%"PRIu32" initialFormat=%"PRIu32"",
FramesPerPacket, initialFormat);
if (initialFormat >= (UINT32) callback->formats_count)
{
WLog_ERR(TAG, "invalid format index %d (total %d)",
WLog_ERR(TAG, "invalid format index %"PRIu32" (total %d)",
initialFormat, callback->formats_count);
return ERROR_INVALID_DATA;
}
@ -374,13 +374,13 @@ static UINT audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, wSt
IFCALLRET(audin->device->SetFormat, error, audin->device, format, FramesPerPacket);
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "SetFormat failed with errorcode %u", error);
WLog_ERR(TAG, "SetFormat failed with errorcode %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "Open failed with errorcode %"PRIu32"", error);
return error;
}
}
@ -412,11 +412,11 @@ static UINT audin_process_format_change(IWTSVirtualChannelCallback* pChannelCall
Stream_Read_UINT32(s, NewFormat);
DEBUG_DVC("NewFormat=%d", NewFormat);
DEBUG_DVC("NewFormat=%"PRIu32"", NewFormat);
if (NewFormat >= (UINT32) callback->formats_count)
{
WLog_ERR(TAG, "invalid format index %d (total %d)",
WLog_ERR(TAG, "invalid format index %"PRIu32" (total %d)",
NewFormat, callback->formats_count);
return ERROR_INVALID_DATA;
}
@ -428,19 +428,19 @@ static UINT audin_process_format_change(IWTSVirtualChannelCallback* pChannelCall
IFCALLRET(audin->device->Close, error, audin->device);
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "Close failed with errorcode %u", error);
WLog_ERR(TAG, "Close failed with errorcode %"PRIu32"", error);
return error;
}
IFCALLRET(audin->device->SetFormat, error, audin->device, format, 0);
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "SetFormat failed with errorcode %u", error);
WLog_ERR(TAG, "SetFormat failed with errorcode %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "Open failed with errorcode %"PRIu32"", error);
return error;
}
}
@ -463,7 +463,7 @@ static UINT audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
Stream_Read_UINT8(data, MessageId);
DEBUG_DVC("MessageId=0x%x", MessageId);
DEBUG_DVC("MessageId=0x%02"PRIx8"", MessageId);
switch (MessageId)
{
@ -484,7 +484,7 @@ static UINT audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
break;
default:
WLog_ERR(TAG, "unknown MessageId=0x%x", MessageId);
WLog_ERR(TAG, "unknown MessageId=0x%02"PRIx8"", MessageId);
error = ERROR_INVALID_DATA;
break;
}
@ -509,7 +509,7 @@ static UINT audin_on_close(IWTSVirtualChannelCallback* pChannelCallback)
{
IFCALLRET(audin->device->Close, error, audin->device);
if (error != CHANNEL_RC_OK)
WLog_ERR(TAG, "Close failed with errorcode %u", error);
WLog_ERR(TAG, "Close failed with errorcode %"PRIu32"", error);
}
free(callback->formats);
@ -593,7 +593,7 @@ static UINT audin_plugin_terminated(IWTSPlugin* pPlugin)
IFCALLRET(audin->device->Free, error, audin->device);
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "Free failed with errorcode %u", error);
WLog_ERR(TAG, "Free failed with errorcode %"PRIu32"", error);
// dont stop on error
}
audin->device = NULL;
@ -662,7 +662,7 @@ static UINT audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, ADDI
if ((error = entry(&entryPoints)))
{
WLog_ERR(TAG, "%s entry returned error %u.", name, error);
WLog_ERR(TAG, "%s entry returned error %"PRIu32".", name, error);
return error;
}
@ -744,7 +744,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, ADDIN_ARGV* args)
{
if ((error = audin_set_subsystem(audin, arg->Value)))
{
WLog_ERR(TAG, "audin_set_subsystem failed with error %u!", error);
WLog_ERR(TAG, "audin_set_subsystem failed with error %"PRIu32"!", error);
return FALSE;
}
}
@ -752,7 +752,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, ADDIN_ARGV* args)
{
if ((error = audin_set_device_name(audin, arg->Value)))
{
WLog_ERR(TAG, "audin_set_device_name failed with error %u!", error);
WLog_ERR(TAG, "audin_set_device_name failed with error %"PRIu32"!", error);
return FALSE;
}
}
@ -858,7 +858,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
if ((error = audin_load_device_plugin((IWTSPlugin*) audin, audin->subsystem, args)))
{
WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %u!",
WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %"PRIu32"!",
audin->subsystem, error);
goto out;
}
@ -869,17 +869,17 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
{
if ((error = audin_set_subsystem(audin, entry->subsystem)))
{
WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %u!",
WLog_ERR(TAG, "audin_set_subsystem for %s failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "audin_set_device_name for %s failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "audin_load_device_plugin %s failed with error %"PRIu32"!",
entry->subsystem, error);
}

View File

@ -215,7 +215,7 @@ static void mac_audio_queue_input_cb(void *aqData,
if ((error = mac->receive(encoded_data, encoded_size, mac->user_data)))
{
WLog_ERR(TAG, "mac->receive failed with error %u", error);
WLog_ERR(TAG, "mac->receive failed with error %"PRIu32"", error);
SetLastError(ERROR_INTERNAL_ERROR);
return;
}
@ -238,7 +238,7 @@ static UINT audin_mac_close(IAudinDevice *device)
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueStop failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueStop failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
}
mac->isOpen = false;
@ -250,7 +250,7 @@ static UINT audin_mac_close(IAudinDevice *device)
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueDispose failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueDispose failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
}
@ -278,7 +278,7 @@ static UINT audin_mac_open(IAudinDevice *device, AudinReceive receive, void *use
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueNewInput failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueNewInput failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
goto err_out;
}
@ -290,7 +290,7 @@ static UINT audin_mac_open(IAudinDevice *device, AudinReceive receive, void *use
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueAllocateBuffer failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueAllocateBuffer failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
goto err_out;
}
@ -302,7 +302,7 @@ static UINT audin_mac_open(IAudinDevice *device, AudinReceive receive, void *use
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueEnqueueBuffer failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueEnqueueBuffer failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
goto err_out;
}
@ -314,7 +314,7 @@ static UINT audin_mac_open(IAudinDevice *device, AudinReceive receive, void *use
if (devStat != 0)
{
errCode = GetLastError();
WLog_ERR(TAG, "AudioQueueStart failed with %s [%d]",
WLog_ERR(TAG, "AudioQueueStart failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
goto err_out;
}
@ -421,7 +421,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if (!mac)
{
errCode = GetLastError();
WLog_ERR(TAG, "calloc failed with %s [%d]",
WLog_ERR(TAG, "calloc failed with %s [%"PRIu32"]",
winpr_strerror(errCode, errString, sizeof(errString)), errCode);
return CHANNEL_RC_NO_MEMORY;
}
@ -438,7 +438,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = audin_mac_parse_addin_args(mac, args)))
{
WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %u!", error);
WLog_ERR(TAG, "audin_mac_parse_addin_args failed with %"PRIu32"!", error);
goto error_out;
}
@ -452,7 +452,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) mac)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -84,7 +84,7 @@ static void* audin_opensles_thread_func(void* arg)
UINT error = CHANNEL_RC_OK;
DWORD status;
DEBUG_DVC("opensles=%p", opensles);
DEBUG_DVC("opensles=%p", (void*) opensles);
assert(opensles);
assert(opensles->frames_per_packet > 0);
@ -112,7 +112,7 @@ static void* audin_opensles_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -186,7 +186,7 @@ static UINT audin_opensles_free(IAudinDevice* device)
{
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p", device);
DEBUG_DVC("device=%p", (void*) device);
/* The function may have been called out of order,
* ignore duplicate requests. */
@ -212,7 +212,7 @@ static BOOL audin_opensles_format_supported(IAudinDevice* device, audinFormat* f
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
#endif
DEBUG_DVC("device=%p, format=%p", opensles, format);
DEBUG_DVC("device=%p, format=%p", (void*) opensles, (void*) format);
assert(format);
@ -238,7 +238,7 @@ static BOOL audin_opensles_format_supported(IAudinDevice* device, audinFormat* f
}
break;
default:
DEBUG_DVC("Encoding '%s' [%08X] not supported",
DEBUG_DVC("Encoding '%s' [0x%04X"PRIX16"] not supported",
rdpsnd_get_audio_tag_string(format->wFormatTag),
format->wFormatTag);
break;
@ -258,8 +258,8 @@ static UINT audin_opensles_set_format(IAudinDevice* device,
int bs;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p, format=%p, FramesPerPacket=%d",
device, format, FramesPerPacket);
DEBUG_DVC("device=%p, format=%p, FramesPerPacket=%"PRIu32"",
(void*) device, (void*) format, FramesPerPacket);
assert(format);
@ -300,8 +300,8 @@ static UINT audin_opensles_set_format(IAudinDevice* device,
break;
default:
WLog_ERR(TAG, "Encoding '%d' [%08X] not supported",
(format->wFormatTag),
WLog_ERR(TAG, "Encoding '%"PRIu16"' [%04"PRIX16"] not supported",
format->wFormatTag,
format->wFormatTag);
return ERROR_UNSUPPORTED_TYPE;
}
@ -312,7 +312,7 @@ static UINT audin_opensles_set_format(IAudinDevice* device,
opensles->format = format->wFormatTag;
opensles->block_size = format->nBlockAlign;
DEBUG_DVC("aligned frames_per_packet=%d, block_size=%d",
DEBUG_DVC("aligned frames_per_packet=%"PRIu32", block_size=%"PRIu32"",
opensles->frames_per_packet, opensles->block_size);
return CHANNEL_RC_OK;
}
@ -327,7 +327,7 @@ static UINT audin_opensles_open(IAudinDevice* device, AudinReceive receive,
{
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p, receive=%d, user_data=%p", device, receive, user_data);
DEBUG_DVC("device=%p, receive=%p, user_data=%p", (void*) device, (void*) receive, (void*) user_data);
assert(opensles);
@ -381,7 +381,7 @@ static UINT audin_opensles_close(IAudinDevice* device)
UINT error;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p", device);
DEBUG_DVC("device=%p", (void*) device);
assert(opensles);
@ -401,7 +401,7 @@ static UINT audin_opensles_close(IAudinDevice* device)
if (WaitForSingleObject(opensles->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
CloseHandle(opensles->stopEvent);
@ -438,7 +438,7 @@ static UINT audin_opensles_parse_addin_args(AudinOpenSLESDevice* device,
COMMAND_LINE_ARGUMENT_A* arg;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*) device;
DEBUG_DVC("device=%p, args=%p", device, args);
DEBUG_DVC("device=%p, args=%p", (void*) device, (void*) args);
flags = COMMAND_LINE_SIGIL_NONE | COMMAND_LINE_SEPARATOR_COLON | COMMAND_LINE_IGN_UNKNOWN_KEYWORD;
@ -493,7 +493,7 @@ UINT freerdp_audin_client_subsystem_entry(
AudinOpenSLESDevice* opensles;
UINT error;
DEBUG_DVC("pEntryPoints=%p", pEntryPoints);
DEBUG_DVC("pEntryPoints=%p", (void*) pEntryPoints);
opensles = (AudinOpenSLESDevice*) calloc(1, sizeof(AudinOpenSLESDevice));
if (!opensles)
@ -513,7 +513,7 @@ UINT freerdp_audin_client_subsystem_entry(
if ((error = audin_opensles_parse_addin_args(opensles, args)))
{
WLog_ERR(TAG, "audin_opensles_parse_addin_args failed with errorcode %d!", error);
WLog_ERR(TAG, "audin_opensles_parse_addin_args failed with errorcode %"PRIu32"!", error);
goto error_out;
}
@ -527,7 +527,7 @@ UINT freerdp_audin_client_subsystem_entry(
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) opensles)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %d!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -42,27 +42,27 @@ static SLresult openSLCreateEngine(OPENSL_STREAM* p)
SLresult result;
// create engine
result = slCreateEngine(&(p->engineObject), 0, NULL, 0, NULL, NULL);
DEBUG_DVC("engineObject=%p", p->engineObject);
DEBUG_DVC("engineObject=%p", (void*) p->engineObject);
if (result != SL_RESULT_SUCCESS) goto engine_end;
// realize the engine
result = (*p->engineObject)->Realize(p->engineObject, SL_BOOLEAN_FALSE);
DEBUG_DVC("Realize=%d", result);
DEBUG_DVC("Realize=%"PRIu32"", result);
if (result != SL_RESULT_SUCCESS) goto engine_end;
// get the engine interface, which is needed in order to create other objects
result = (*p->engineObject)->GetInterface(p->engineObject, SL_IID_ENGINE,
&(p->engineEngine));
DEBUG_DVC("engineEngine=%p", p->engineEngine);
DEBUG_DVC("engineEngine=%p", (void*) p->engineEngine);
if (result != SL_RESULT_SUCCESS) goto engine_end;
// get the volume interface - important, this is optional!
result = (*p->engineObject)->GetInterface(p->engineObject, SL_IID_DEVICEVOLUME,
&(p->deviceVolume));
DEBUG_DVC("deviceVolume=%p", p->deviceVolume);
DEBUG_DVC("deviceVolume=%p", (void*) p->deviceVolume);
if (result != SL_RESULT_SUCCESS)
{
@ -180,14 +180,14 @@ static SLresult openSLRecOpen(OPENSL_STREAM* p)
const SLboolean req[] = {SL_BOOLEAN_TRUE};
result = (*p->engineEngine)->CreateAudioRecorder(p->engineEngine,
&(p->recorderObject), &audioSrc, &audioSnk, 1, id, req);
DEBUG_DVC("p->recorderObject=%p", p->recorderObject);
DEBUG_DVC("p->recorderObject=%p", (void*) p->recorderObject);
assert(!result);
if (SL_RESULT_SUCCESS != result) goto end_recopen;
// realize the audio recorder
result = (*p->recorderObject)->Realize(p->recorderObject, SL_BOOLEAN_FALSE);
DEBUG_DVC("Realize=%d", result);
DEBUG_DVC("Realize=%"PRIu32"", result);
assert(!result);
if (SL_RESULT_SUCCESS != result) goto end_recopen;
@ -195,7 +195,7 @@ static SLresult openSLRecOpen(OPENSL_STREAM* p)
// get the record interface
result = (*p->recorderObject)->GetInterface(p->recorderObject,
SL_IID_RECORD, &(p->recorderRecord));
DEBUG_DVC("p->recorderRecord=%p", p->recorderRecord);
DEBUG_DVC("p->recorderRecord=%p", (void*) p->recorderRecord);
assert(!result);
if (SL_RESULT_SUCCESS != result) goto end_recopen;
@ -204,7 +204,7 @@ static SLresult openSLRecOpen(OPENSL_STREAM* p)
result = (*p->recorderObject)->GetInterface(p->recorderObject,
SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
&(p->recorderBufferQueue));
DEBUG_DVC("p->recorderBufferQueue=%p", p->recorderBufferQueue);
DEBUG_DVC("p->recorderBufferQueue=%p", (void*) p->recorderBufferQueue);
assert(!result);
if (SL_RESULT_SUCCESS != result) goto end_recopen;
@ -212,7 +212,7 @@ static SLresult openSLRecOpen(OPENSL_STREAM* p)
// register callback on the buffer queue
result = (*p->recorderBufferQueue)->RegisterCallback(p->recorderBufferQueue,
bqRecorderCallback, p);
DEBUG_DVC("p->recorderBufferQueue=%p", p->recorderBufferQueue);
DEBUG_DVC("p->recorderBufferQueue=%p", (void*) p->recorderBufferQueue);
assert(!result);
if (SL_RESULT_SUCCESS != result)
@ -227,7 +227,7 @@ static SLresult openSLRecOpen(OPENSL_STREAM* p)
// close the OpenSL IO and destroy the audio engine
static void openSLDestroyEngine(OPENSL_STREAM* p)
{
DEBUG_DVC("p=%p", p);
DEBUG_DVC("p=%p", (void*) p);
// destroy audio recorder object, and invalidate all associated interfaces
if (p->recorderObject != NULL)
@ -288,7 +288,7 @@ OPENSL_STREAM* android_OpenRecDevice(char* name, int sr, int inchannels,
// close the android audio device
void android_CloseRecDevice(OPENSL_STREAM* p)
{
DEBUG_DVC("p=%p", p);
DEBUG_DVC("p=%p", (void*) p);
if (p == NULL)
return;
@ -326,7 +326,7 @@ static void bqRecorderCallback(SLAndroidSimpleBufferQueueItf bq, void* context)
{
queue_element* e;
OPENSL_STREAM* p = (OPENSL_STREAM*) context;
DEBUG_DVC("p=%p", p);
DEBUG_DVC("p=%p", (void*) p);
assert(p);
assert(p->next);
assert(p->prep);
@ -386,7 +386,7 @@ int android_RecIn(OPENSL_STREAM* p, short* buffer, int size)
if (status == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", GetLastError());
return -1;
}
}
@ -395,7 +395,7 @@ int android_RecIn(OPENSL_STREAM* p, short* buffer, int size)
if (!e)
{
WLog_ERR(TAG, "[ERROR] got e=%p from queue", e);
WLog_ERR(TAG, "[ERROR] got e=NULL from queue");
return -1;
}

View File

@ -280,7 +280,7 @@ static void* audin_oss_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
goto err_out;
}
@ -334,7 +334,7 @@ static void* audin_oss_thread_func(void* arg)
if ((error = oss->receive(encoded_data, encoded_size, oss->user_data)))
{
WLog_ERR(TAG, "oss->receive failed with error %u", error);
WLog_ERR(TAG, "oss->receive failed with error %"PRIu32"", error);
break;
}
}
@ -406,7 +406,7 @@ static UINT audin_oss_close(IAudinDevice* device)
if (WaitForSingleObject(oss->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -538,7 +538,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS
if ((error = audin_oss_parse_addin_args(oss, args)))
{
WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %u!", error);
WLog_ERR(TAG, "audin_oss_parse_addin_args failed with errorcode %"PRIu32"!", error);
goto error_out;
}
@ -554,7 +554,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin,
(IAudinDevice*) oss)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -79,12 +79,12 @@ static void audin_pulse_context_state_callback(pa_context* context, void* userda
case PA_CONTEXT_FAILED:
case PA_CONTEXT_TERMINATED:
DEBUG_DVC("state %d", (int)state);
DEBUG_DVC("state %d", state);
pa_threaded_mainloop_signal (pulse->mainloop, 0);
break;
default:
DEBUG_DVC("state %d", (int)state);
DEBUG_DVC("state %d", state);
break;
}
}
@ -257,7 +257,7 @@ static UINT audin_pulse_set_format(IAudinDevice* device, audinFormat* format, UI
bs = (format->nBlockAlign - 4 * format->nChannels) * 4;
pulse->frames_per_packet = (pulse->frames_per_packet * format->nChannels * 2 /
bs + 1) * bs / (format->nChannels * 2);
DEBUG_DVC("aligned FramesPerPacket=%d",
DEBUG_DVC("aligned FramesPerPacket=%"PRIu32"",
pulse->frames_per_packet);
break;
}
@ -283,12 +283,12 @@ static void audin_pulse_stream_state_callback(pa_stream* stream, void* userdata)
case PA_STREAM_FAILED:
case PA_STREAM_TERMINATED:
DEBUG_DVC("state %d", (int)state);
DEBUG_DVC("state %d", state);
pa_threaded_mainloop_signal(pulse->mainloop, 0);
break;
default:
DEBUG_DVC("state %d", (int)state);
DEBUG_DVC("state %d", state);
break;
}
}
@ -318,7 +318,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
pa_stream_peek(stream, &data, &length);
frames = length / pulse->bytes_per_frame;
DEBUG_DVC("length %d frames %d", (int) length, frames);
DEBUG_DVC("length %"PRIdz" frames %d", length, frames);
src = (const BYTE*) data;
while (frames > 0)
@ -558,7 +558,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = audin_pulse_parse_addin_args(pulse, args)))
{
WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %u!", error);
WLog_ERR(TAG, "audin_pulse_parse_addin_args failed with error %"PRIu32"!", error);
goto error_out;
}
@ -598,7 +598,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) pulse)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -127,7 +127,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInPrepareHeader(winmm->hWaveIn, &waveHdr[i], sizeof(waveHdr[i]));
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInPrepareHeader failed. %d", rc);
DEBUG_DVC("waveInPrepareHeader failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -135,7 +135,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInAddBuffer(winmm->hWaveIn, &waveHdr[i], sizeof(waveHdr[i]));
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInAddBuffer failed. %d", rc);
DEBUG_DVC("waveInAddBuffer failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -144,7 +144,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInStart(winmm->hWaveIn);
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInStart failed. %d", rc);
DEBUG_DVC("waveInStart failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -161,7 +161,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInReset(winmm->hWaveIn);
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInReset failed. %d", rc);
DEBUG_DVC("waveInReset failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -171,7 +171,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInUnprepareHeader(winmm->hWaveIn, &waveHdr[i], sizeof(waveHdr[i]));
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInUnprepareHeader failed. %d", rc);
DEBUG_DVC("waveInUnprepareHeader failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -181,7 +181,7 @@ static DWORD audin_winmm_thread_func(void* arg)
rc = waveInClose(winmm->hWaveIn);
if (MMSYSERR_NOERROR != rc)
{
DEBUG_DVC("waveInClose failed. %d", rc);
DEBUG_DVC("waveInClose failed. %"PRIu32"", rc);
if (winmm->rdpcontext)
setChannelError(winmm->rdpcontext, ERROR_INTERNAL_ERROR, "audin_winmm_thread_func reported an error");
}
@ -230,7 +230,7 @@ static UINT audin_winmm_close(IAudinDevice* device)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -426,7 +426,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = audin_winmm_parse_addin_args(winmm, args)))
{
WLog_ERR(TAG, "audin_winmm_parse_addin_args failed with error %d!", error);
WLog_ERR(TAG, "audin_winmm_parse_addin_args failed with error %"PRIu32"!", error);
goto error_out;
}
@ -452,7 +452,7 @@ UINT freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEn
if ((error = pEntryPoints->pRegisterAudinDevice(pEntryPoints->plugin, (IAudinDevice*) winmm)))
{
WLog_ERR(TAG, "RegisterAudinDevice failed with error %d!", error);
WLog_ERR(TAG, "RegisterAudinDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -124,7 +124,7 @@ static UINT audin_server_recv_version(audin_server* audin, wStream* s,
if (length < 4)
{
WLog_ERR(TAG, "error parsing version info: expected at least 4 bytes, got %d",
WLog_ERR(TAG, "error parsing version info: expected at least 4 bytes, got %"PRIu32"",
length);
return ERROR_INVALID_DATA;
}
@ -133,7 +133,7 @@ static UINT audin_server_recv_version(audin_server* audin, wStream* s,
if (Version < 1)
{
WLog_ERR(TAG, "expected Version > 0 but got %d", Version);
WLog_ERR(TAG, "expected Version > 0 but got %"PRIu32"", Version);
return ERROR_INVALID_DATA;
}
@ -207,7 +207,7 @@ static UINT audin_server_recv_formats(audin_server* audin, wStream* s,
if (length < 8)
{
WLog_ERR(TAG, "error parsing rec formats: expected at least 8 bytes, got %d",
WLog_ERR(TAG, "error parsing rec formats: expected at least 8 bytes, got %"PRIu32"",
length);
return ERROR_INVALID_DATA;
}
@ -236,7 +236,7 @@ static UINT audin_server_recv_formats(audin_server* audin, wStream* s,
{
free(audin->context.client_formats);
audin->context.client_formats = NULL;
WLog_ERR(TAG, "expected length at least 18, but got %d", length);
WLog_ERR(TAG, "expected length at least 18, but got %"PRIu32"", length);
return ERROR_INVALID_DATA;
}
@ -257,7 +257,7 @@ static UINT audin_server_recv_formats(audin_server* audin, wStream* s,
IFCALLRET(audin->context.Opening, success, &audin->context);
if (success)
WLog_ERR(TAG, "context.Opening failed with error %u", success);
WLog_ERR(TAG, "context.Opening failed with error %"PRIu32"", success);
return success;
}
@ -314,7 +314,7 @@ static UINT audin_server_recv_open_reply(audin_server* audin, wStream* s,
if (length < 4)
{
WLog_ERR(TAG, "error parsing version info: expected at least 4 bytes, got %d",
WLog_ERR(TAG, "error parsing version info: expected at least 4 bytes, got %"PRIu32"",
length);
return ERROR_INVALID_DATA;
}
@ -323,7 +323,7 @@ static UINT audin_server_recv_open_reply(audin_server* audin, wStream* s,
IFCALLRET(audin->context.OpenResult, success, &audin->context, Result);
if (success)
WLog_ERR(TAG, "context.OpenResult failed with error %u", success);
WLog_ERR(TAG, "context.OpenResult failed with error %"PRIu32"", success);
return success;
}
@ -396,7 +396,7 @@ static UINT audin_server_recv_data(audin_server* audin, wStream* s,
IFCALLRET(audin->context.ReceiveSamples, success, &audin->context, src, frames);
if (success)
WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", success);
WLog_ERR(TAG, "context.ReceiveSamples failed with error %"PRIu32"", success);
return success;
}
@ -448,7 +448,7 @@ static void* audin_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
goto out;
}
@ -480,7 +480,7 @@ static void* audin_server_thread_func(void* arg)
{
if ((error = audin_server_send_version(audin, s)))
{
WLog_ERR(TAG, "audin_server_send_version failed with error %u!", error);
WLog_ERR(TAG, "audin_server_send_version failed with error %"PRIu32"!", error);
goto out_capacity;
}
}
@ -494,7 +494,7 @@ static void* audin_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
goto out;
}
@ -529,13 +529,13 @@ static void* audin_server_thread_func(void* arg)
case MSG_SNDIN_VERSION:
if ((error = audin_server_recv_version(audin, s, BytesReturned)))
{
WLog_ERR(TAG, "audin_server_recv_version failed with error %u!", error);
WLog_ERR(TAG, "audin_server_recv_version failed with error %"PRIu32"!", error);
goto out_capacity;
}
if ((error = audin_server_send_formats(audin, s)))
{
WLog_ERR(TAG, "audin_server_send_formats failed with error %u!", error);
WLog_ERR(TAG, "audin_server_send_formats failed with error %"PRIu32"!", error);
goto out_capacity;
}
@ -544,13 +544,13 @@ static void* audin_server_thread_func(void* arg)
case MSG_SNDIN_FORMATS:
if ((error = audin_server_recv_formats(audin, s, BytesReturned)))
{
WLog_ERR(TAG, "audin_server_recv_formats failed with error %u!", error);
WLog_ERR(TAG, "audin_server_recv_formats failed with error %"PRIu32"!", error);
goto out_capacity;
}
if ((error = audin_server_send_open(audin, s)))
{
WLog_ERR(TAG, "audin_server_send_open failed with error %u!", error);
WLog_ERR(TAG, "audin_server_send_open failed with error %"PRIu32"!", error);
goto out_capacity;
}
@ -559,7 +559,7 @@ static void* audin_server_thread_func(void* arg)
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 %u!", error);
WLog_ERR(TAG, "audin_server_recv_open_reply failed with error %"PRIu32"!", error);
goto out_capacity;
}
@ -571,7 +571,7 @@ static void* audin_server_thread_func(void* arg)
case MSG_SNDIN_DATA:
if ((error = audin_server_recv_data(audin, s, BytesReturned)))
{
WLog_ERR(TAG, "audin_server_recv_data failed with error %u!", error);
WLog_ERR(TAG, "audin_server_recv_data failed with error %"PRIu32"!", error);
goto out_capacity;
};
@ -581,7 +581,7 @@ static void* audin_server_thread_func(void* arg)
break;
default:
WLog_ERR(TAG, "audin_server_thread_func: unknown MessageId %d", MessageId);
WLog_ERR(TAG, "audin_server_thread_func: unknown MessageId %"PRIu8"", MessageId);
break;
}
}
@ -658,7 +658,7 @@ static BOOL audin_server_close(audin_server_context* context)
if (WaitForSingleObject(audin->thread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu", (unsigned long)GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", GetLastError());
return FALSE;
}

View File

@ -80,7 +80,7 @@ UINT cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
if ((formatList.numFormats * 36) != dataLen)
{
WLog_ERR(TAG, "Invalid short format list length: %d", dataLen);
WLog_ERR(TAG, "Invalid short format list length: %"PRIu32"", dataLen);
return ERROR_INTERNAL_ERROR;
}
@ -218,13 +218,13 @@ UINT cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
}
}
WLog_Print(cliprdr->log, WLOG_DEBUG, "ServerFormatList: numFormats: %d",
WLog_Print(cliprdr->log, WLOG_DEBUG, "ServerFormatList: numFormats: %"PRIu32"",
formatList.numFormats);
if (context->ServerFormatList)
{
if ((error = context->ServerFormatList(context, &formatList)))
WLog_ERR(TAG, "ServerFormatList failed with error %d", error);
WLog_ERR(TAG, "ServerFormatList failed with error %"PRIu32"", error);
}
error_out:
@ -265,7 +265,7 @@ UINT cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, wStream* s, UI
IFCALLRET(context->ServerFormatListResponse, error, context, &formatListResponse);
if (error)
WLog_ERR(TAG, "ServerFormatListResponse failed with error %u!", error);
WLog_ERR(TAG, "ServerFormatListResponse failed with error %"PRIu32"!", error);
return error;
}
@ -298,7 +298,7 @@ UINT cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, wStream* s, UIN
IFCALLRET(context->ServerFormatDataRequest, error, context, &formatDataRequest);
if (error)
WLog_ERR(TAG, "ServerFormatDataRequest failed with error %u!", error);
WLog_ERR(TAG, "ServerFormatDataRequest failed with error %"PRIu32"!", error);
return error;
}
@ -332,7 +332,7 @@ UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UI
IFCALLRET(context->ServerFormatDataResponse, error, context, &formatDataResponse);
if (error)
WLog_ERR(TAG, "ServerFormatDataResponse failed with error %u!", error);
WLog_ERR(TAG, "ServerFormatDataResponse failed with error %"PRIu32"!", error);
return error;
}

View File

@ -96,7 +96,7 @@ static UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
Stream_Write_UINT32(s, dataLen);
Stream_SetPosition(s, pos);
#ifdef WITH_DEBUG_CLIPRDR
WLog_DBG(TAG, "Cliprdr Sending (%d bytes)", dataLen + 8);
WLog_DBG(TAG, "Cliprdr Sending (%"PRIu32" bytes)", dataLen + 8);
winpr_HexDump(TAG, WLOG_DEBUG, Stream_Buffer(s), dataLen + 8);
#endif
@ -112,7 +112,7 @@ static UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
}
if (status != CHANNEL_RC_OK)
WLog_ERR(TAG, "VirtualChannelWrite failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWrite failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
@ -120,7 +120,7 @@ static UINT cliprdr_packet_send(cliprdrPlugin* cliprdr, wStream* s)
static void cliprdr_print_general_capability_flags(UINT32 flags)
{
WLog_INFO(TAG, "generalFlags (0x%08X) {", flags);
WLog_INFO(TAG, "generalFlags (0x%08"PRIX32") {", flags);
if (flags & CB_USE_LONG_FORMAT_NAMES)
WLog_INFO(TAG, "\tCB_USE_LONG_FORMAT_NAMES");
@ -160,7 +160,7 @@ static UINT cliprdr_process_general_capability(cliprdrPlugin* cliprdr,
Stream_Read_UINT32(s, version); /* version (4 bytes) */
Stream_Read_UINT32(s, generalFlags); /* generalFlags (4 bytes) */
DEBUG_CLIPRDR("Version: %d", version);
DEBUG_CLIPRDR("Version: %"PRIu32"", version);
#ifdef WITH_DEBUG_CLIPRDR
cliprdr_print_general_capability_flags(generalFlags);
#endif
@ -198,7 +198,7 @@ static UINT cliprdr_process_general_capability(cliprdrPlugin* cliprdr,
IFCALLRET(context->ServerCapabilities, error, context, &capabilities);
if (error)
WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error);
WLog_ERR(TAG, "ServerCapabilities failed with error %"PRIu32"!", error);
return error;
}
@ -230,7 +230,7 @@ static UINT cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s,
case CB_CAPSTYPE_GENERAL:
if ((error = cliprdr_process_general_capability(cliprdr, s)))
{
WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %u!",
WLog_ERR(TAG, "cliprdr_process_general_capability failed with error %"PRIu32"!",
error);
return error;
}
@ -238,7 +238,7 @@ static UINT cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, wStream* s,
break;
default:
WLog_ERR(TAG, "unknown cliprdr capability set: %d", capabilitySetType);
WLog_ERR(TAG, "unknown cliprdr capability set: %"PRIu16"", capabilitySetType);
return CHANNEL_RC_BAD_PROC;
break;
}
@ -286,7 +286,7 @@ static UINT cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, wStream* s,
IFCALLRET(context->MonitorReady, error, context, &monitorReady);
if (error)
WLog_ERR(TAG, "MonitorReady failed with error %u!", error);
WLog_ERR(TAG, "MonitorReady failed with error %"PRIu32"!", error);
return error;
}
@ -334,7 +334,7 @@ static UINT cliprdr_process_filecontents_request(cliprdrPlugin* cliprdr,
IFCALLRET(context->ServerFileContentsRequest, error, context, &request);
if (error)
WLog_ERR(TAG, "ServerFileContentsRequest failed with error %u!", error);
WLog_ERR(TAG, "ServerFileContentsRequest failed with error %"PRIu32"!", error);
return error;
}
@ -373,7 +373,7 @@ static UINT cliprdr_process_filecontents_response(cliprdrPlugin* cliprdr,
IFCALLRET(context->ServerFileContentsResponse, error, context, &response);
if (error)
WLog_ERR(TAG, "ServerFileContentsResponse failed with error %u!", error);
WLog_ERR(TAG, "ServerFileContentsResponse failed with error %"PRIu32"!", error);
return error;
}
@ -410,7 +410,7 @@ static UINT cliprdr_process_lock_clipdata(cliprdrPlugin* cliprdr, wStream* s,
IFCALLRET(context->ServerLockClipboardData, error, context, &lockClipboardData);
if (error)
WLog_ERR(TAG, "ServerLockClipboardData failed with error %u!", error);
WLog_ERR(TAG, "ServerLockClipboardData failed with error %"PRIu32"!", error);
return error;
}
@ -449,7 +449,7 @@ static UINT cliprdr_process_unlock_clipdata(cliprdrPlugin* cliprdr, wStream* s,
&unlockClipboardData);
if (error)
WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %u!", error);
WLog_ERR(TAG, "ServerUnlockClipboardData failed with error %"PRIu32"!", error);
return error;
}
@ -469,7 +469,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
Stream_Read_UINT16(s, msgFlags); /* msgFlags (2 bytes) */
Stream_Read_UINT32(s, dataLen); /* dataLen (4 bytes) */
#ifdef WITH_DEBUG_CLIPRDR
WLog_DBG(TAG, "msgType: %s (%d), msgFlags: %d dataLen: %d",
WLog_DBG(TAG, "msgType: %s (%"PRIu16"), msgFlags: %"PRIu16" dataLen: %"PRIu32"",
CB_MSG_TYPE_STRINGS[msgType], msgType, msgFlags, dataLen);
winpr_HexDump(TAG, WLOG_DEBUG, Stream_Buffer(s), dataLen + 8);
#endif
@ -478,26 +478,26 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
{
case CB_CLIP_CAPS:
if ((error = cliprdr_process_clip_caps(cliprdr, s, dataLen, msgFlags)))
WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %u!", error);
WLog_ERR(TAG, "cliprdr_process_clip_caps failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "cliprdr_process_monitor_ready failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "cliprdr_process_format_list failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "cliprdr_process_format_list_response failed with error %"PRIu32"!",
error);
break;
@ -505,7 +505,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
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 %u!",
WLog_ERR(TAG, "cliprdr_process_format_data_request failed with error %"PRIu32"!",
error);
break;
@ -513,7 +513,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
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 %u!",
WLog_ERR(TAG, "cliprdr_process_format_data_response failed with error %"PRIu32"!",
error);
break;
@ -521,7 +521,7 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
case CB_FILECONTENTS_REQUEST:
if ((error = cliprdr_process_filecontents_request(cliprdr, s, dataLen,
msgFlags)))
WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %u!",
WLog_ERR(TAG, "cliprdr_process_filecontents_request failed with error %"PRIu32"!",
error);
break;
@ -529,26 +529,26 @@ static UINT cliprdr_order_recv(cliprdrPlugin* cliprdr, wStream* s)
case CB_FILECONTENTS_RESPONSE:
if ((error = cliprdr_process_filecontents_response(cliprdr, s, dataLen,
msgFlags)))
WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %u!",
WLog_ERR(TAG, "cliprdr_process_filecontents_response failed with error %"PRIu32"!",
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 %u!", error);
WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "cliprdr_process_lock_clipdata failed with error %"PRIu32"!", error);
break;
default:
error = CHANNEL_RC_BAD_PROC;
WLog_ERR(TAG, "unknown msgType %d", msgType);
WLog_ERR(TAG, "unknown msgType %"PRIu16"", msgType);
break;
}
@ -743,7 +743,7 @@ static UINT cliprdr_client_format_list(CliprdrClientContext* context,
}
}
WLog_Print(cliprdr->log, WLOG_DEBUG, "ClientFormatList: numFormats: %d",
WLog_Print(cliprdr->log, WLOG_DEBUG, "ClientFormatList: numFormats: %"PRIu32"",
formatList->numFormats);
return cliprdr_packet_send(cliprdr, s);
}
@ -794,7 +794,7 @@ static UINT cliprdr_client_lock_clipboard_data(CliprdrClientContext* context,
Stream_Write_UINT32(s,
lockClipboardData->clipDataId); /* clipDataId (4 bytes) */
WLog_Print(cliprdr->log, WLOG_DEBUG,
"ClientLockClipboardData: clipDataId: 0x%04X",
"ClientLockClipboardData: clipDataId: 0x%08"PRIX32"",
lockClipboardData->clipDataId);
return cliprdr_packet_send(cliprdr, s);;
}
@ -820,7 +820,7 @@ static UINT cliprdr_client_unlock_clipboard_data(CliprdrClientContext* context,
Stream_Write_UINT32(s,
unlockClipboardData->clipDataId); /* clipDataId (4 bytes) */
WLog_Print(cliprdr->log, WLOG_DEBUG,
"ClientUnlockClipboardData: clipDataId: 0x%04X",
"ClientUnlockClipboardData: clipDataId: 0x%08"PRIX32"",
unlockClipboardData->clipDataId);
return cliprdr_packet_send(cliprdr, s);
}
@ -910,7 +910,7 @@ static UINT cliprdr_client_file_contents_request(CliprdrClientContext* context,
Stream_Write_UINT32(s,
fileContentsRequest->clipDataId); /* clipDataId (4 bytes) */
WLog_Print(cliprdr->log, WLOG_DEBUG,
"ClientFileContentsRequest: streamId: 0x%04X",
"ClientFileContentsRequest: streamId: 0x%08"PRIX32"",
fileContentsRequest->streamId);
return cliprdr_packet_send(cliprdr, s);
}
@ -947,7 +947,7 @@ static UINT cliprdr_client_file_contents_response(CliprdrClientContext* context,
Stream_Write(s, fileContentsResponse->requestedData,
fileContentsResponse->cbRequested);
WLog_Print(cliprdr->log, WLOG_DEBUG,
"ClientFileContentsResponse: streamId: 0x%04X",
"ClientFileContentsResponse: streamId: 0x%08"PRIX32"",
fileContentsResponse->streamId);
return cliprdr_packet_send(cliprdr, s);
}
@ -1030,7 +1030,7 @@ static VOID VCAPITYPE cliprdr_virtual_channel_open_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_DATA_RECEIVED:
if ((error = cliprdr_virtual_channel_event_data_received(cliprdr, pData, dataLength,
totalLength, dataFlags)))
WLog_ERR(TAG, "failed with error %u", error);
WLog_ERR(TAG, "failed with error %"PRIu32"", error);
break;
@ -1079,7 +1079,7 @@ static void* cliprdr_virtual_channel_client_thread(void* arg)
if ((error = cliprdr_order_recv(cliprdr, data)))
{
WLog_ERR(TAG, "cliprdr_order_recv failed with error %u!", error);
WLog_ERR(TAG, "cliprdr_order_recv failed with error %"PRIu32"!", error);
break;
}
}
@ -1108,7 +1108,7 @@ static UINT cliprdr_virtual_channel_event_connected(cliprdrPlugin* cliprdr,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -1147,7 +1147,7 @@ static UINT cliprdr_virtual_channel_event_disconnected(cliprdrPlugin* cliprdr)
&& (WaitForSingleObject(cliprdr->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", rc);
return rc;
}
@ -1157,7 +1157,7 @@ static UINT cliprdr_virtual_channel_event_disconnected(cliprdrPlugin* cliprdr)
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
return rc;
}
@ -1202,7 +1202,7 @@ static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex(LPVOID lpUserParam,
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 %u!",
WLog_ERR(TAG, "cliprdr_virtual_channel_event_connected failed with error %"PRIu32"!",
error);
break;
@ -1210,13 +1210,13 @@ static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_DISCONNECTED:
if ((error = cliprdr_virtual_channel_event_disconnected(cliprdr)))
WLog_ERR(TAG,
"cliprdr_virtual_channel_event_disconnected failed with error %u!", error);
"cliprdr_virtual_channel_event_disconnected failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "cliprdr_virtual_channel_event_terminated failed with error %"PRIu32"!",
error);
break;
@ -1295,7 +1295,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID p
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
free(cliprdr->context);
free(cliprdr);

View File

@ -281,7 +281,7 @@ static UINT cliprdr_server_format_list(CliprdrServerContext* context,
}
}
WLog_DBG(TAG, "ServerFormatList: numFormats: %d",
WLog_DBG(TAG, "ServerFormatList: numFormats: %"PRIu32"",
formatList->numFormats);
return cliprdr_server_packet_send(cliprdr, s);
}
@ -331,7 +331,7 @@ static UINT cliprdr_server_lock_clipboard_data(CliprdrServerContext* context,
Stream_Write_UINT32(s,
lockClipboardData->clipDataId); /* clipDataId (4 bytes) */
WLog_DBG(TAG, "ServerLockClipboardData: clipDataId: 0x%04X",
WLog_DBG(TAG, "ServerLockClipboardData: clipDataId: 0x%08"PRIX32"",
lockClipboardData->clipDataId);
return cliprdr_server_packet_send(cliprdr, s);
}
@ -356,7 +356,7 @@ static UINT cliprdr_server_unlock_clipboard_data(CliprdrServerContext* context,
Stream_Write_UINT32(s,
unlockClipboardData->clipDataId); /* clipDataId (4 bytes) */
WLog_DBG(TAG, "ServerUnlockClipboardData: clipDataId: 0x%04X",
WLog_DBG(TAG, "ServerUnlockClipboardData: clipDataId: 0x%08"PRIX32"",
unlockClipboardData->clipDataId);
return cliprdr_server_packet_send(cliprdr, s);
}
@ -445,7 +445,7 @@ static UINT cliprdr_server_file_contents_request(CliprdrServerContext* context,
fileContentsRequest->cbRequested); /* cbRequested (4 bytes) */
Stream_Write_UINT32(s,
fileContentsRequest->clipDataId); /* clipDataId (4 bytes) */
WLog_DBG(TAG, "ServerFileContentsRequest: streamId: 0x%04X",
WLog_DBG(TAG, "ServerFileContentsRequest: streamId: 0x%08"PRIX32"",
fileContentsRequest->streamId);
return cliprdr_server_packet_send(cliprdr, s);
}
@ -482,7 +482,7 @@ static UINT cliprdr_server_file_contents_response(CliprdrServerContext* context,
*/
Stream_Write(s, fileContentsResponse->requestedData,
fileContentsResponse->cbRequested);
WLog_DBG(TAG, "ServerFileContentsResponse: streamId: 0x%04X",
WLog_DBG(TAG, "ServerFileContentsResponse: streamId: 0x%08"PRIX32"",
fileContentsResponse->streamId);
return cliprdr_server_packet_send(cliprdr, s);
}
@ -545,7 +545,7 @@ static UINT cliprdr_server_receive_capabilities(CliprdrServerContext* context,
case CB_CAPSTYPE_GENERAL:
if ((error = cliprdr_server_receive_general_capability(context, s)))
{
WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %u",
WLog_ERR(TAG, "cliprdr_server_receive_general_capability failed with error %"PRIu32"",
error);
return error;
}
@ -553,7 +553,7 @@ static UINT cliprdr_server_receive_capabilities(CliprdrServerContext* context,
break;
default:
WLog_ERR(TAG, "unknown cliprdr capability set: %d", capabilitySetType);
WLog_ERR(TAG, "unknown cliprdr capability set: %"PRIu16"", capabilitySetType);
return ERROR_INVALID_DATA;
break;
}
@ -580,7 +580,7 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext*
if ((slength = Stream_GetRemainingLength(s)) < 520)
{
WLog_ERR(TAG,
"Stream_GetRemainingLength returned %lu but should at least be 520", (unsigned long) slength);
"Stream_GetRemainingLength returned %"PRIuz" but should at least be 520", slength);
return CHANNEL_RC_NO_MEMORY;
}
@ -613,7 +613,7 @@ static UINT cliprdr_server_receive_temporary_directory(CliprdrServerContext*
IFCALLRET(context->TempDirectory, error, context, &tempDirectory);
if (error)
WLog_ERR(TAG, "TempDirectory failed with error %u!", error);
WLog_ERR(TAG, "TempDirectory failed with error %"PRIu32"!", error);
return error;
}
@ -657,7 +657,7 @@ static UINT cliprdr_server_receive_format_list(CliprdrServerContext* context,
if ((formatList.numFormats * 36) != dataLen)
{
WLog_ERR(TAG, "Invalid short format list length: %d", dataLen);
WLog_ERR(TAG, "Invalid short format list length: %"PRIu32"", dataLen);
return ERROR_INVALID_PARAMETER;
}
@ -785,12 +785,12 @@ static UINT cliprdr_server_receive_format_list(CliprdrServerContext* context,
}
}
WLog_DBG(TAG, "ClientFormatList: numFormats: %d",
WLog_DBG(TAG, "ClientFormatList: numFormats: %"PRIu32"",
formatList.numFormats);
IFCALLRET(context->ClientFormatList, error, context, &formatList);
if (error)
WLog_ERR(TAG, "ClientFormatList failed with error %u!", error);
WLog_ERR(TAG, "ClientFormatList failed with error %"PRIu32"!", error);
out:
@ -821,7 +821,7 @@ static UINT cliprdr_server_receive_format_list_response(
&formatListResponse);
if (error)
WLog_ERR(TAG, "ClientFormatListResponse failed with error %u!", error);
WLog_ERR(TAG, "ClientFormatListResponse failed with error %"PRIu32"!", error);
return error;
}
@ -851,7 +851,7 @@ static UINT cliprdr_server_receive_lock_clipdata(CliprdrServerContext* context,
IFCALLRET(context->ClientLockClipboardData, error, context, &lockClipboardData);
if (error)
WLog_ERR(TAG, "ClientLockClipboardData failed with error %u!", error);
WLog_ERR(TAG, "ClientLockClipboardData failed with error %"PRIu32"!", error);
return error;
}
@ -883,7 +883,7 @@ static UINT cliprdr_server_receive_unlock_clipdata(CliprdrServerContext*
&unlockClipboardData);
if (error)
WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %u!", error);
WLog_ERR(TAG, "ClientUnlockClipboardData failed with error %"PRIu32"!", error);
return error;
}
@ -914,7 +914,7 @@ static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext*
IFCALLRET(context->ClientFormatDataRequest, error, context, &formatDataRequest);
if (error)
WLog_ERR(TAG, "ClientFormatDataRequest failed with error %u!", error);
WLog_ERR(TAG, "ClientFormatDataRequest failed with error %"PRIu32"!", error);
return error;
}
@ -951,7 +951,7 @@ static UINT cliprdr_server_receive_format_data_response(
&formatDataResponse);
if (error)
WLog_ERR(TAG, "ClientFormatDataResponse failed with error %u!", error);
WLog_ERR(TAG, "ClientFormatDataResponse failed with error %"PRIu32"!", error);
free(formatDataResponse.requestedFormatData);
return error;
@ -993,7 +993,7 @@ static UINT cliprdr_server_receive_filecontents_request(
IFCALLRET(context->ClientFileContentsRequest, error, context, &request);
if (error)
WLog_ERR(TAG, "ClientFileContentsRequest failed with error %u!", error);
WLog_ERR(TAG, "ClientFileContentsRequest failed with error %"PRIu32"!", error);
return error;
}
@ -1025,7 +1025,7 @@ static UINT cliprdr_server_receive_filecontents_response(
IFCALLRET(context->ClientFileContentsResponse, error, context, &response);
if (error)
WLog_ERR(TAG, "ClientFileContentsResponse failed with error %u!", error);
WLog_ERR(TAG, "ClientFileContentsResponse failed with error %"PRIu32"!", error);
return error;
}
@ -1040,14 +1040,14 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context,
{
UINT error;
WLog_DBG(TAG,
"CliprdrServerReceivePdu: msgType: %d msgFlags: 0x%08X dataLen: %d",
"CliprdrServerReceivePdu: msgType: %"PRIu16" msgFlags: 0x%04"PRIX16" dataLen: %"PRIu32"",
header->msgType, header->msgFlags, header->dataLen);
switch (header->msgType)
{
case CB_CLIP_CAPS:
if ((error = cliprdr_server_receive_capabilities(context, s, header)))
WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %u!",
WLog_ERR(TAG, "cliprdr_server_receive_capabilities failed with error %"PRIu32"!",
error);
break;
@ -1055,13 +1055,13 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context,
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 %u!", error);
"cliprdr_server_receive_temporary_directory failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "cliprdr_server_receive_format_list failed with error %"PRIu32"!",
error);
break;
@ -1069,20 +1069,20 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context,
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 %u!", error);
"cliprdr_server_receive_format_list_response failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "cliprdr_server_receive_lock_clipdata failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "cliprdr_server_receive_unlock_clipdata failed with error %"PRIu32"!",
error);
break;
@ -1090,34 +1090,34 @@ static UINT cliprdr_server_receive_pdu(CliprdrServerContext* context,
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 %u!", error);
"cliprdr_server_receive_format_data_request failed with error %"PRIu32"!", 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 %u!", error);
"cliprdr_server_receive_format_data_response failed with error %"PRIu32"!", 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 %u!", error);
"cliprdr_server_receive_filecontents_request failed with error %"PRIu32"!", 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 %u!", error);
"cliprdr_server_receive_filecontents_response failed with error %"PRIu32"!", error);
break;
default:
error = ERROR_INVALID_DATA;
WLog_DBG(TAG, "Unexpected clipboard PDU type: %d", header->msgType);
WLog_DBG(TAG, "Unexpected clipboard PDU type: %"PRIu16"", header->msgType);
break;
}
@ -1164,13 +1164,13 @@ static UINT cliprdr_server_init(CliprdrServerContext* context)
if ((error = context->ServerCapabilities(context, &capabilities)))
{
WLog_ERR(TAG, "ServerCapabilities failed with error %u!", error);
WLog_ERR(TAG, "ServerCapabilities failed with error %"PRIu32"!", error);
return error;
}
if ((error = context->MonitorReady(context, &monitorReady)))
{
WLog_ERR(TAG, "MonitorReady failed with error %u!", error);
WLog_ERR(TAG, "MonitorReady failed with error %"PRIu32"!", error);
return error;
}
@ -1203,7 +1203,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -1245,7 +1245,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -1270,7 +1270,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context)
if ((error = cliprdr_server_receive_pdu(context, s, &header)))
{
WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %u!", error);
WLog_ERR(TAG, "cliprdr_server_receive_pdu failed with error code %"PRIu32"!", error);
return error;
}
@ -1281,7 +1281,7 @@ UINT cliprdr_server_read(CliprdrServerContext* context)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -1336,7 +1336,7 @@ static void* cliprdr_server_thread(void* arg)
if ((error = cliprdr_server_init(context)))
{
WLog_ERR(TAG, "cliprdr_server_init failed with error %u!", error);
WLog_ERR(TAG, "cliprdr_server_init failed with error %"PRIu32"!", error);
goto out;
}
@ -1347,7 +1347,7 @@ static void* cliprdr_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
goto out;
}
@ -1356,7 +1356,7 @@ static void* cliprdr_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
goto out;
}
@ -1368,7 +1368,7 @@ static void* cliprdr_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
goto out;
}
@ -1376,7 +1376,7 @@ static void* cliprdr_server_thread(void* arg)
{
if ((error = context->CheckEventHandle(context)))
{
WLog_ERR(TAG, "CheckEventHandle failed with error %u!", error);
WLog_ERR(TAG, "CheckEventHandle failed with error %"PRIu32"!", error);
break;
}
}
@ -1507,7 +1507,7 @@ static UINT cliprdr_server_stop(CliprdrServerContext* context)
if (WaitForSingleObject(cliprdr->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}

View File

@ -115,7 +115,7 @@ UINT disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callbac
Stream_Write_UINT32(s, NumMonitors); /* NumMonitors (4 bytes) */
//WLog_ERR(TAG, "NumMonitors: %d", NumMonitors);
//WLog_ERR(TAG, "NumMonitors: %"PRIu32"", NumMonitors);
for (index = 0; index < NumMonitors; index++)
{
@ -148,14 +148,14 @@ UINT disp_send_display_control_monitor_layout_pdu(DISP_CHANNEL_CALLBACK* callbac
Stream_Write_UINT32(s, Monitors[index].DeviceScaleFactor); /* DeviceScaleFactor (4 bytes) */
#if 0
WLog_DBG(TAG, "\t: Flags: 0x%04X", Monitors[index].Flags);
WLog_DBG(TAG, "\t: Left: %d", Monitors[index].Left);
WLog_DBG(TAG, "\t: Top: %d", Monitors[index].Top);
WLog_DBG(TAG, "\t: Width: %d", Monitors[index].Width);
WLog_DBG(TAG, "\t: Height: %d", Monitors[index].Height);
WLog_DBG(TAG, "\t: PhysicalWidth: %d", Monitors[index].PhysicalWidth);
WLog_DBG(TAG, "\t: PhysicalHeight: %d", Monitors[index].PhysicalHeight);
WLog_DBG(TAG, "\t: Orientation: %d", Monitors[index].Orientation);
WLog_DBG(TAG, "\t: Flags: 0x%08"PRIX32"", Monitors[index].Flags);
WLog_DBG(TAG, "\t: Left: %"PRId32"", Monitors[index].Left);
WLog_DBG(TAG, "\t: Top: %"PRId32"", Monitors[index].Top);
WLog_DBG(TAG, "\t: Width: %"PRIu32"", Monitors[index].Width);
WLog_DBG(TAG, "\t: Height: %"PRIu32"", Monitors[index].Height);
WLog_DBG(TAG, "\t: PhysicalWidth: %"PRIu32"", Monitors[index].PhysicalWidth);
WLog_DBG(TAG, "\t: PhysicalHeight: %"PRIu32"", Monitors[index].PhysicalHeight);
WLog_DBG(TAG, "\t: Orientation: %"PRIu32"", Monitors[index].Orientation);
#endif
}
@ -188,8 +188,8 @@ UINT disp_recv_display_control_caps_pdu(DISP_CHANNEL_CALLBACK* callback, wStream
Stream_Read_UINT32(s, disp->MaxNumMonitors); /* MaxNumMonitors (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorAreaFactorA); /* MaxMonitorAreaFactorA (4 bytes) */
Stream_Read_UINT32(s, disp->MaxMonitorAreaFactorB); /* MaxMonitorAreaFactorB (4 bytes) */
//WLog_ERR(TAG, "DisplayControlCapsPdu: MaxNumMonitors: %d MaxMonitorWidth: %d MaxMonitorHeight: %d",
// disp->MaxNumMonitors, disp->MaxMonitorWidth, disp->MaxMonitorHeight);
//WLog_ERR(TAG, "DisplayControlCapsPdu: MaxNumMonitors: %"PRIu32" MaxMonitorAreaFactorA: %"PRIu32" MaxMonitorAreaFactorB: %"PRIu32"",
// disp->MaxNumMonitors, disp->MaxMonitorAreaFactorA, disp->MaxMonitorAreaFactorB);
return CHANNEL_RC_OK;
}
@ -213,7 +213,7 @@ UINT disp_recv_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
Stream_Read_UINT32(s, type); /* Type (4 bytes) */
Stream_Read_UINT32(s, length); /* Length (4 bytes) */
//WLog_ERR(TAG, "Type: %d Length: %d", type, length);
//WLog_ERR(TAG, "Type: %"PRIu32" Length: %"PRIu32"", type, length);
switch (type)
{
@ -221,7 +221,7 @@ UINT disp_recv_pdu(DISP_CHANNEL_CALLBACK* callback, wStream* s)
return disp_recv_display_control_caps_pdu(callback, s);
default:
WLog_ERR(TAG, "Type %d not recognized!", type);
WLog_ERR(TAG, "Type %"PRIu32" not recognized!", type);
return ERROR_INTERNAL_ERROR;
}
}

View File

@ -116,7 +116,7 @@ static UINT dvcman_register_plugin(IDRDYNVC_ENTRY_POINTS* pEntryPoints,
}
else
{
WLog_ERR(TAG, "register_plugin: Maximum DVC plugin number %d reached.",
WLog_ERR(TAG, "register_plugin: Maximum DVC plugin number %u reached.",
MAX_PLUGINS);
return ERROR_INTERNAL_ERROR;
}
@ -259,7 +259,7 @@ static DVCMAN_CHANNEL* dvcman_channel_new(IWTSVirtualChannelManager*
if (dvcman_find_channel_by_id(pChannelMgr, ChannelId))
{
WLog_ERR(TAG, "Protocol error: Duplicated ChannelId %d (%s)!", ChannelId,
WLog_ERR(TAG, "Protocol error: Duplicated ChannelId %"PRIu32" (%s)!", ChannelId,
ChannelName);
return NULL;
}
@ -345,7 +345,7 @@ static void dvcman_free(IWTSVirtualChannelManager* pChannelMgr)
if (pPlugin->Terminated)
if ((error = pPlugin->Terminated(pPlugin)))
WLog_ERR(TAG, "Terminated failed with error %u!", error);
WLog_ERR(TAG, "Terminated failed with error %"PRIu32"!", error);
}
dvcman->num_plugins = 0;
@ -372,7 +372,7 @@ static UINT dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
if (pPlugin->Initialize)
if ((error = pPlugin->Initialize(pPlugin, pChannelMgr)))
{
WLog_ERR(TAG, "Initialize failed with error %u!", error);
WLog_ERR(TAG, "Initialize failed with error %"PRIu32"!", error);
return error;
}
}
@ -405,7 +405,7 @@ static UINT dvcman_write_channel(IWTSVirtualChannel* pChannel, ULONG cbSize,
static UINT dvcman_close_channel_iface(IWTSVirtualChannel* pChannel)
{
DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
WLog_DBG(TAG, "close_channel_iface: id=%d", channel->channel_id);
WLog_DBG(TAG, "close_channel_iface: id=%"PRIu32"", channel->channel_id);
return CHANNEL_RC_OK;
}
@ -451,7 +451,7 @@ static UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr,
(IWTSVirtualChannel*) channel, NULL, &bAccept, &pCallback)) == CHANNEL_RC_OK
&& bAccept)
{
WLog_DBG(TAG, "listener %s created new channel %d",
WLog_DBG(TAG, "listener %s created new channel %"PRIu32"",
listener->channel_name, channel->channel_id);
channel->status = 0;
channel->channel_callback = pCallback;
@ -461,7 +461,7 @@ static UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr,
listener->iface.pInterface);
if (error)
WLog_ERR(TAG, "context.ReceiveSamples failed with error %u", error);
WLog_ERR(TAG, "context.ReceiveSamples failed with error %"PRIu32"", error);
return error;
}
@ -469,7 +469,7 @@ static UINT dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr,
{
if (error)
{
WLog_ERR(TAG, "OnNewChannelConnection failed with error %u!", error);
WLog_ERR(TAG, "OnNewChannelConnection failed with error %"PRIu32"!", error);
return error;
}
else
@ -499,7 +499,7 @@ static UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr,
if (!channel)
{
WLog_ERR(TAG, "ChannelId %d not found!", ChannelId);
WLog_ERR(TAG, "ChannelId %"PRIu32" not found!", ChannelId);
return ERROR_INTERNAL_ERROR;
}
@ -509,11 +509,11 @@ static UINT dvcman_open_channel(IWTSVirtualChannelManager* pChannelMgr,
if ((pCallback->OnOpen) && (error = pCallback->OnOpen(pCallback)))
{
WLog_ERR(TAG, "OnOpen failed with error %u!", error);
WLog_ERR(TAG, "OnOpen failed with error %"PRIu32"!", error);
return error;
}
WLog_DBG(TAG, "open_channel: ChannelId %d", ChannelId);
WLog_DBG(TAG, "open_channel: ChannelId %"PRIu32"", ChannelId);
}
return CHANNEL_RC_OK;
@ -536,7 +536,7 @@ static UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr,
if (!channel)
{
//WLog_ERR(TAG, "ChannelId %d not found!", ChannelId);
//WLog_ERR(TAG, "ChannelId %"PRIu32" not found!", ChannelId);
/**
* Windows 8 / Windows Server 2012 send close requests for channels that failed to be created.
* Do not warn, simply return success here.
@ -552,16 +552,16 @@ static UINT dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr,
if (error)
{
WLog_ERR(TAG, "OnChannelDisconnected returned with error %u!", error);
WLog_ERR(TAG, "OnChannelDisconnected returned with error %"PRIu32"!", error);
return error;
}
WLog_DBG(TAG, "dvcman_close_channel: channel %d closed", ChannelId);
WLog_DBG(TAG, "dvcman_close_channel: channel %"PRIu32" closed", ChannelId);
ichannel = (IWTSVirtualChannel*) channel;
if ((ichannel->Close) && (error = ichannel->Close(ichannel)))
{
WLog_ERR(TAG, "Close failed with error %u!", error);
WLog_ERR(TAG, "Close failed with error %"PRIu32"!", error);
return error;
}
}
@ -588,7 +588,7 @@ static UINT dvcman_receive_channel_data_first(IWTSVirtualChannelManager*
* Windows Server 2012 R2 can send some messages over Microsoft::Windows::RDS::Geometry::v08.01
* even if the dynamic virtual channel wasn't registered on our side. Ignoring it works.
*/
WLog_ERR(TAG, "ChannelId %d not found!", ChannelId);
WLog_ERR(TAG, "ChannelId %"PRIu32" not found!", ChannelId);
return CHANNEL_RC_OK;
}
@ -624,7 +624,7 @@ static UINT dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr,
{
/* Windows 8.1 tries to open channels not created.
* Ignore cases like this. */
WLog_ERR(TAG, "ChannelId %d not found!", ChannelId);
WLog_ERR(TAG, "ChannelId %"PRIu32" not found!", ChannelId);
return CHANNEL_RC_OK;
}
@ -642,8 +642,7 @@ static UINT dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr,
Stream_Write(channel->dvc_data, Stream_Pointer(data), dataSize);
if (((size_t) Stream_GetPosition(channel->dvc_data)) >=
channel->dvc_data_length)
if (Stream_GetPosition(channel->dvc_data) >= channel->dvc_data_length)
{
Stream_SealLength(channel->dvc_data);
Stream_SetPosition(channel->dvc_data, 0);
@ -707,7 +706,7 @@ static UINT drdynvc_send(drdynvcPlugin* drdynvc, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]", WTSErrorToString(status), status);
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]", WTSErrorToString(status), status);
}
return status;
@ -727,7 +726,7 @@ static UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId,
UINT32 cbLen;
unsigned long chunkLength;
UINT status;
WLog_DBG(TAG, "write_data: ChannelId=%d size=%d", ChannelId, dataSize);
WLog_DBG(TAG, "write_data: ChannelId=%"PRIu32" size=%"PRIu32"", ChannelId, dataSize);
data_out = Stream_New(NULL, CHANNEL_CHUNK_LENGTH);
if (!data_out)
@ -799,7 +798,7 @@ static UINT drdynvc_write_data(drdynvcPlugin* drdynvc, UINT32 ChannelId,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -832,7 +831,7 @@ static UINT drdynvc_send_capability_response(drdynvcPlugin* drdynvc)
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -924,7 +923,7 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp,
ChannelId = drdynvc_read_variable_uint(s, cbChId);
pos = Stream_GetPosition(s);
WLog_DBG(TAG, "process_create_request: ChannelId=%d ChannelName=%s", ChannelId,
WLog_DBG(TAG, "process_create_request: ChannelId=%"PRIu32" ChannelName=%s", ChannelId,
Stream_Pointer(s));
channel_status = dvcman_create_channel(drdynvc->channel_mgr, ChannelId,
(char*) Stream_Pointer(s));
@ -956,7 +955,7 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -965,14 +964,14 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp,
{
if ((status = dvcman_open_channel(drdynvc->channel_mgr, ChannelId)))
{
WLog_ERR(TAG, "dvcman_open_channel failed with error %u!", status);
WLog_ERR(TAG, "dvcman_open_channel failed with error %"PRIu32"!", status);
return status;
}
}
else
{
if ((status = dvcman_close_channel(drdynvc->channel_mgr, ChannelId)))
WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", status);
WLog_ERR(TAG, "dvcman_close_channel failed with error %"PRIu32"!", status);
}
return status;
@ -991,7 +990,7 @@ static UINT drdynvc_process_data_first(drdynvcPlugin* drdynvc, int Sp,
UINT32 ChannelId;
ChannelId = drdynvc_read_variable_uint(s, cbChId);
Length = drdynvc_read_variable_uint(s, Sp);
WLog_DBG(TAG, "process_data_first: Sp=%d cbChId=%d, ChannelId=%d Length=%d", Sp,
WLog_DBG(TAG, "process_data_first: Sp=%d cbChId=%d, ChannelId=%"PRIu32" Length=%"PRIu32"", Sp,
cbChId, ChannelId, Length);
status = dvcman_receive_channel_data_first(drdynvc->channel_mgr, ChannelId,
Length);
@ -1012,7 +1011,7 @@ static UINT drdynvc_process_data(drdynvcPlugin* drdynvc, int Sp, int cbChId,
{
UINT32 ChannelId;
ChannelId = drdynvc_read_variable_uint(s, cbChId);
WLog_DBG(TAG, "process_data: Sp=%d cbChId=%d, ChannelId=%d", Sp, cbChId,
WLog_DBG(TAG, "process_data: Sp=%d cbChId=%d, ChannelId=%"PRIu32"", Sp, cbChId,
ChannelId);
return dvcman_receive_channel_data(drdynvc->channel_mgr, ChannelId, s);
}
@ -1030,12 +1029,12 @@ static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp,
UINT32 ChannelId;
wStream* data_out;
ChannelId = drdynvc_read_variable_uint(s, cbChId);
WLog_DBG(TAG, "process_close_request: Sp=%d cbChId=%d, ChannelId=%d", Sp,
WLog_DBG(TAG, "process_close_request: Sp=%d cbChId=%d, ChannelId=%"PRIu32"", Sp,
cbChId, ChannelId);
if ((error = dvcman_close_channel(drdynvc->channel_mgr, ChannelId)))
{
WLog_ERR(TAG, "dvcman_close_channel failed with error %u!", error);
WLog_ERR(TAG, "dvcman_close_channel failed with error %"PRIu32"!", error);
return error;
}
@ -1053,7 +1052,7 @@ static UINT drdynvc_process_close_request(drdynvcPlugin* drdynvc, int Sp,
error = drdynvc_send(drdynvc, data_out);
if (error)
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(error), error);
return error;
@ -1183,7 +1182,7 @@ static void VCAPITYPE drdynvc_virtual_channel_open_event_ex(LPVOID lpUserParam,
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 %u", error);
WLog_ERR(TAG, "drdynvc_virtual_channel_event_data_received failed with error %"PRIu32"", error);
break;
@ -1232,7 +1231,7 @@ static void* drdynvc_virtual_channel_client_thread(void* arg)
if ((error = drdynvc_order_recv(drdynvc, data)))
{
Stream_Free(data, TRUE);
WLog_ERR(TAG, "drdynvc_order_recv failed with error %u!", error);
WLog_ERR(TAG, "drdynvc_order_recv failed with error %"PRIu32"!", error);
break;
}
@ -1266,7 +1265,7 @@ static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVO
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -1302,7 +1301,7 @@ static UINT drdynvc_virtual_channel_event_connected(drdynvcPlugin* drdynvc, LPVO
if ((error = dvcman_init(drdynvc->channel_mgr)))
{
WLog_ERR(TAG, "dvcman_init failed with error %u!", error);
WLog_ERR(TAG, "dvcman_init failed with error %"PRIu32"!", error);
goto error;
}
@ -1334,7 +1333,7 @@ static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
(WaitForSingleObject(drdynvc->thread, INFINITE) == WAIT_FAILED))
{
status = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", status);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", status);
return status;
}
@ -1347,7 +1346,7 @@ static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -1396,19 +1395,19 @@ static VOID VCAPITYPE drdynvc_virtual_channel_init_event_ex(LPVOID lpUserParam,
{
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 %u", error);
WLog_ERR(TAG, "drdynvc_virtual_channel_event_connected failed with error %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "drdynvc_virtual_channel_event_disconnected failed with error %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "drdynvc_virtual_channel_event_terminated failed with error %"PRIu32"", error);
break;
}
@ -1481,7 +1480,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOI
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelInit failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
free(drdynvc->context);
free(drdynvc);

View File

@ -161,7 +161,7 @@ static UINT drdynvc_server_stop(DrdynvcServerContext* context)
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}

View File

@ -592,13 +592,13 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
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 %lld", file->fullpath, (long long) size);
WLog_ERR(TAG, "Unable to truncate %s to %"PRId64"", file->fullpath, size);
return FALSE;
}
liSize.QuadPart = size;
if (SetFilePointer(hFd, liSize.LowPart, &liSize.HighPart, FILE_BEGIN) == 0)
{
WLog_ERR(TAG, "Unable to truncate %s to %lld", file->fullpath, (long long) size);
WLog_ERR(TAG, "Unable to truncate %s to %"PRId64"", file->fullpath, size);
CloseHandle(hFd);
return FALSE;
}

View File

@ -708,7 +708,7 @@ static void* drive_thread_func(void* arg)
if (irp)
if ((error = drive_process_irp(drive, irp)))
{
WLog_ERR(TAG, "drive_process_irp failed with error %u!", error);
WLog_ERR(TAG, "drive_process_irp failed with error %"PRIu32"!", error);
break;
}
}
@ -753,7 +753,7 @@ static UINT drive_free(DEVICE* device)
&& (WaitForSingleObject(drive->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -844,7 +844,7 @@ UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints,
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) drive)))
{
WLog_ERR(TAG, "RegisterDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterDevice failed with error %"PRIu32"!", error);
goto out_error;
}

View File

@ -83,7 +83,7 @@ static UINT echo_server_open_channel(echo_server* echo)
if (WaitForSingleObject(hEvent, 1000) == WAIT_FAILED)
{
Error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long)Error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", Error);
return Error;
}
@ -121,12 +121,12 @@ static void* echo_server_thread_func(void* arg)
if ((error = echo_server_open_channel(echo)))
{
UINT error2 = 0;
WLog_ERR(TAG, "echo_server_open_channel failed with error %u!", error);
WLog_ERR(TAG, "echo_server_open_channel failed with error %"PRIu32"!", 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 %u",
WLog_ERR(TAG, "echo server's OpenResult callback failed with error %"PRIu32"",
error2);
goto out;
@ -158,7 +158,7 @@ static void* echo_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@ -168,7 +168,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_CLOSED);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@ -180,7 +180,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_ERROR);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@ -194,7 +194,7 @@ static void* echo_server_thread_func(void* arg)
ECHO_SERVER_OPEN_RESULT_OK);
if (error)
WLog_ERR(TAG, "OpenResult failed with error %u!", error);
WLog_ERR(TAG, "OpenResult failed with error %"PRIu32"!", error);
break;
}
@ -217,7 +217,7 @@ static void* echo_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@ -250,7 +250,7 @@ static void* echo_server_thread_func(void* arg)
if (error)
{
WLog_ERR(TAG, "Response failed with error %u!", error);
WLog_ERR(TAG, "Response failed with error %"PRIu32"!", error);
break;
}
}
@ -315,7 +315,7 @@ static UINT echo_server_close(echo_server_context* context)
if (WaitForSingleObject(echo->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}

View File

@ -80,7 +80,7 @@ static UINT encomsp_read_unicode_string(wStream* s, ENCOMSP_UNICODE_STRING* str)
if (str->cchString > 1024)
{
WLog_ERR(TAG, "cchString was %d but has to be < 1025!", str->cchString);
WLog_ERR(TAG, "cchString was %"PRIu16" but has to be < 1025!", str->cchString);
return ERROR_INVALID_DATA;
}
@ -115,7 +115,7 @@ static UINT encomsp_virtual_channel_write(encomspPlugin* encomsp, wStream* s)
return ERROR_INVALID_HANDLE;
#if 0
WLog_INFO(TAG, "EncomspWrite (%d)", Stream_Length(s));
WLog_INFO(TAG, "EncomspWrite (%"PRIuz")", Stream_Length(s));
winpr_HexDump(Stream_Buffer(s), Stream_Length(s));
#endif
status = encomsp->channelEntryPoints.pVirtualChannelWriteEx(encomsp->InitHandle,
@ -123,7 +123,7 @@ static UINT encomsp_virtual_channel_write(encomspPlugin* encomsp, wStream* s)
Stream_Buffer(s), (UINT32) Stream_Length(s), s);
if (status != CHANNEL_RC_OK)
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
@ -178,7 +178,7 @@ static UINT encomsp_recv_filter_updated_pdu(encomspPlugin* encomsp, wStream* s,
IFCALLRET(context->FilterUpdated, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->FilterUpdated failed with error %u", error);
WLog_ERR(TAG, "context->FilterUpdated failed with error %"PRIu32"", error);
return error;
}
@ -214,7 +214,7 @@ static UINT encomsp_recv_application_created_pdu(encomspPlugin* encomsp,
if ((error = encomsp_read_unicode_string(s, &(pdu.Name))))
{
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %"PRIu32"", error);
return error;
}
@ -240,7 +240,7 @@ static UINT encomsp_recv_application_created_pdu(encomspPlugin* encomsp,
IFCALLRET(context->ApplicationCreated, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ApplicationCreated failed with error %u", error);
WLog_ERR(TAG, "context->ApplicationCreated failed with error %"PRIu32"", error);
return error;
}
@ -294,7 +294,7 @@ static UINT encomsp_recv_application_removed_pdu(encomspPlugin* encomsp,
IFCALLRET(context->ApplicationRemoved, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ApplicationRemoved failed with error %u", error);
WLog_ERR(TAG, "context->ApplicationRemoved failed with error %"PRIu32"", error);
return error;
}
@ -331,7 +331,7 @@ static UINT encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s,
if ((error = encomsp_read_unicode_string(s, &(pdu.Name))))
{
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %"PRIu32"", error);
return error;
}
@ -357,7 +357,7 @@ static UINT encomsp_recv_window_created_pdu(encomspPlugin* encomsp, wStream* s,
IFCALLRET(context->WindowCreated, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->WindowCreated failed with error %u", error);
WLog_ERR(TAG, "context->WindowCreated failed with error %"PRIu32"", error);
return error;
}
@ -411,7 +411,7 @@ static UINT encomsp_recv_window_removed_pdu(encomspPlugin* encomsp, wStream* s,
IFCALLRET(context->WindowRemoved, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->WindowRemoved failed with error %u", error);
WLog_ERR(TAG, "context->WindowRemoved failed with error %"PRIu32"", error);
return error;
}
@ -465,7 +465,7 @@ static UINT encomsp_recv_show_window_pdu(encomspPlugin* encomsp, wStream* s,
IFCALLRET(context->ShowWindow, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ShowWindow failed with error %u", error);
WLog_ERR(TAG, "context->ShowWindow failed with error %"PRIu32"", error);
return error;
}
@ -502,7 +502,7 @@ static UINT encomsp_recv_participant_created_pdu(encomspPlugin* encomsp,
if ((error = encomsp_read_unicode_string(s, &(pdu.FriendlyName))))
{
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %u", error);
WLog_ERR(TAG, "encomsp_read_unicode_string failed with error %"PRIu32"", error);
return error;
}
@ -528,7 +528,7 @@ static UINT encomsp_recv_participant_created_pdu(encomspPlugin* encomsp,
IFCALLRET(context->ParticipantCreated, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ParticipantCreated failed with error %u", error);
WLog_ERR(TAG, "context->ParticipantCreated failed with error %"PRIu32"", error);
return error;
}
@ -584,7 +584,7 @@ static UINT encomsp_recv_participant_removed_pdu(encomspPlugin* encomsp,
IFCALLRET(context->ParticipantRemoved, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ParticipantRemoved failed with error %u", error);
WLog_ERR(TAG, "context->ParticipantRemoved failed with error %"PRIu32"", error);
return error;
}
@ -639,7 +639,7 @@ static UINT encomsp_recv_change_participant_control_level_pdu(
IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u",
WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %"PRIu32"",
error);
return error;
@ -670,7 +670,7 @@ static UINT encomsp_send_change_participant_control_level_pdu(
if ((error = encomsp_write_header(s, (ENCOMSP_ORDER_HEADER*) pdu)))
{
WLog_ERR(TAG, "encomsp_write_header failed with error %u!", error);
WLog_ERR(TAG, "encomsp_write_header failed with error %"PRIu32"!", error);
return error;
}
@ -721,7 +721,7 @@ static UINT encomsp_recv_graphics_stream_paused_pdu(encomspPlugin* encomsp,
IFCALLRET(context->GraphicsStreamPaused, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %u", error);
WLog_ERR(TAG, "context->GraphicsStreamPaused failed with error %"PRIu32"", error);
return error;
}
@ -767,7 +767,7 @@ static UINT encomsp_recv_graphics_stream_resumed_pdu(encomspPlugin* encomsp,
IFCALLRET(context->GraphicsStreamResumed, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %u", error);
WLog_ERR(TAG, "context->GraphicsStreamResumed failed with error %"PRIu32"", error);
return error;
}
@ -786,18 +786,18 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
{
if ((error = encomsp_read_header(s, &header)))
{
WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error);
WLog_ERR(TAG, "encomsp_read_header failed with error %"PRIu32"!", error);
return error;
}
//WLog_DBG(TAG, "EncomspReceive: Type: %d Length: %d", header.Type, header.Length);
//WLog_DBG(TAG, "EncomspReceive: Type: %"PRIu16" Length: %"PRIu16"", header.Type, header.Length);
switch (header.Type)
{
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 %u!", error);
WLog_ERR(TAG, "encomsp_recv_filter_updated_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -806,7 +806,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -816,7 +816,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_application_removed_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -826,7 +826,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!", error);
WLog_ERR(TAG, "encomsp_recv_window_removed_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -835,7 +835,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!", error);
WLog_ERR(TAG, "encomsp_recv_window_created_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -844,7 +844,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!", error);
WLog_ERR(TAG, "encomsp_recv_show_window_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -853,7 +853,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_participant_removed_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -863,7 +863,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_participant_created_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -875,7 +875,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
&header)))
{
WLog_ERR(TAG,
"encomsp_recv_change_participant_control_level_pdu failed with error %u!",
"encomsp_recv_change_participant_control_level_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -885,7 +885,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_graphics_stream_paused_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -895,7 +895,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
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 %u!",
WLog_ERR(TAG, "encomsp_recv_graphics_stream_resumed_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -903,7 +903,7 @@ static UINT encomsp_process_receive(encomspPlugin* encomsp, wStream* s)
break;
default:
WLog_ERR(TAG, "header.Type %d not found", header.Type);
WLog_ERR(TAG, "header.Type %"PRIu16" not found", header.Type);
return ERROR_INVALID_DATA;
break;
}
@ -934,7 +934,7 @@ static int encomsp_send(encomspPlugin* encomsp, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -1019,7 +1019,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_open_event_ex(LPVOID lpUserParam,
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 %u", error);
"encomsp_virtual_channel_event_data_received failed with error %"PRIu32"", error);
break;
@ -1070,7 +1070,7 @@ static void* encomsp_virtual_channel_client_thread(void* arg)
if ((error = encomsp_process_receive(encomsp, data)))
{
WLog_ERR(TAG, "encomsp_process_receive failed with error %u!", error);
WLog_ERR(TAG, "encomsp_process_receive failed with error %"PRIu32"!", error);
break;
}
}
@ -1099,7 +1099,7 @@ static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -1137,7 +1137,7 @@ static UINT encomsp_virtual_channel_event_disconnected(encomspPlugin* encomsp)
&& (WaitForSingleObject(encomsp->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", rc);
return rc;
}
@ -1149,7 +1149,7 @@ static UINT encomsp_virtual_channel_event_disconnected(encomspPlugin* encomsp)
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelClose failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
return rc;
}
@ -1195,7 +1195,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam,
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 %u",
WLog_ERR(TAG, "encomsp_virtual_channel_event_connected failed with error %"PRIu32"",
error);
break;
@ -1203,7 +1203,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_DISCONNECTED:
if ((error = encomsp_virtual_channel_event_disconnected(encomsp)))
WLog_ERR(TAG,
"encomsp_virtual_channel_event_disconnected failed with error %u", error);
"encomsp_virtual_channel_event_disconnected failed with error %"PRIu32"", error);
break;
@ -1212,7 +1212,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam,
break;
default:
WLog_ERR(TAG, "Unhandled event type %d", event);
WLog_ERR(TAG, "Unhandled event type %"PRIu32"", event);
}
if (error && encomsp->rdpcontext)
@ -1283,7 +1283,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOI
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "failed with %s [%08X]",
WLog_ERR(TAG, "failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
goto error_out;
}

View File

@ -122,7 +122,7 @@ static UINT encomsp_recv_change_participant_control_level_pdu(
IFCALLRET(context->ChangeParticipantControlLevel, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %u",
WLog_ERR(TAG, "context->ChangeParticipantControlLevel failed with error %"PRIu32"",
error);
return error;
@ -143,11 +143,11 @@ static UINT encomsp_server_receive_pdu(EncomspServerContext* context,
{
if ((error = encomsp_read_header(s, &header)))
{
WLog_ERR(TAG, "encomsp_read_header failed with error %u!", error);
WLog_ERR(TAG, "encomsp_read_header failed with error %"PRIu32"!", error);
return error;
}
WLog_INFO(TAG, "EncomspReceive: Type: %d Length: %d", header.Type,
WLog_INFO(TAG, "EncomspReceive: Type: %"PRIu16" Length: %"PRIu16"", header.Type,
header.Length);
switch (header.Type)
@ -157,7 +157,7 @@ static UINT encomsp_server_receive_pdu(EncomspServerContext* context,
&header)))
{
WLog_ERR(TAG,
"encomsp_recv_change_participant_control_level_pdu failed with error %u!",
"encomsp_recv_change_participant_control_level_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -165,7 +165,7 @@ static UINT encomsp_server_receive_pdu(EncomspServerContext* context,
break;
default:
WLog_ERR(TAG, "header.Type unknown %d!", header.Type);
WLog_ERR(TAG, "header.Type unknown %"PRIu16"!", header.Type);
return ERROR_INVALID_DATA;
break;
}
@ -220,7 +220,7 @@ static void* encomsp_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@ -229,7 +229,7 @@ static void* encomsp_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
break;
}
@ -269,7 +269,7 @@ static void* encomsp_server_thread(void* arg)
if ((error = encomsp_server_receive_pdu(context, s)))
{
WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %u!", error);
WLog_ERR(TAG, "encomsp_server_receive_pdu failed with error %"PRIu32"!", error);
break;
}
@ -333,7 +333,7 @@ static UINT encomsp_server_stop(EncomspServerContext* context)
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}

View File

@ -252,7 +252,7 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
case IRP_MJ_CREATE:
if ((error = parallel_process_irp_create(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp_create failed with error %d!", error);
WLog_ERR(TAG, "parallel_process_irp_create failed with error %"PRIu32"!", error);
return error;
}
@ -261,7 +261,7 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
case IRP_MJ_CLOSE:
if ((error = parallel_process_irp_close(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp_close failed with error %d!", error);
WLog_ERR(TAG, "parallel_process_irp_close failed with error %"PRIu32"!", error);
return error;
}
@ -270,7 +270,7 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
case IRP_MJ_READ:
if ((error = parallel_process_irp_read(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp_read failed with error %d!", error);
WLog_ERR(TAG, "parallel_process_irp_read failed with error %"PRIu32"!", error);
return error;
}
@ -279,7 +279,7 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
case IRP_MJ_WRITE:
if ((error = parallel_process_irp_write(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp_write failed with error %d!", error);
WLog_ERR(TAG, "parallel_process_irp_write failed with error %"PRIu32"!", error);
return error;
}
@ -288,7 +288,7 @@ static UINT parallel_process_irp(PARALLEL_DEVICE* parallel, IRP* irp)
case IRP_MJ_DEVICE_CONTROL:
if ((error = parallel_process_irp_device_control(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp_device_control failed with error %d!",
WLog_ERR(TAG, "parallel_process_irp_device_control failed with error %"PRIu32"!",
error);
return error;
}
@ -334,7 +334,7 @@ static void* parallel_thread_func(void* arg)
if ((error = parallel_process_irp(parallel, irp)))
{
WLog_ERR(TAG, "parallel_process_irp failed with error %d!", error);
WLog_ERR(TAG, "parallel_process_irp failed with error %"PRIu32"!", error);
break;
}
}
@ -379,7 +379,7 @@ static UINT parallel_free(DEVICE* device)
&& (WaitForSingleObject(parallel->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -461,7 +461,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) parallel)))
{
WLog_ERR(TAG, "RegisterDevice failed with error %u!", error);
WLog_ERR(TAG, "RegisterDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -153,7 +153,7 @@ static UINT printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
if (error)
{
WLog_ERR(TAG, "printjob->Write failed with error %u!", error);
WLog_ERR(TAG, "printjob->Write failed with error %"PRIu32"!", error);
return error;
}
@ -188,7 +188,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
case IRP_MJ_CREATE:
if ((error = printer_process_irp_create(printer_dev, irp)))
{
WLog_ERR(TAG, "printer_process_irp_create failed with error %u!", error);
WLog_ERR(TAG, "printer_process_irp_create failed with error %"PRIu32"!", error);
return error;
}
@ -197,7 +197,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
case IRP_MJ_CLOSE:
if ((error = printer_process_irp_close(printer_dev, irp)))
{
WLog_ERR(TAG, "printer_process_irp_close failed with error %u!", error);
WLog_ERR(TAG, "printer_process_irp_close failed with error %"PRIu32"!", error);
return error;
}
@ -206,7 +206,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
case IRP_MJ_WRITE:
if ((error = printer_process_irp_write(printer_dev, irp)))
{
WLog_ERR(TAG, "printer_process_irp_write failed with error %u!", error);
WLog_ERR(TAG, "printer_process_irp_write failed with error %"PRIu32"!", error);
return error;
}
@ -215,7 +215,7 @@ static UINT printer_process_irp(PRINTER_DEVICE* printer_dev, IRP* irp)
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 %u!",
WLog_ERR(TAG, "printer_process_irp_device_control failed with error %"PRIu32"!",
error);
return error;
}
@ -245,7 +245,7 @@ static void* printer_thread_func(void* arg)
if (rc == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -266,7 +266,7 @@ static void* printer_thread_func(void* arg)
if ((error = printer_process_irp(printer_dev, irp)))
{
WLog_ERR(TAG, "printer_process_irp failed with error %d!", error);
WLog_ERR(TAG, "printer_process_irp failed with error %"PRIu32"!", error);
break;
}
}
@ -307,7 +307,7 @@ static UINT printer_free(DEVICE* device)
if (WaitForSingleObject(printer_dev->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
return error;
}
@ -441,7 +441,7 @@ UINT printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints,
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) printer_dev)))
{
WLog_ERR(TAG, "RegisterDevice failed with error %d!", error);
WLog_ERR(TAG, "RegisterDevice failed with error %"PRIu32"!", error);
goto error_out;
}
@ -514,7 +514,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
if ((error = printer_register(pEntryPoints, printer)))
{
WLog_ERR(TAG, "printer_register failed with error %u!", error);
WLog_ERR(TAG, "printer_register failed with error %"PRIu32"!", error);
return error;
}
}
@ -528,7 +528,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
if ((error = printer_register(pEntryPoints, printer)))
{
WLog_ERR(TAG, "printer_register failed with error %u!", error);
WLog_ERR(TAG, "printer_register failed with error %"PRIu32"!", error);
free(printers);
return error;
}

View File

@ -62,7 +62,7 @@ static UINT rail_send(railPlugin* rail, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -179,14 +179,14 @@ static UINT rail_send_client_sysparam(RailClientContext* context,
if ((error = rail_write_client_sysparam_order(s, sysparam)))
{
WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error);
WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rail_send_pdu failed with error %"PRIu32"!", error);
}
Stream_Free(s, TRUE);
@ -209,7 +209,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -220,7 +220,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -231,7 +231,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -242,7 +242,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -253,7 +253,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -264,7 +264,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -275,7 +275,7 @@ static UINT rail_client_system_param(RailClientContext* context,
if ((error = rail_send_client_sysparam(context, sysparam)))
{
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam failed with error %"PRIu32"!", error);
return error;
}
}
@ -558,7 +558,7 @@ static VOID VCAPITYPE rail_virtual_channel_open_event_ex(LPVOID lpUserParam, DWO
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 %u!",
WLog_ERR(TAG, "rail_virtual_channel_event_data_received failed with error %"PRIu32"!",
error);
break;
@ -610,7 +610,7 @@ static void* rail_virtual_channel_client_thread(void* arg)
if ((error = rail_order_recv(rail, data)))
{
WLog_ERR(TAG, "rail_order_recv failed with error %d!", error);
WLog_ERR(TAG, "rail_order_recv failed with error %"PRIu32"!", error);
break;
}
}
@ -638,7 +638,7 @@ static UINT rail_virtual_channel_event_connected(railPlugin* rail, LPVOID pData,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpen failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -677,7 +677,7 @@ static UINT rail_virtual_channel_event_disconnected(railPlugin* rail)
&& (WaitForSingleObject(rail->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", rc);
return rc;
}
@ -689,7 +689,7 @@ static UINT rail_virtual_channel_event_disconnected(railPlugin* rail)
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
return rc;
}
@ -727,14 +727,14 @@ static VOID VCAPITYPE rail_virtual_channel_init_event_ex(LPVOID lpUserParam, LPV
{
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 %u!",
WLog_ERR(TAG, "rail_virtual_channel_event_connected failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "rail_virtual_channel_event_disconnected failed with error %"PRIu32"!",
error);
break;
@ -825,7 +825,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID p
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "failed with %s [%08X]",
WLog_ERR(TAG, "failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
goto error_out;
}

View File

@ -84,7 +84,7 @@ UINT rail_send_pdu(railPlugin* rail, wStream* s, UINT16 orderType)
rail_write_pdu_header(s, orderType, orderLength);
Stream_SetPosition(s, orderLength);
WLog_Print(rail->log, WLOG_DEBUG, "Sending %s PDU, length: %d",
WLog_Print(rail->log, WLOG_DEBUG, "Sending %s PDU, length: %"PRIu16"",
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
return rail_send_channel_data(rail, Stream_Buffer(s), orderLength);
@ -268,17 +268,17 @@ UINT rail_write_client_exec_order(wStream* s, RAIL_EXEC_ORDER* exec)
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 %u", error);
WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %"PRIu32"", error);
return error;
}
if ((error = rail_write_unicode_string_value(s, &exec->workingDir)))
{
WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error);
WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %"PRIu32"", error);
return error;
}
if ((error = rail_write_unicode_string_value(s, &exec->arguments)))
{
WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %u", error);
WLog_ERR(TAG, "rail_write_unicode_string_value failed with error %"PRIu32"", error);
return error;
}
return error;
@ -408,7 +408,7 @@ UINT rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake
if ((error = rail_read_handshake_order(s, handshake)))
{
WLog_ERR(TAG, "rail_read_handshake_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_handshake_order failed with error %"PRIu32"!", error);
return error;
}
@ -416,7 +416,7 @@ UINT rail_recv_handshake_order(railPlugin* rail, RAIL_HANDSHAKE_ORDER* handshake
{
IFCALLRET(context->ServerHandshake, error, context, handshake);
if (error)
WLog_ERR(TAG, "context.ServerHandshake failed with error %u", error);
WLog_ERR(TAG, "context.ServerHandshake failed with error %"PRIu32"", error);
}
return error;
@ -434,7 +434,7 @@ UINT rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* han
if ((error = rail_read_handshake_ex_order(s, handshakeEx)))
{
WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_handshake_ex_order failed with error %"PRIu32"!", error);
return error;
}
@ -442,7 +442,7 @@ UINT rail_recv_handshake_ex_order(railPlugin* rail, RAIL_HANDSHAKE_EX_ORDER* han
{
IFCALLRET(context->ClientHandshakeEx, error, context, handshakeEx);
if (error)
WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %u", error);
WLog_ERR(TAG, "context.ClientHandshakeEx failed with error %"PRIu32"", error);
}
@ -463,7 +463,7 @@ UINT rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execR
if ((error = rail_read_server_exec_result_order(s, execResult)))
{
WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_server_exec_result_order failed with error %"PRIu32"!", error);
return error;
}
@ -471,7 +471,7 @@ UINT rail_recv_exec_result_order(railPlugin* rail, RAIL_EXEC_RESULT_ORDER* execR
{
IFCALLRET(context->ServerExecuteResult, error, context, execResult);
if (error)
WLog_ERR(TAG, "context.ServerExecuteResult failed with error %u", error);
WLog_ERR(TAG, "context.ServerExecuteResult failed with error %"PRIu32"", error);
}
@ -490,7 +490,7 @@ UINT rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp
if ((error = rail_read_server_sysparam_order(s, sysparam)))
{
WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_server_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
@ -498,7 +498,7 @@ UINT rail_recv_server_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp
{
IFCALLRET(context->ServerSystemParam, error, context, sysparam);
if (error)
WLog_ERR(TAG, "context.ServerSystemParam failed with error %u", error);
WLog_ERR(TAG, "context.ServerSystemParam failed with error %"PRIu32"", error);
}
return error;
@ -516,7 +516,7 @@ UINT rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER*
if ((error = rail_read_server_minmaxinfo_order(s, minMaxInfo)))
{
WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_server_minmaxinfo_order failed with error %"PRIu32"!", error);
return error;
}
@ -524,7 +524,7 @@ UINT rail_recv_server_minmaxinfo_order(railPlugin* rail, RAIL_MINMAXINFO_ORDER*
{
IFCALLRET(context->ServerMinMaxInfo, error, context, minMaxInfo);
if (error)
WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %u", error);
WLog_ERR(TAG, "context.ServerMinMaxInfo failed with error %"PRIu32"", error);
}
return error;
@ -542,7 +542,7 @@ UINT rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_O
if ((error = rail_read_server_localmovesize_order(s, localMoveSize)))
{
WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_server_localmovesize_order failed with error %"PRIu32"!", error);
return error;
}
@ -550,7 +550,7 @@ UINT rail_recv_server_localmovesize_order(railPlugin* rail, RAIL_LOCALMOVESIZE_O
{
IFCALLRET(context->ServerLocalMoveSize, error, context, localMoveSize);
if (error)
WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %u", error);
WLog_ERR(TAG, "context.ServerLocalMoveSize failed with error %"PRIu32"", error);
}
return error;
@ -568,7 +568,7 @@ UINT rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP
if ((error = rail_read_server_get_appid_resp_order(s, getAppIdResp)))
{
WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_server_get_appid_resp_order failed with error %"PRIu32"!", error);
return error;
}
@ -576,7 +576,7 @@ UINT rail_recv_server_get_appid_resp_order(railPlugin* rail, RAIL_GET_APPID_RESP
{
IFCALLRET(context->ServerGetAppIdResponse, error, context, getAppIdResp);
if (error)
WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %u", error);
WLog_ERR(TAG, "context.ServerGetAppIdResponse failed with error %"PRIu32"", error);
}
return error;
@ -594,7 +594,7 @@ UINT rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* lan
if ((error = rail_read_langbar_info_order(s, langBarInfo)))
{
WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %u!", error);
WLog_ERR(TAG, "rail_read_langbar_info_order failed with error %"PRIu32"!", error);
return error;
}
@ -602,7 +602,7 @@ UINT rail_recv_langbar_info_order(railPlugin* rail, RAIL_LANGBAR_INFO_ORDER* lan
{
IFCALLRET(context->ServerLanguageBarInfo, error, context, langBarInfo);
if (error)
WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %u", error);
WLog_ERR(TAG, "context.ServerLanguageBarInfo failed with error %"PRIu32"", error);
}
return error;
@ -621,12 +621,12 @@ UINT rail_order_recv(railPlugin* rail, wStream* s)
if ((error = rail_read_pdu_header(s, &orderType, &orderLength)))
{
WLog_ERR(TAG, "rail_read_pdu_header failed with error %u!", error);
WLog_ERR(TAG, "rail_read_pdu_header failed with error %"PRIu32"!", error);
return error;
}
WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%u",
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], (unsigned)orderLength);
WLog_Print(rail->log, WLOG_DEBUG, "Received %s PDU, length:%"PRIu16"",
RAIL_ORDER_TYPE_STRINGS[((orderType & 0xF0) >> 3) + (orderType & 0x0F)], orderLength);
switch (orderType)
{
@ -780,12 +780,12 @@ UINT rail_send_client_exec_order(railPlugin* rail, RAIL_EXEC_ORDER* exec)
if ((error = rail_write_client_exec_order(s, exec)))
{
WLog_ERR(TAG, "rail_write_client_exec_order failed with error %u!", error);
WLog_ERR(TAG, "rail_write_client_exec_order failed with error %"PRIu32"!", error);
return error;
}
if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_EXEC)))
{
WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error);
WLog_ERR(TAG, "rail_send_pdu failed with error %"PRIu32"!", error);
return error;
}
Stream_Free(s, TRUE);
@ -834,13 +834,13 @@ UINT rail_send_client_sysparam_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sysp
if ((error = rail_write_client_sysparam_order(s, sysparam)))
{
WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %u!", error);
WLog_ERR(TAG, "rail_write_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
if ((error = rail_send_pdu(rail, s, RDP_RAIL_ORDER_SYSPARAM)))
{
WLog_ERR(TAG, "rail_send_pdu failed with error %u!", error);
WLog_ERR(TAG, "rail_send_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -862,7 +862,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -872,7 +872,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -882,7 +882,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -892,7 +892,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -902,7 +902,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -912,7 +912,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}
@ -922,7 +922,7 @@ UINT rail_send_client_sysparams_order(railPlugin* rail, RAIL_SYSPARAM_ORDER* sys
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 %u!", error);
WLog_ERR(TAG, "rail_send_client_sysparam_order failed with error %"PRIu32"!", error);
return error;
}
}

View File

@ -252,7 +252,7 @@ LRESULT CALLBACK hotplug_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
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 %u!",
WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %"PRIu32"!",
error);
}
@ -346,7 +346,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
if (rdpdr->hotplug_wnd && !PostMessage(rdpdr->hotplug_wnd, WM_QUIT, 0, 0))
{
error = GetLastError();
WLog_ERR(TAG, "PostMessage failed with error %u", error);
WLog_ERR(TAG, "PostMessage failed with error %"PRIu32"", error);
}
return error;
@ -451,7 +451,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr)
if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids)))
{
WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!",
WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %"PRIu32"!",
error);
goto cleanup;
}
@ -529,7 +529,7 @@ static void drive_hotplug_fsevent_callback(ConstFSEventStreamRef streamRef,
{
if ((error = handle_hotplug(rdpdr)))
{
WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
WLog_ERR(TAG, "handle_hotplug failed with error %"PRIu32"!", error);
}
else
rdpdr_send_device_list_announce_request(rdpdr, TRUE);
@ -545,7 +545,7 @@ void first_hotplug(rdpdrPlugin* rdpdr)
if ((error = handle_hotplug(rdpdr)))
{
WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
WLog_ERR(TAG, "handle_hotplug failed with error %"PRIu32"!", error);
}
}
@ -590,7 +590,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -783,7 +783,7 @@ static UINT handle_hotplug(rdpdrPlugin* rdpdr)
if ((error = rdpdr_send_device_list_remove_request(rdpdr, 1, ids)))
{
WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %u!",
WLog_ERR(TAG, "rdpdr_send_device_list_remove_request failed with error %"PRIu32"!",
error);
goto cleanup;
}
@ -848,7 +848,7 @@ static void first_hotplug(rdpdrPlugin* rdpdr)
if ((error = handle_hotplug(rdpdr)))
{
WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
WLog_ERR(TAG, "handle_hotplug failed with error %"PRIu32"!", error);
}
}
@ -891,7 +891,7 @@ static void* drive_hotplug_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
goto out;
}
@ -903,7 +903,7 @@ static void* drive_hotplug_thread_func(void* arg)
/* file /proc/mounts changed, handle this */
if ((error = handle_hotplug(rdpdr)))
{
WLog_ERR(TAG, "handle_hotplug failed with error %u!", error);
WLog_ERR(TAG, "handle_hotplug failed with error %"PRIu32"!", error);
goto out;
}
else
@ -944,7 +944,7 @@ static UINT drive_hotplug_thread_terminate(rdpdrPlugin* rdpdr)
if (WaitForSingleObject(rdpdr->hotplugThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -1006,7 +1006,7 @@ static UINT rdpdr_process_connect(rdpdrPlugin* rdpdr)
if ((error = devman_load_device_service(rdpdr->devman, device,
rdpdr->rdpcontext)))
{
WLog_ERR(TAG, "devman_load_device_service failed with error %u!", error);
WLog_ERR(TAG, "devman_load_device_service failed with error %"PRIu32"!", error);
return error;
}
}
@ -1191,7 +1191,7 @@ static UINT rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr,
Stream_Write(s, Stream_Buffer(device->data), data_len);
count++;
WLog_INFO(TAG, "registered device #%d: %s (type=%d id=%d)",
WLog_INFO(TAG, "registered device #%"PRIu32": %s (type=%"PRIu32" id=%"PRIu32")",
count, device->name, device->type, device->id);
}
}
@ -1218,14 +1218,14 @@ static UINT rdpdr_process_irp(rdpdrPlugin* rdpdr, wStream* s)
if (!irp)
{
WLog_ERR(TAG, "irp_new failed with %u!", error);
WLog_ERR(TAG, "irp_new failed with %"PRIu32"!", error);
return error;
}
IFCALLRET(irp->device->IRPRequest, error, irp->device, irp);
if (error)
WLog_ERR(TAG, "device->IRPRequest failed with error %u", error);
WLog_ERR(TAG, "device->IRPRequest failed with error %"PRIu32"", error);
return error;
}
@ -1295,19 +1295,19 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
if ((error = rdpdr_send_client_announce_reply(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %u", error);
WLog_ERR(TAG, "rdpdr_send_client_announce_reply failed with error %"PRIu32"", error);
return error;
}
if ((error = rdpdr_send_client_name_request(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %u", error);
WLog_ERR(TAG, "rdpdr_send_client_name_request failed with error %"PRIu32"", error);
return error;
}
if ((error = rdpdr_process_init(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_process_init failed with error %u", error);
WLog_ERR(TAG, "rdpdr_process_init failed with error %"PRIu32"", error);
return error;
}
@ -1319,7 +1319,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
if ((error = rdpdr_send_capability_response(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %u", error);
WLog_ERR(TAG, "rdpdr_send_capability_response failed with error %"PRIu32"", error);
return error;
}
@ -1331,7 +1331,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
if ((error = rdpdr_send_device_list_announce_request(rdpdr, FALSE)))
{
WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %u",
WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %"PRIu32"",
error);
return error;
}
@ -1341,7 +1341,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
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 %u",
WLog_ERR(TAG, "rdpdr_send_device_list_announce_request failed with error %"PRIu32"",
error);
return error;
}
@ -1361,7 +1361,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
case PAKID_CORE_DEVICE_IOREQUEST:
if ((error = rdpdr_process_irp(rdpdr, s)))
{
WLog_ERR(TAG, "rdpdr_process_irp failed with error %u", error);
WLog_ERR(TAG, "rdpdr_process_irp failed with error %"PRIu32"", error);
return error;
}
@ -1369,7 +1369,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
break;
default:
WLog_ERR(TAG, "RDPDR_CTYP_CORE unknown PacketId: 0x%04X", packetId);
WLog_ERR(TAG, "RDPDR_CTYP_CORE unknown PacketId: 0x%04"PRIX16"", packetId);
return ERROR_INVALID_DATA;
break;
}
@ -1387,7 +1387,7 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
Stream_Read_UINT32(s, eventID);
WLog_ERR(TAG,
"Ignoring unhandled message PAKID_PRN_CACHE_DATA (EventID: 0x%04X)", eventID);
"Ignoring unhandled message PAKID_PRN_CACHE_DATA (EventID: 0x%08"PRIX32")", eventID);
}
break;
@ -1396,13 +1396,13 @@ static UINT rdpdr_process_receive(rdpdrPlugin* rdpdr, wStream* s)
break;
default:
WLog_ERR(TAG, "Unknown printing component packetID: 0x%04X", packetId);
WLog_ERR(TAG, "Unknown printing component packetID: 0x%04"PRIX16"", packetId);
return ERROR_INVALID_DATA;
}
}
else
{
WLog_ERR(TAG, "Unknown message: Component: 0x%04X PacketId: 0x%04X", component,
WLog_ERR(TAG, "Unknown message: Component: 0x%04"PRIX16" PacketId: 0x%04"PRIX16"", component,
packetId);
return ERROR_INVALID_DATA;
}
@ -1435,7 +1435,7 @@ UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -1528,7 +1528,7 @@ static VOID VCAPITYPE rdpdr_virtual_channel_open_event_ex(LPVOID lpUserParam, DW
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 %u!", error);
"rdpdr_virtual_channel_event_data_received failed with error %"PRIu32"!", error);
break;
@ -1562,7 +1562,7 @@ static void* rdpdr_virtual_channel_client_thread(void* arg)
if ((error = rdpdr_process_connect(rdpdr)))
{
WLog_ERR(TAG, "rdpdr_process_connect failed with error %u!", error);
WLog_ERR(TAG, "rdpdr_process_connect failed with error %"PRIu32"!", error);
if (rdpdr->rdpcontext)
setChannelError(rdpdr->rdpcontext, error,
@ -1588,7 +1588,7 @@ static void* rdpdr_virtual_channel_client_thread(void* arg)
if ((error = rdpdr_process_receive(rdpdr, data)))
{
WLog_ERR(TAG, "rdpdr_process_receive failed with error %u!", error);
WLog_ERR(TAG, "rdpdr_process_receive failed with error %"PRIu32"!", error);
if (rdpdr->rdpcontext)
setChannelError(rdpdr->rdpcontext, error,
@ -1619,7 +1619,7 @@ static UINT rdpdr_virtual_channel_event_connected(rdpdrPlugin* rdpdr,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -1656,7 +1656,7 @@ static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr)
&& (WaitForSingleObject(rdpdr->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -1667,7 +1667,7 @@ static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr)
if ((error = drive_hotplug_thread_terminate(rdpdr)))
{
WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %u!", error);
WLog_ERR(TAG, "drive_hotplug_thread_terminate failed with error %"PRIu32"!", error);
return error;
}
@ -1675,7 +1675,7 @@ static UINT rdpdr_virtual_channel_event_disconnected(rdpdrPlugin* rdpdr)
if (CHANNEL_RC_OK != error)
{
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08"PRIX32"]",
WTSErrorToString(error), error);
}
@ -1722,14 +1722,14 @@ static VOID VCAPITYPE rdpdr_virtual_channel_init_event_ex(LPVOID lpUserParam, LP
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 %u!",
WLog_ERR(TAG, "rdpdr_virtual_channel_event_connected failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "rdpdr_virtual_channel_event_disconnected failed with error %"PRIu32"!",
error);
break;
@ -1739,7 +1739,7 @@ static VOID VCAPITYPE rdpdr_virtual_channel_init_event_ex(LPVOID lpUserParam, LP
break;
default:
WLog_ERR(TAG, "unknown event %d!", event);
WLog_ERR(TAG, "unknown event %"PRIu32"!", event);
error = ERROR_INVALID_DATA;
break;
}
@ -1788,7 +1788,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID p
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
free(rdpdr);
return FALSE;

View File

@ -123,7 +123,7 @@ static UINT rdpdr_server_receive_announce_response(RdpdrServerContext* context,
Stream_Read_UINT16(s, VersionMinor); /* VersionMinor (2 bytes) */
Stream_Read_UINT32(s, ClientId); /* ClientId (4 bytes) */
WLog_DBG(TAG,
"Client Announce Response: VersionMajor: 0x%04X VersionMinor: 0x%04X ClientId: 0x%04X",
"Client Announce Response: VersionMajor: 0x%08"PRIX16" VersionMinor: 0x%04"PRIX16" ClientId: 0x%08"PRIX32"",
VersionMajor, VersionMinor, ClientId);
context->priv->ClientId = ClientId;
return CHANNEL_RC_OK;
@ -152,7 +152,7 @@ static UINT rdpdr_server_receive_client_name_request(RdpdrServerContext*
if (UnicodeFlag > 1) /* must be 0x00000000 or 0x00000001 */
{
WLog_ERR(TAG, "invalid UnicodeFlag value: 0x%08X", UnicodeFlag);
WLog_ERR(TAG, "invalid UnicodeFlag value: 0x%08"PRIX32"", UnicodeFlag);
return ERROR_INVALID_DATA;
}
@ -165,7 +165,7 @@ static UINT rdpdr_server_receive_client_name_request(RdpdrServerContext*
{
if ((ComputerNameLen % 2) || ComputerNameLen > 512 || ComputerNameLen < 2)
{
WLog_ERR(TAG, "invalid unicode computer name length: %u", ComputerNameLen);
WLog_ERR(TAG, "invalid unicode computer name length: %"PRIu32"", ComputerNameLen);
return ERROR_INVALID_DATA;
}
}
@ -173,7 +173,7 @@ static UINT rdpdr_server_receive_client_name_request(RdpdrServerContext*
{
if (ComputerNameLen > 256 || ComputerNameLen < 1)
{
WLog_ERR(TAG, "invalid ascii computer name length: %u", ComputerNameLen);
WLog_ERR(TAG, "invalid ascii computer name length: %"PRIu32"", ComputerNameLen);
return ERROR_INVALID_DATA;
}
}
@ -565,7 +565,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext*
if ((error = rdpdr_server_write_general_capability_set(context, s)))
{
WLog_ERR(TAG,
"rdpdr_server_write_general_capability_set failed with error %u!", error);
"rdpdr_server_write_general_capability_set failed with error %"PRIu32"!", error);
return error;
}
@ -573,7 +573,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext*
{
if ((error = rdpdr_server_write_drive_capability_set(context, s)))
{
WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_write_drive_capability_set failed with error %"PRIu32"!",
error);
return error;
}
@ -583,7 +583,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext*
{
if ((error = rdpdr_server_write_port_capability_set(context, s)))
{
WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_write_port_capability_set failed with error %"PRIu32"!",
error);
return error;
}
@ -594,7 +594,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext*
if ((error = rdpdr_server_write_printer_capability_set(context, s)))
{
WLog_ERR(TAG,
"rdpdr_server_write_printer_capability_set failed with error %u!", error);
"rdpdr_server_write_printer_capability_set failed with error %"PRIu32"!", error);
return error;
}
}
@ -604,7 +604,7 @@ static UINT rdpdr_server_send_core_capability_request(RdpdrServerContext*
if ((error = rdpdr_server_write_smartcard_capability_set(context, s)))
{
WLog_ERR(TAG,
"rdpdr_server_write_printer_capability_set failed with error %u!", error);
"rdpdr_server_write_printer_capability_set failed with error %"PRIu32"!", error);
return error;
}
}
@ -643,7 +643,7 @@ static UINT rdpdr_server_receive_core_capability_response(
{
if ((status = rdpdr_server_read_capability_set_header(s, &capabilityHeader)))
{
WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_read_capability_set_header failed with error %"PRIu32"!",
status);
return status;
}
@ -654,7 +654,7 @@ static UINT rdpdr_server_receive_core_capability_response(
if ((status = rdpdr_server_read_general_capability_set(context, s,
&capabilityHeader)))
{
WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_read_general_capability_set failed with error %"PRIu32"!",
status);
return status;
}
@ -665,7 +665,7 @@ static UINT rdpdr_server_receive_core_capability_response(
if ((status = rdpdr_server_read_printer_capability_set(context, s,
&capabilityHeader)))
{
WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_read_printer_capability_set failed with error %"PRIu32"!",
status);
return status;
}
@ -676,7 +676,7 @@ static UINT rdpdr_server_receive_core_capability_response(
if ((status = rdpdr_server_read_port_capability_set(context, s,
&capabilityHeader)))
{
WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_read_port_capability_set failed with error %"PRIu32"!",
status);
return status;
}
@ -687,7 +687,7 @@ static UINT rdpdr_server_receive_core_capability_response(
if ((status = rdpdr_server_read_drive_capability_set(context, s,
&capabilityHeader)))
{
WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_read_drive_capability_set failed with error %"PRIu32"!",
status);
return status;
}
@ -699,14 +699,14 @@ static UINT rdpdr_server_receive_core_capability_response(
&capabilityHeader)))
{
WLog_ERR(TAG,
"rdpdr_server_read_smartcard_capability_set failed with error %u!", status);
"rdpdr_server_read_smartcard_capability_set failed with error %"PRIu32"!", status);
return status;
}
break;
default:
WLog_DBG(TAG, "Unknown capabilityType %d", capabilityHeader.CapabilityType);
WLog_DBG(TAG, "Unknown capabilityType %"PRIu16"", capabilityHeader.CapabilityType);
Stream_Seek(s, capabilityHeader.CapabilityLength -
RDPDR_CAPABILITY_HEADER_LENGTH);
return ERROR_INVALID_DATA;
@ -777,7 +777,7 @@ static UINT rdpdr_server_receive_device_list_announce_request(
}
Stream_Read_UINT32(s, DeviceCount); /* DeviceCount (4 bytes) */
WLog_DBG(TAG, "DeviceCount: %d", DeviceCount);
WLog_DBG(TAG, "DeviceCount: %"PRIu32"", DeviceCount);
for (i = 0; i < DeviceCount; i++)
{
@ -801,7 +801,7 @@ static UINT rdpdr_server_receive_device_list_announce_request(
}
DeviceData = Stream_Pointer(s);
WLog_DBG(TAG, "Device %d Name: %s Id: 0x%04X DataLength: %d",
WLog_DBG(TAG, "Device %d Name: %s Id: 0x%08"PRIX32" DataLength: %"PRIu32"",
i, PreferredDosName, DeviceId, DeviceDataLength);
switch (DeviceType)
@ -869,7 +869,7 @@ static UINT rdpdr_server_receive_device_list_remove_request(
}
Stream_Read_UINT32(s, DeviceCount); /* DeviceCount (4 bytes) */
WLog_DBG(TAG, "DeviceCount: %d", DeviceCount);
WLog_DBG(TAG, "DeviceCount: %"PRIu32"", DeviceCount);
for (i = 0; i < DeviceCount; i++)
{
@ -880,7 +880,7 @@ static UINT rdpdr_server_receive_device_list_remove_request(
}
Stream_Read_UINT32(s, DeviceId); /* DeviceId (4 bytes) */
WLog_DBG(TAG, "Device %d Id: 0x%04X", i, DeviceId);
WLog_DBG(TAG, "Device %d Id: 0x%08"PRIX32"", i, DeviceId);
DeviceType = 0; /* TODO: Save the device type on the announce request. */
switch (DeviceType)
@ -949,13 +949,13 @@ static UINT rdpdr_server_receive_device_io_completion(RdpdrServerContext*
Stream_Read_UINT32(s, deviceId);
Stream_Read_UINT32(s, completionId);
Stream_Read_UINT32(s, ioStatus);
WLog_DBG(TAG, "deviceId=%d, completionId=0x%x, ioStatus=0x%x", deviceId,
WLog_DBG(TAG, "deviceId=%"PRIu32", completionId=0x%"PRIx32", ioStatus=0x%"PRIx32"", deviceId,
completionId, ioStatus);
irp = rdpdr_server_dequeue_irp(context, completionId);
if (!irp)
{
WLog_ERR(TAG, "IRP not found for completionId=0x%x", completionId);
WLog_ERR(TAG, "IRP not found for completionId=0x%"PRIx32"", completionId);
return ERROR_INTERNAL_ERROR;
}
@ -1009,7 +1009,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
RDPDR_HEADER* header)
{
UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "RdpdrServerReceivePdu: Component: 0x%04X PacketId: 0x%04X",
WLog_DBG(TAG, "RdpdrServerReceivePdu: Component: 0x%04"PRIX16" PacketId: 0x%04"PRIX16"",
header->Component, header->PacketId);
winpr_HexDump(TAG, WLOG_DEBUG, Stream_Buffer(s), Stream_Length(s));
@ -1020,7 +1020,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
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 %u!",
WLog_ERR(TAG, "rdpdr_server_receive_announce_response failed with error %"PRIu32"!",
error);
return error;
}
@ -1030,7 +1030,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
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 %u!",
WLog_ERR(TAG, "rdpdr_server_receive_client_name_request failed with error %"PRIu32"!",
error);
return error;
}
@ -1038,13 +1038,13 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
if ((error = rdpdr_server_send_core_capability_request(context)))
{
WLog_ERR(TAG,
"rdpdr_server_send_core_capability_request failed with error %u!", error);
"rdpdr_server_send_core_capability_request failed with error %"PRIu32"!", error);
return error;
}
if ((error = rdpdr_server_send_client_id_confirm(context)))
{
WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_send_client_id_confirm failed with error %"PRIu32"!",
error);
return error;
}
@ -1055,14 +1055,14 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
if ((error = rdpdr_server_receive_core_capability_response(context, s, header)))
{
WLog_ERR(TAG,
"rdpdr_server_receive_core_capability_response failed with error %u!", error);
"rdpdr_server_receive_core_capability_response failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpdr_server_send_user_logged_on failed with error %"PRIu32"!", error);
return error;
}
@ -1073,7 +1073,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
header)))
{
WLog_ERR(TAG,
"rdpdr_server_receive_device_list_announce_request failed with error %u!",
"rdpdr_server_receive_device_list_announce_request failed with error %"PRIu32"!",
error);
return error;
}
@ -1090,7 +1090,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
if ((error = rdpdr_server_receive_device_io_completion(context, s, header)))
{
WLog_ERR(TAG,
"rdpdr_server_receive_device_io_completion failed with error %u!", error);
"rdpdr_server_receive_device_io_completion failed with error %"PRIu32"!", error);
return error;
}
@ -1101,7 +1101,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
header)))
{
WLog_ERR(TAG,
"rdpdr_server_receive_device_io_completion failed with error %u!", error);
"rdpdr_server_receive_device_io_completion failed with error %"PRIu32"!", error);
return error;
}
@ -1127,7 +1127,7 @@ static UINT rdpdr_server_receive_pdu(RdpdrServerContext* context, wStream* s,
}
else
{
WLog_WARN(TAG, "Unknown RDPDR_HEADER.Component: 0x%04X", header->Component);
WLog_WARN(TAG, "Unknown RDPDR_HEADER.Component: 0x%04"PRIX16"", header->Component);
return ERROR_INVALID_DATA;
}
@ -1176,7 +1176,7 @@ static void* rdpdr_server_thread(void* arg)
if ((error = rdpdr_server_send_announce_request(context)))
{
WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %u!",
WLog_ERR(TAG, "rdpdr_server_send_announce_request failed with error %"PRIu32"!",
error);
goto out_stream;
}
@ -1189,7 +1189,7 @@ static void* rdpdr_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
goto out_stream;
}
@ -1198,7 +1198,7 @@ static void* rdpdr_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
goto out_stream;
}
@ -1226,7 +1226,7 @@ static void* rdpdr_server_thread(void* arg)
if ((error = rdpdr_server_receive_pdu(context, s, &header)))
{
WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpdr_server_receive_pdu failed with error %"PRIu32"!", error);
goto out_stream;
}
}
@ -1295,7 +1295,7 @@ static UINT rdpdr_server_stop(RdpdrServerContext* context)
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -1384,7 +1384,7 @@ static UINT rdpdr_server_send_device_create_request(
BOOL status;
wStream* s;
WLog_DBG(TAG,
"RdpdrServerSendDeviceCreateRequest: deviceId=%d, path=%s, desiredAccess=0x%x createOptions=0x%x createDisposition=0x%x",
"RdpdrServerSendDeviceCreateRequest: deviceId=%"PRIu32", path=%s, desiredAccess=0x%"PRIx32" createOptions=0x%"PRIx32" createDisposition=0x%"PRIx32"",
deviceId, path, desiredAccess, createOptions, createDisposition);
/* Compute the required Unicode size. */
pathLength = (strlen(path) + 1) * sizeof(WCHAR);
@ -1431,7 +1431,7 @@ static UINT rdpdr_server_send_device_close_request(
ULONG written;
BOOL status;
wStream* s;
WLog_DBG(TAG, "RdpdrServerSendDeviceCloseRequest: deviceId=%d, fileId=%d",
WLog_DBG(TAG, "RdpdrServerSendDeviceCloseRequest: deviceId=%"PRIu32", fileId=%"PRIu32"",
deviceId, fileId);
s = Stream_New(NULL, 128);
@ -1468,7 +1468,7 @@ static UINT rdpdr_server_send_device_read_request(
BOOL status;
wStream* s;
WLog_DBG(TAG,
"RdpdrServerSendDeviceReadRequest: deviceId=%d, fileId=%d, length=%d, offset=%d",
"RdpdrServerSendDeviceReadRequest: deviceId=%"PRIu32", fileId=%"PRIu32", length=%"PRIu32", offset=%"PRIu32"",
deviceId, fileId, length, offset);
s = Stream_New(NULL, 128);
@ -1509,7 +1509,7 @@ static UINT rdpdr_server_send_device_write_request(
BOOL status;
wStream* s;
WLog_DBG(TAG,
"RdpdrServerSendDeviceWriteRequest: deviceId=%d, fileId=%d, length=%d, offset=%d",
"RdpdrServerSendDeviceWriteRequest: deviceId=%"PRIu32", fileId=%"PRIu32", length=%"PRIu32", offset=%"PRIu32"",
deviceId, fileId, length, offset);
s = Stream_New(NULL, 64 + length);
@ -1550,7 +1550,7 @@ static UINT rdpdr_server_send_device_query_directory_request(
BOOL status;
wStream* s;
WLog_DBG(TAG,
"RdpdrServerSendDeviceQueryDirectoryRequest: deviceId=%d, fileId=%d, path=%s",
"RdpdrServerSendDeviceQueryDirectoryRequest: deviceId=%"PRIu32", fileId=%"PRIu32", path=%s",
deviceId, fileId, path);
/* Compute the required Unicode size. */
pathLength = path ? (strlen(path) + 1) * sizeof(WCHAR) : 0;
@ -1602,7 +1602,7 @@ static UINT rdpdr_server_send_device_file_rename_request(
BOOL status;
wStream* s;
WLog_DBG(TAG,
"RdpdrServerSendDeviceFileNameRequest: deviceId=%d, fileId=%d, path=%s",
"RdpdrServerSendDeviceFileNameRequest: deviceId=%"PRIu32", fileId=%"PRIu32", path=%s",
deviceId, fileId, path);
/* Compute the required Unicode size. */
pathLength = path ? (strlen(path) + 1) * sizeof(WCHAR) : 0;
@ -1665,7 +1665,7 @@ static UINT rdpdr_server_drive_create_directory_callback2(
UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG,
"RdpdrServerDriveCreateDirectoryCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveCreateDirectoryCallback2: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
/* Invoke the create directory completion routine. */
context->OnDriveCreateDirectoryComplete(context, irp->CallbackData, ioStatus);
@ -1686,7 +1686,7 @@ static UINT rdpdr_server_drive_create_directory_callback1(
UINT32 fileId;
UINT8 information;
WLog_DBG(TAG,
"RdpdrServerDriveCreateDirectoryCallback1: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveCreateDirectoryCallback1: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (ioStatus != STATUS_SUCCESS)
@ -1776,7 +1776,7 @@ static UINT rdpdr_server_drive_delete_directory_callback2(
UINT32 completionId, UINT32 ioStatus)
{
WLog_DBG(TAG,
"RdpdrServerDriveDeleteDirectoryCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveDeleteDirectoryCallback2: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
/* Invoke the delete directory completion routine. */
context->OnDriveDeleteDirectoryComplete(context, irp->CallbackData, ioStatus);
@ -1797,7 +1797,7 @@ static UINT rdpdr_server_drive_delete_directory_callback1(
UINT32 fileId;
UINT8 information;
WLog_DBG(TAG,
"RdpdrServerDriveDeleteDirectoryCallback1: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveDeleteDirectoryCallback1: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (ioStatus != STATUS_SUCCESS)
@ -1890,7 +1890,7 @@ static UINT rdpdr_server_drive_query_directory_callback2(
UINT32 length;
FILE_DIRECTORY_INFORMATION fdi;
WLog_DBG(TAG,
"RdpdrServerDriveQueryDirectoryCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveQueryDirectoryCallback2: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (Stream_GetRemainingLength(s) < 4)
@ -1906,7 +1906,7 @@ static UINT rdpdr_server_drive_query_directory_callback2(
if ((error = rdpdr_server_read_file_directory_information(s, &fdi)))
{
WLog_ERR(TAG,
"rdpdr_server_read_file_directory_information failed with error %u!", error);
"rdpdr_server_read_file_directory_information failed with error %"PRIu32"!", error);
return error;
}
}
@ -1964,7 +1964,7 @@ static UINT rdpdr_server_drive_query_directory_callback1(
{
UINT32 fileId;
WLog_DBG(TAG,
"RdpdrServerDriveQueryDirectoryCallback1: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveQueryDirectoryCallback1: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (ioStatus != STATUS_SUCCESS)
@ -2057,7 +2057,7 @@ static UINT rdpdr_server_drive_open_file_callback(RdpdrServerContext* context,
UINT32 fileId;
UINT8 information;
WLog_DBG(TAG,
"RdpdrServerDriveOpenFileCallback: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveOpenFileCallback: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (Stream_GetRemainingLength(s) < 5)
@ -2130,7 +2130,7 @@ static UINT rdpdr_server_drive_read_file_callback(RdpdrServerContext* context,
UINT32 length;
char* buffer = NULL;
WLog_DBG(TAG,
"RdpdrServerDriveReadFileCallback: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveReadFileCallback: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (Stream_GetRemainingLength(s) < 4)
@ -2212,7 +2212,7 @@ static UINT rdpdr_server_drive_write_file_callback(RdpdrServerContext* context,
{
UINT32 length;
WLog_DBG(TAG,
"RdpdrServerDriveWriteFileCallback: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveWriteFileCallback: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (Stream_GetRemainingLength(s) < 5)
@ -2287,7 +2287,7 @@ static UINT rdpdr_server_drive_close_file_callback(RdpdrServerContext* context,
UINT32 ioStatus)
{
WLog_DBG(TAG,
"RdpdrServerDriveCloseFileCallback: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveCloseFileCallback: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
/* Invoke the close file completion routine. */
context->OnDriveCloseFileComplete(context, irp->CallbackData, ioStatus);
@ -2345,7 +2345,7 @@ static UINT rdpdr_server_drive_delete_file_callback2(RdpdrServerContext*
UINT32 ioStatus)
{
WLog_DBG(TAG,
"RdpdrServerDriveDeleteFileCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveDeleteFileCallback2: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
/* Invoke the delete file completion routine. */
context->OnDriveDeleteFileComplete(context, irp->CallbackData, ioStatus);
@ -2366,7 +2366,7 @@ static UINT rdpdr_server_drive_delete_file_callback1(RdpdrServerContext*
UINT32 fileId;
UINT8 information;
WLog_DBG(TAG,
"RdpdrServerDriveDeleteFileCallback1: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveDeleteFileCallback1: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (ioStatus != STATUS_SUCCESS)
@ -2456,7 +2456,7 @@ static UINT rdpdr_server_drive_rename_file_callback3(RdpdrServerContext*
UINT32 ioStatus)
{
WLog_DBG(TAG,
"RdpdrServerDriveRenameFileCallback3: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveRenameFileCallback3: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
/* Destroy the IRP. */
rdpdr_server_irp_free(irp);
@ -2474,7 +2474,7 @@ static UINT rdpdr_server_drive_rename_file_callback2(RdpdrServerContext*
{
UINT32 length;
WLog_DBG(TAG,
"RdpdrServerDriveRenameFileCallback2: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveRenameFileCallback2: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (Stream_GetRemainingLength(s) < 5)
@ -2516,7 +2516,7 @@ static UINT rdpdr_server_drive_rename_file_callback1(RdpdrServerContext*
UINT32 fileId;
UINT8 information;
WLog_DBG(TAG,
"RdpdrServerDriveRenameFileCallback1: deviceId=%d, completionId=%d, ioStatus=0x%x",
"RdpdrServerDriveRenameFileCallback1: deviceId=%"PRIu32", completionId=%"PRIu32", ioStatus=0x%"PRIx32"",
deviceId, completionId, ioStatus);
if (ioStatus != STATUS_SUCCESS)

View File

@ -196,7 +196,7 @@ static void* rdpei_schedule_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -207,7 +207,7 @@ static void* rdpei_schedule_thread(void* arg)
if ((error = rdpei_add_frame(context)))
{
WLog_ERR(TAG, "rdpei_add_frame failed with error %u!", error);
WLog_ERR(TAG, "rdpei_add_frame failed with error %"PRIu32"!", error);
break;
}
@ -215,7 +215,7 @@ static void* rdpei_schedule_thread(void* arg)
{
if ((error = rdpei_send_frame(context)))
{
WLog_ERR(TAG, "rdpei_send_frame failed with error %u!", error);
WLog_ERR(TAG, "rdpei_send_frame failed with error %"PRIu32"!", error);
break;
}
}
@ -252,7 +252,7 @@ UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s,
status = callback->channel->Write(callback->channel, (UINT32) Stream_Length(s),
Stream_Buffer(s), NULL);
#ifdef WITH_DEBUG_RDPEI
WLog_DBG(TAG, "rdpei_send_pdu: eventId: %d (%s) length: %d status: %d",
WLog_DBG(TAG, "rdpei_send_pdu: eventId: %"PRIu16" (%s) length: %"PRIu32" status: %"PRIu32"",
eventId, RDPEI_EVENTID_STRINGS[eventId], pduLength, status);
#endif
return status;
@ -325,8 +325,8 @@ UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
int rectSize = 2;
RDPINPUT_CONTACT_DATA* contact;
#ifdef WITH_DEBUG_RDPEI
WLog_DBG(TAG, "contactCount: %d", frame->contactCount);
WLog_DBG(TAG, "frameOffset: 0x%08X", (UINT32) frame->frameOffset);
WLog_DBG(TAG, "contactCount: %"PRIu32"", frame->contactCount);
WLog_DBG(TAG, "frameOffset: 0x%016"PRIX64"", frame->frameOffset);
#endif
rdpei_write_2byte_unsigned(s,
frame->contactCount); /* contactCount (TWO_BYTE_UNSIGNED_INTEGER) */
@ -352,11 +352,11 @@ UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
contact->contactRectRight = contact->x + rectSize;
contact->contactRectBottom = contact->y + rectSize;
#ifdef WITH_DEBUG_RDPEI
WLog_DBG(TAG, "contact[%d].contactId: %d", index, contact->contactId);
WLog_DBG(TAG, "contact[%d].fieldsPresent: %d", index, contact->fieldsPresent);
WLog_DBG(TAG, "contact[%d].x: %d", index, contact->x);
WLog_DBG(TAG, "contact[%d].y: %d", index, contact->y);
WLog_DBG(TAG, "contact[%d].contactFlags: 0x%04X", index, contact->contactFlags);
WLog_DBG(TAG, "contact[%"PRIu32"].contactId: %"PRIu32"", index, contact->contactId);
WLog_DBG(TAG, "contact[%"PRIu32"].fieldsPresent: %"PRIu32"", index, contact->fieldsPresent);
WLog_DBG(TAG, "contact[%"PRIu32"].x: %"PRId32"", index, contact->x);
WLog_DBG(TAG, "contact[%"PRIu32"].y: %"PRId32"", index, contact->y);
WLog_DBG(TAG, "contact[%"PRIu32"].contactFlags: 0x%08"PRIX32"", index, contact->contactFlags);
rdpei_print_contact_flags(contact->contactFlags);
#endif
Stream_Write_UINT8(s, contact->contactId); /* contactId (1 byte) */
@ -426,7 +426,7 @@ UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback,
if ((status = rdpei_write_touch_frame(s, frame)))
{
WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %u!", status);
WLog_ERR(TAG, "rdpei_write_touch_frame failed with error %"PRIu32"!", status);
Stream_Free(s, TRUE);
return status;
}
@ -451,7 +451,7 @@ UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
if (protocolVersion != RDPINPUT_PROTOCOL_V10)
{
WLog_ERR(TAG, "Unknown [MS-RDPEI] protocolVersion: 0x%08X", protocolVersion);
WLog_ERR(TAG, "Unknown [MS-RDPEI] protocolVersion: 0x%08"PRIX32"", protocolVersion);
return -1;
}
@ -471,7 +471,7 @@ UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
IFCALLRET(rdpei->SuspendTouch, error, rdpei);
if (error)
WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %u!", error);
WLog_ERR(TAG, "rdpei->SuspendTouch failed with error %"PRIu32"!", error);
return error;
}
@ -488,7 +488,7 @@ UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
IFCALLRET(rdpei->ResumeTouch, error, rdpei);
if (error)
WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %u!", error);
WLog_ERR(TAG, "rdpei->ResumeTouch failed with error %"PRIu32"!", error);
return error;
}
@ -506,7 +506,7 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
Stream_Read_UINT16(s, eventId); /* eventId (2 bytes) */
Stream_Read_UINT32(s, pduLength); /* pduLength (4 bytes) */
#ifdef WITH_DEBUG_RDPEI
WLog_DBG(TAG, "rdpei_recv_pdu: eventId: %d (%s) length: %d",
WLog_DBG(TAG, "rdpei_recv_pdu: eventId: %"PRIu16" (%s) length: %"PRIu32"",
eventId, RDPEI_EVENTID_STRINGS[eventId], pduLength);
#endif
@ -515,13 +515,13 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
case EVENTID_SC_READY:
if ((error = rdpei_recv_sc_ready_pdu(callback, s)))
{
WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpei_recv_sc_ready_pdu failed with error %"PRIu32"!", error);
return error;
}
if ((error = rdpei_send_cs_ready_pdu(callback)))
{
WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpei_send_cs_ready_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -530,7 +530,7 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
case EVENTID_SUSPEND_TOUCH:
if ((error = rdpei_recv_suspend_touch_pdu(callback, s)))
{
WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpei_recv_suspend_touch_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -539,7 +539,7 @@ UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
case EVENTID_RESUME_TOUCH:
if ((error = rdpei_recv_resume_touch_pdu(callback, s)))
{
WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpei_recv_resume_touch_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -634,7 +634,7 @@ static UINT rdpei_plugin_initialize(IWTSPlugin* pPlugin,
if ((error = pChannelMgr->CreateListener(pChannelMgr, RDPEI_DVC_CHANNEL_NAME, 0,
(IWTSListenerCallback*) rdpei->listener_callback, &(rdpei->listener))))
{
WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %u!", error);
WLog_ERR(TAG, "ChannelMgr->CreateListener failed with error %"PRIu32"!", error);
goto error_out;
}
@ -687,7 +687,7 @@ static UINT rdpei_plugin_terminated(IWTSPlugin* pPlugin)
if (WaitForSingleObject(rdpei->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -737,7 +737,7 @@ UINT rdpei_send_frame(RdpeiClientContext* context)
if ((error = rdpei_send_touch_event_pdu(callback, &rdpei->frame)))
{
WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpei_send_touch_event_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -901,7 +901,7 @@ UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y,
{
if ((error = context->TouchUpdate(context, externalId, x, y, &tempvalue)))
{
WLog_ERR(TAG, "context->TouchUpdate failed with error %u!", error);
WLog_ERR(TAG, "context->TouchUpdate failed with error %"PRIu32"!", error);
return error;
}
}
@ -913,7 +913,7 @@ UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y,
if ((error = context->AddContact(context, &contact)))
{
WLog_ERR(TAG, "context->AddContact failed with error %u!", error);
WLog_ERR(TAG, "context->AddContact failed with error %"PRIu32"!", error);
return error;
}
@ -998,7 +998,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
if ((error = pEntryPoints->RegisterPlugin(pEntryPoints, "rdpei",
(IWTSPlugin*) rdpei)))
{
WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %u!", error);
WLog_ERR(TAG, "EntryPoints->RegisterPlugin failed with error %"PRIu32"!", error);
error = CHANNEL_RC_NO_MEMORY;
goto error_out;
}

View File

@ -112,7 +112,7 @@ UINT rdpei_server_init(RdpeiServerContext *context)
if (!WTSVirtualChannelQuery(priv->channelHandle, WTSVirtualEventHandle, &buffer, &bytesReturned) || (bytesReturned != sizeof(HANDLE)))
{
WLog_ERR(TAG, "WTSVirtualChannelQuery failed or invalid invalid returned size(%d)!", bytesReturned);
WLog_ERR(TAG, "WTSVirtualChannelQuery failed or invalid invalid returned size(%"PRIu32")!", bytesReturned);
if (buffer)
WTSFreeMemory(buffer);
goto out_close;
@ -179,13 +179,13 @@ static UINT read_cs_ready_message(RdpeiServerContext *context, wStream *s)
case RDPINPUT_PROTOCOL_V101:
break;
default:
WLog_ERR(TAG, "unhandled RPDEI protocol version 0x%x", context->clientVersion);
WLog_ERR(TAG, "unhandled RPDEI protocol version 0x%"PRIx32"", context->clientVersion);
break;
}
IFCALLRET(context->onClientReady, error, context);
if (error)
WLog_ERR(TAG, "context->onClientReady failed with error %u", error);
WLog_ERR(TAG, "context->onClientReady failed with error %"PRIu32"", error);
return error;
}
@ -271,7 +271,7 @@ static UINT read_touch_frame(RdpeiServerContext *context, wStream *s, RDPINPUT_T
{
if ((error = read_touch_contact_data(context, s, contact)))
{
WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error);
WLog_ERR(TAG, "read_touch_contact_data failed with error %"PRIu32"!", error);
frame->contactCount = i;
touch_frame_reset(frame);
return error;
@ -311,7 +311,7 @@ static UINT read_touch_event(RdpeiServerContext *context, wStream *s)
{
if ((error = read_touch_frame(context, s, frame)))
{
WLog_ERR(TAG, "read_touch_contact_data failed with error %u!", error);
WLog_ERR(TAG, "read_touch_contact_data failed with error %"PRIu32"!", error);
event->frameCount = i;
goto out_cleanup;
}
@ -320,7 +320,7 @@ static UINT read_touch_event(RdpeiServerContext *context, wStream *s)
IFCALLRET(context->onTouchEvent, error, context, event);
if (error)
WLog_ERR(TAG, "context->onTouchEvent failed with error %u", error);
WLog_ERR(TAG, "context->onTouchEvent failed with error %"PRIu32"", error);
out_cleanup:
touch_event_reset(event);
@ -347,7 +347,7 @@ static UINT read_dismiss_hovering_contact(RdpeiServerContext *context, wStream *
IFCALLRET(context->onTouchReleased, error, context, contactId);
if (error)
WLog_ERR(TAG, "context->onTouchReleased failed with error %u", error);
WLog_ERR(TAG, "context->onTouchReleased failed with error %"PRIu32"", error);
return error;
}
@ -391,7 +391,7 @@ UINT rdpei_server_handle_messages(RdpeiServerContext *context) {
if (pduLen < RDPINPUT_HEADER_LENGTH)
{
WLog_ERR(TAG, "invalid pduLength %d", pduLen);
WLog_ERR(TAG, "invalid pduLength %"PRIu32"", pduLen);
return ERROR_INVALID_DATA;
}
priv->expectedBytes = pduLen - RDPINPUT_HEADER_LENGTH;
@ -414,13 +414,13 @@ UINT rdpei_server_handle_messages(RdpeiServerContext *context) {
case EVENTID_CS_READY:
if (priv->automataState != STATE_WAITING_CLIENT_READY)
{
WLog_ERR(TAG, "not expecting a CS_READY packet in this state(%d)", (int)priv->automataState);
WLog_ERR(TAG, "not expecting a CS_READY packet in this state(%d)", priv->automataState);
return ERROR_INVALID_STATE;
}
if ((error = read_cs_ready_message(context, s)))
{
WLog_ERR(TAG, "read_cs_ready_message failed with error %u", error);
WLog_ERR(TAG, "read_cs_ready_message failed with error %"PRIu32"", error);
return error;
}
break;
@ -428,19 +428,19 @@ UINT rdpei_server_handle_messages(RdpeiServerContext *context) {
case EVENTID_TOUCH:
if ((error = read_touch_event(context, s)))
{
WLog_ERR(TAG, "read_touch_event failed with error %u", error);
WLog_ERR(TAG, "read_touch_event failed with error %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "read_dismiss_hovering_contact failed with error %"PRIu32"", error);
return error;
}
break;
default:
WLog_ERR(TAG, "unexpected message type 0x%x", priv->currentMsgType);
WLog_ERR(TAG, "unexpected message type 0x%"PRIx16"", priv->currentMsgType);
}
Stream_SetPosition(s, 0);
@ -462,7 +462,7 @@ UINT rdpei_server_send_sc_ready(RdpeiServerContext *context, UINT32 version)
if (priv->automataState != STATE_INITIAL)
{
WLog_ERR(TAG, "called from unexpected state %d", (int)priv->automataState);
WLog_ERR(TAG, "called from unexpected state %d", priv->automataState);
return ERROR_INVALID_STATE;
}
@ -507,7 +507,7 @@ UINT rdpei_server_suspend(RdpeiServerContext *context)
case STATE_WAITING_FRAME:
break;
default:
WLog_ERR(TAG, "called from unexpected state %d", (int)priv->automataState);
WLog_ERR(TAG, "called from unexpected state %d", priv->automataState);
return ERROR_INVALID_STATE;
}
@ -551,7 +551,7 @@ UINT rdpei_server_resume(RdpeiServerContext *context)
case STATE_SUSPENDED:
break;
default:
WLog_ERR(TAG, "called from unexpected state %d", (int)priv->automataState);
WLog_ERR(TAG, "called from unexpected state %d", priv->automataState);
return ERROR_INVALID_STATE;
}

View File

@ -81,17 +81,17 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s,
goto error_out;
}
WLog_DBG(TAG, "H264_METABLOCK: numRegionRects: %d", (int) meta->numRegionRects);
WLog_DBG(TAG, "H264_METABLOCK: numRegionRects: %"PRIu32"", meta->numRegionRects);
for (index = 0; index < meta->numRegionRects; index++)
{
regionRect = &(meta->regionRects[index]);
if ((error = rdpgfx_read_rect16(s, regionRect)))
{
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %"PRIu32"!", error);
goto error_out;
}
WLog_DBG(TAG, "regionRects[%d]: left: %d top: %d right: %d bottom: %d",
WLog_DBG(TAG, "regionRects[%"PRIu32"]: left: %"PRIu16" top: %"PRIu16" right: %"PRIu16" bottom: %"PRIu16"",
index, regionRect->left, regionRect->top, regionRect->right, regionRect->bottom);
}
@ -111,7 +111,7 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s,
quantQualityVal->qp = quantQualityVal->qpVal & 0x3F;
quantQualityVal->r = (quantQualityVal->qpVal >> 6) & 1;
quantQualityVal->p = (quantQualityVal->qpVal >> 7) & 1;
WLog_DBG(TAG, "quantQualityVals[%d]: qp: %d r: %d p: %d qualityVal: %d",
WLog_DBG(TAG, "quantQualityVals[%"PRIu32"]: qp: %"PRIu8" r: %"PRIu8" p: %"PRIu8" qualityVal: %"PRIu8"",
index, quantQualityVal->qp, quantQualityVal->r, quantQualityVal->p, quantQualityVal->qualityVal);
}
@ -146,7 +146,7 @@ static UINT rdpgfx_decode_AVC420(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.meta))))
{
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %"PRIu32"!", error);
return error;
}
@ -161,7 +161,7 @@ static UINT rdpgfx_decode_AVC420(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceCommand failed with error %"PRIu32"", error);
}
free(h264.meta.regionRects);
@ -205,7 +205,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
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 %u!", error);
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %"PRIu32"!", error);
return error;
}
pos2 = Stream_GetPosition(s);
@ -223,7 +223,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
if ((error = rdpgfx_read_h264_metablock(gfx, s, &(h264.bitstream[1].meta))))
{
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_h264_metablock failed with error %"PRIu32"!", error);
return error;
}
@ -244,7 +244,7 @@ static UINT rdpgfx_decode_AVC444(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceCommand failed with error %"PRIu32"", error);
}
free(h264.bitstream[0].meta.regionRects);
@ -270,7 +270,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
case RDPGFX_CODECID_AVC420:
if ((error = rdpgfx_decode_AVC420(gfx, cmd)))
{
WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_decode_AVC420 failed with error %"PRIu32"", error);
return error;
}
break;
@ -278,7 +278,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
case RDPGFX_CODECID_AVC444:
if ((error = rdpgfx_decode_AVC444(gfx, cmd)))
{
WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_decode_AVC444 failed with error %"PRIu32"", error);
return error;
}
break;
@ -288,7 +288,7 @@ UINT rdpgfx_decode(RDPGFX_PLUGIN* gfx, RDPGFX_SURFACE_COMMAND* cmd)
{
IFCALLRET(context->SurfaceCommand, error, context, cmd);
if (error)
WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceCommand failed with error %"PRIu32"", error);
}
break;
}

View File

@ -108,7 +108,7 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
header.pduLength = RDPGFX_HEADER_SIZE + 2 + (pdu.capsSetCount *
RDPGFX_CAPSET_SIZE);
WLog_DBG(TAG, "SendCapsAdvertisePdu %d", pdu.capsSetCount);
WLog_DBG(TAG, "SendCapsAdvertisePdu %"PRIu16"", pdu.capsSetCount);
s = Stream_New(NULL, header.pduLength);
if (!s)
@ -119,7 +119,7 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback)
if ((error = rdpgfx_write_header(s, &header)))
{
WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_header failed with error %"PRIu32"!", error);
return error;
}
@ -163,7 +163,7 @@ static UINT rdpgfx_recv_caps_confirm_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
Stream_Read_UINT32(s, capsSet.version); /* version (4 bytes) */
Stream_Read_UINT32(s, capsDataLength); /* capsDataLength (4 bytes) */
Stream_Read_UINT32(s, capsSet.flags); /* capsData (4 bytes) */
WLog_DBG(TAG, "RecvCapsConfirmPdu: version: 0x%04X flags: 0x%04X",
WLog_DBG(TAG, "RecvCapsConfirmPdu: version: 0x%08"PRIX32" flags: 0x%08"PRIX32"",
capsSet.version, capsSet.flags);
return CHANNEL_RC_OK;
}
@ -182,7 +182,7 @@ static UINT rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
header.flags = 0;
header.cmdId = RDPGFX_CMDID_FRAMEACKNOWLEDGE;
header.pduLength = RDPGFX_HEADER_SIZE + 12;
WLog_DBG(TAG, "SendFrameAcknowledgePdu: %d", pdu->frameId);
WLog_DBG(TAG, "SendFrameAcknowledgePdu: %"PRIu32"", pdu->frameId);
s = Stream_New(NULL, header.pduLength);
if (!s)
@ -193,7 +193,7 @@ static UINT rdpgfx_send_frame_acknowledge_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if ((error = rdpgfx_write_header(s, &header)))
{
WLog_ERR(TAG, "rdpgfx_write_header failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_header failed with error %"PRIu32"!", error);
return error;
}
@ -269,7 +269,7 @@ static UINT rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
}
Stream_Seek(s, pad); /* pad (total size is 340 bytes) */
WLog_DBG(TAG, "RecvResetGraphicsPdu: width: %d height: %d count: %d",
WLog_DBG(TAG, "RecvResetGraphicsPdu: width: %"PRIu32" height: %"PRIu32" count: %"PRIu32"",
pdu.width, pdu.height, pdu.monitorCount);
if (context)
@ -277,7 +277,7 @@ static UINT rdpgfx_recv_reset_graphics_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
IFCALLRET(context->ResetGraphics, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->ResetGraphics failed with error %u", error);
WLog_ERR(TAG, "context->ResetGraphics failed with error %"PRIu32"", error);
}
free(pdu.monitorDefArray);
@ -304,14 +304,14 @@ static UINT rdpgfx_recv_evict_cache_entry_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
}
Stream_Read_UINT16(s, pdu.cacheSlot); /* cacheSlot (2 bytes) */
WLog_DBG(TAG, "RecvEvictCacheEntryPdu: cacheSlot: %d", pdu.cacheSlot);
WLog_DBG(TAG, "RecvEvictCacheEntryPdu: cacheSlot: %"PRIu16"", pdu.cacheSlot);
if (context)
{
IFCALLRET(context->EvictCacheEntry, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error);
WLog_ERR(TAG, "context->EvictCacheEntry failed with error %"PRIu32"", error);
}
return error;
@ -358,7 +358,7 @@ static UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback
Stream_Read_UINT16(s, pdu.cacheSlots[index]); /* cacheSlot (2 bytes) */
}
WLog_DBG(TAG, "RecvCacheImportReplyPdu: importedEntriesCount: %d",
WLog_DBG(TAG, "RecvCacheImportReplyPdu: importedEntriesCount: %"PRIu16"",
pdu.importedEntriesCount);
if (context)
@ -366,7 +366,7 @@ static UINT rdpgfx_recv_cache_import_reply_pdu(RDPGFX_CHANNEL_CALLBACK* callback
IFCALLRET(context->CacheImportReply, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->CacheImportReply failed with error %u", error);
WLog_ERR(TAG, "context->CacheImportReply failed with error %"PRIu32"", error);
}
free(pdu.cacheSlots);
@ -397,7 +397,7 @@ static UINT rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
Stream_Read_UINT16(s, pdu.height); /* height (2 bytes) */
Stream_Read_UINT8(s, pdu.pixelFormat); /* RDPGFX_PIXELFORMAT (1 byte) */
WLog_DBG(TAG,
"RecvCreateSurfacePdu: surfaceId: %d width: %d height: %d pixelFormat: 0x%02X",
"RecvCreateSurfacePdu: surfaceId: %"PRIu16" width: %"PRIu16" height: %"PRIu16" pixelFormat: 0x%02"PRIX8"",
pdu.surfaceId, pdu.width, pdu.height, pdu.pixelFormat);
if (context)
@ -405,7 +405,7 @@ static UINT rdpgfx_recv_create_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
IFCALLRET(context->CreateSurface, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->CreateSurface failed with error %u", error);
WLog_ERR(TAG, "context->CreateSurface failed with error %"PRIu32"", error);
}
return error;
@ -431,14 +431,14 @@ static UINT rdpgfx_recv_delete_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
}
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
WLog_DBG(TAG, "RecvDeleteSurfacePdu: surfaceId: %d", pdu.surfaceId);
WLog_DBG(TAG, "RecvDeleteSurfacePdu: surfaceId: %"PRIu16"", pdu.surfaceId);
if (context)
{
IFCALLRET(context->DeleteSurface, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error);
WLog_ERR(TAG, "context->DeleteSurface failed with error %"PRIu32"", error);
}
return error;
@ -465,7 +465,7 @@ static UINT rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
Stream_Read_UINT32(s, pdu.timestamp); /* timestamp (4 bytes) */
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
WLog_DBG(TAG, "RecvStartFramePdu: frameId: %d timestamp: 0x%04X",
WLog_DBG(TAG, "RecvStartFramePdu: frameId: %"PRIu32" timestamp: 0x%08"PRIX32"",
pdu.frameId, pdu.timestamp);
if (context)
@ -473,7 +473,7 @@ static UINT rdpgfx_recv_start_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
IFCALLRET(context->StartFrame, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->StartFrame failed with error %u", error);
WLog_ERR(TAG, "context->StartFrame failed with error %"PRIu32"", error);
}
gfx->UnacknowledgedFrames++;
@ -501,7 +501,7 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
}
Stream_Read_UINT32(s, pdu.frameId); /* frameId (4 bytes) */
WLog_DBG(TAG, "RecvEndFramePdu: frameId: %lu", (unsigned long) pdu.frameId);
WLog_DBG(TAG, "RecvEndFramePdu: frameId: %"PRIu32"", pdu.frameId);
if (context)
{
@ -509,7 +509,7 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if (error)
{
WLog_ERR(TAG, "context->EndFrame failed with error %u", error);
WLog_ERR(TAG, "context->EndFrame failed with error %"PRIu32"", error);
return error;
}
}
@ -525,14 +525,14 @@ static UINT rdpgfx_recv_end_frame_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if (gfx->TotalDecodedFrames == 1)
if ((error = rdpgfx_send_frame_acknowledge_pdu(callback, &ack)))
WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"", 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 %u", error);
WLog_ERR(TAG, "rdpgfx_send_frame_acknowledge_pdu failed with error %"PRIu32"", error);
}
return error;
@ -563,7 +563,7 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if ((error = rdpgfx_read_rect16(s, &(pdu.destRect)))) /* destRect (8 bytes) */
{
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %"PRIu32"", error);
return error;
}
@ -578,13 +578,14 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
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",
(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);
"RecvWireToSurface1Pdu: surfaceId: %"PRIu16" codecId: %s (0x%04"PRIX16") pixelFormat: 0x%02"PRIX8" "
"destRect: left: %"PRIu16" top: %"PRIu16" right: %"PRIu16" bottom: %"PRIu16" bitmapDataLength: %"PRIu32"",
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);
cmd.surfaceId = pdu.surfaceId;
cmd.codecId = pdu.codecId;
cmd.contextId = 0;
@ -611,9 +612,10 @@ static UINT rdpgfx_recv_wire_to_surface_1_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
cmd.height = cmd.bottom - cmd.top;
cmd.length = pdu.bitmapDataLength;
cmd.data = pdu.bitmapData;
cmd.extra = NULL;
if ((error = rdpgfx_decode(gfx, &cmd)))
WLog_ERR(TAG, "rdpgfx_decode failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_decode failed with error %"PRIu32"!", error);
return error;
}
@ -645,9 +647,9 @@ static UINT rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
Stream_Read_UINT32(s, pdu.bitmapDataLength); /* bitmapDataLength (4 bytes) */
pdu.bitmapData = Stream_Pointer(s);
Stream_Seek(s, pdu.bitmapDataLength);
WLog_DBG(TAG, "RecvWireToSurface2Pdu: surfaceId: %d codecId: %s (0x%04X) "
"codecContextId: %d pixelFormat: 0x%04X bitmapDataLength: %d",
(int) pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId,
WLog_DBG(TAG, "RecvWireToSurface2Pdu: surfaceId: %"PRIu16" codecId: %s (0x%04"PRIX16") "
"codecContextId: %"PRIu32" pixelFormat: 0x%02"PRIX8" bitmapDataLength: %"PRIu32"",
pdu.surfaceId, rdpgfx_get_codec_id_string(pdu.codecId), pdu.codecId,
pdu.codecContextId, pdu.pixelFormat, pdu.bitmapDataLength);
cmd.surfaceId = pdu.surfaceId;
cmd.codecId = pdu.codecId;
@ -661,13 +663,14 @@ static UINT rdpgfx_recv_wire_to_surface_2_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
cmd.height = 0;
cmd.length = pdu.bitmapDataLength;
cmd.data = pdu.bitmapData;
cmd.extra = NULL;
if (context)
{
IFCALLRET(context->SurfaceCommand, error, context, &cmd);
if (error)
WLog_ERR(TAG, "context->SurfaceCommand failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceCommand failed with error %"PRIu32"", error);
}
return error;
@ -694,7 +697,7 @@ static UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK*
Stream_Read_UINT16(s, pdu.surfaceId); /* surfaceId (2 bytes) */
Stream_Read_UINT32(s, pdu.codecContextId); /* codecContextId (4 bytes) */
WLog_DBG(TAG, "RecvDeleteEncodingContextPdu: surfaceId: %d codecContextId: %d",
WLog_DBG(TAG, "RecvDeleteEncodingContextPdu: surfaceId: %"PRIu16" codecContextId: %"PRIu32"",
pdu.surfaceId, pdu.codecContextId);
if (context)
@ -702,7 +705,7 @@ static UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK*
IFCALLRET(context->DeleteEncodingContext, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %u", error);
WLog_ERR(TAG, "context->DeleteEncodingContext failed with error %"PRIu32"", error);
}
return error;
@ -733,7 +736,7 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea
if ((error = rdpgfx_read_color32(s,
&(pdu.fillPixel)))) /* fillPixel (4 bytes) */
{
WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_color32 failed with error %"PRIu32"!", error);
return error;
}
@ -759,13 +762,13 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea
if ((error = rdpgfx_read_rect16(s, fillRect)))
{
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %"PRIu32"!", error);
free(pdu.fillRects);
return error;
}
}
WLog_DBG(TAG, "RecvSolidFillPdu: surfaceId: %d fillRectCount: %d",
WLog_DBG(TAG, "RecvSolidFillPdu: surfaceId: %"PRIu16" fillRectCount: %"PRIu16"",
pdu.surfaceId, pdu.fillRectCount);
if (context)
@ -773,7 +776,7 @@ static UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStrea
IFCALLRET(context->SolidFill, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->SolidFill failed with error %u", error);
WLog_ERR(TAG, "context->SolidFill failed with error %"PRIu32"", error);
}
free(pdu.fillRects);
@ -806,7 +809,7 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK*
if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */
{
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %"PRIu32"!", error);
return error;
}
@ -833,14 +836,14 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK*
if ((error = rdpgfx_read_point16(s, destPt)))
{
WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %"PRIu32"!", error);
free(pdu.destPts);
return error;
}
}
WLog_DBG(TAG, "RecvSurfaceToSurfacePdu: surfaceIdSrc: %d surfaceIdDest: %d "
"left: %d top: %d right: %d bottom: %d destPtsCount: %d",
WLog_DBG(TAG, "RecvSurfaceToSurfacePdu: surfaceIdSrc: %"PRIu16" surfaceIdDest: %"PRIu16" "
"left: %"PRIu16" top: %"PRIu16" right: %"PRIu16" bottom: %"PRIu16" destPtsCount: %"PRIu16"",
pdu.surfaceIdSrc, pdu.surfaceIdDest,
pdu.rectSrc.left, pdu.rectSrc.top, pdu.rectSrc.right, pdu.rectSrc.bottom,
pdu.destPtsCount);
@ -850,7 +853,7 @@ static UINT rdpgfx_recv_surface_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK*
IFCALLRET(context->SurfaceToSurface, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->SurfaceToSurface failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceToSurface failed with error %"PRIu32"", error);
}
free(pdu.destPts);
@ -882,14 +885,14 @@ static UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if ((error = rdpgfx_read_rect16(s, &(pdu.rectSrc)))) /* rectSrc (8 bytes ) */
{
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_rect16 failed with error %"PRIu32"!", error);
return error;
}
WLog_DBG(TAG,
"RecvSurfaceToCachePdu: surfaceId: %d cacheKey: 0x%08X cacheSlot: %d "
"left: %d top: %d right: %d bottom: %d",
pdu.surfaceId, (int) pdu.cacheKey, pdu.cacheSlot,
"RecvSurfaceToCachePdu: surfaceId: %"PRIu16" cacheKey: 0x%016"PRIX64" cacheSlot: %"PRIu16" "
"left: %"PRIu16" top: %"PRIu16" right: %"PRIu16" bottom: %"PRIu16"",
pdu.surfaceId, pdu.cacheKey, pdu.cacheSlot,
pdu.rectSrc.left, pdu.rectSrc.top,
pdu.rectSrc.right, pdu.rectSrc.bottom);
@ -898,7 +901,7 @@ static UINT rdpgfx_recv_surface_to_cache_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
IFCALLRET(context->SurfaceToCache, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->SurfaceToCache failed with error %u", error);
WLog_ERR(TAG, "context->SurfaceToCache failed with error %"PRIu32"", error);
}
return error;
@ -950,22 +953,22 @@ static UINT rdpgfx_recv_cache_to_surface_pdu(RDPGFX_CHANNEL_CALLBACK* callback,
if ((error = rdpgfx_read_point16(s, destPt)))
{
WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_read_point16 failed with error %"PRIu32"", error);
free(pdu.destPts);
return error;
}
}
WLog_DBG(TAG,
"RdpGfxRecvCacheToSurfacePdu: cacheSlot: %d surfaceId: %d destPtsCount: %d",
pdu.cacheSlot, (int) pdu.surfaceId, pdu.destPtsCount);
"RdpGfxRecvCacheToSurfacePdu: cacheSlot: %"PRIu16" surfaceId: %"PRIu16" destPtsCount: %"PRIu16"",
pdu.cacheSlot, pdu.surfaceId, pdu.destPtsCount);
if (context)
{
IFCALLRET(context->CacheToSurface, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->CacheToSurface failed with error %u", error);
WLog_ERR(TAG, "context->CacheToSurface failed with error %"PRIu32"", error);
}
free(pdu.destPts);
@ -996,15 +999,15 @@ static UINT rdpgfx_recv_map_surface_to_output_pdu(RDPGFX_CHANNEL_CALLBACK*
Stream_Read_UINT32(s, pdu.outputOriginX); /* outputOriginX (4 bytes) */
Stream_Read_UINT32(s, pdu.outputOriginY); /* outputOriginY (4 bytes) */
WLog_DBG(TAG,
"RecvMapSurfaceToOutputPdu: surfaceId: %d outputOriginX: %d outputOriginY: %d",
(int) pdu.surfaceId, pdu.outputOriginX, pdu.outputOriginY);
"RecvMapSurfaceToOutputPdu: surfaceId: %"PRIu16" outputOriginX: %"PRIu32" outputOriginY: %"PRIu32"",
pdu.surfaceId, pdu.outputOriginX, pdu.outputOriginY);
if (context)
{
IFCALLRET(context->MapSurfaceToOutput, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %u", error);
WLog_ERR(TAG, "context->MapSurfaceToOutput failed with error %"PRIu32"", error);
}
return error;
@ -1034,15 +1037,15 @@ static UINT rdpgfx_recv_map_surface_to_window_pdu(RDPGFX_CHANNEL_CALLBACK* callb
Stream_Read_UINT32(s, pdu.mappedWidth); /* mappedWidth (4 bytes) */
Stream_Read_UINT32(s, pdu.mappedHeight); /* mappedHeight (4 bytes) */
WLog_DBG(TAG,
"RecvMapSurfaceToWindowPdu: surfaceId: %d windowId: 0x%04X mappedWidth: %d mappedHeight: %d",
pdu.surfaceId, (int) pdu.windowId, pdu.mappedWidth, pdu.mappedHeight);
"RecvMapSurfaceToWindowPdu: surfaceId: %"PRIu16" windowId: 0x%016"PRIX64" mappedWidth: %"PRIu32" mappedHeight: %"PRIu32"",
pdu.surfaceId, pdu.windowId, pdu.mappedWidth, pdu.mappedHeight);
if (context && context->MapSurfaceToWindow)
{
IFCALLRET(context->MapSurfaceToWindow, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %u", error);
WLog_ERR(TAG, "context->MapSurfaceToWindow failed with error %"PRIu32"", error);
}
return error;
@ -1062,12 +1065,12 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
if ((error = rdpgfx_read_header(s, &header)))
{
WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_header failed with error %"PRIu32"!", error);
return error;
}
#if 1
WLog_DBG(TAG, "cmdId: %s (0x%04X) flags: 0x%04X pduLength: %d",
WLog_DBG(TAG, "cmdId: %s (0x%04"PRIX16") flags: 0x%04"PRIX16" pduLength: %"PRIu32"",
rdpgfx_get_cmd_id_string(header.cmdId), header.cmdId, header.flags,
header.pduLength);
#endif
@ -1076,110 +1079,110 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
{
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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_1_pdu failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_wire_to_surface_2_pdu failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_delete_encoding_context_pdu failed with error %"PRIu32"!",
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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_solid_fill_pdu failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_surface_to_surface_pdu failed with error %"PRIu32"!",
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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_surface_to_cache_pdu failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_cache_to_surface_pdu failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_evict_cache_entry_pdu failed with error %"PRIu32"!",
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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_create_surface_pdu failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_delete_surface_pdu failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_start_frame_pdu failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_end_frame_pdu failed with error %"PRIu32"!", 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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_reset_graphics_pdu failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_output_pdu failed with error %"PRIu32"!",
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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_cache_import_reply_pdu failed with error %"PRIu32"!",
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 %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_caps_confirm_pdu failed with error %"PRIu32"!", 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 %u!",
WLog_ERR(TAG, "rdpgfx_recv_map_surface_to_window_pdu failed with error %"PRIu32"!",
error);
break;
@ -1191,7 +1194,7 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
if (error)
{
WLog_ERR(TAG, "Error while parsing GFX cmdId: %s (0x%04X)",
WLog_ERR(TAG, "Error while parsing GFX cmdId: %s (0x%04"PRIX16")",
rdpgfx_get_cmd_id_string(header.cmdId), header.cmdId);
return error;
}
@ -1200,7 +1203,7 @@ static UINT rdpgfx_recv_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
if (end != (beg + header.pduLength))
{
WLog_ERR(TAG, "Unexpected gfx pdu end: Actual: %d, Expected: %d",
WLog_ERR(TAG, "Unexpected gfx pdu end: Actual: %d, Expected: %"PRIu32"",
end, (beg + header.pduLength));
Stream_SetPosition(s, (beg + header.pduLength));
}
@ -1240,11 +1243,11 @@ static UINT rdpgfx_on_data_received(IWTSVirtualChannelCallback*
return CHANNEL_RC_NO_MEMORY;
}
while (((size_t) Stream_GetPosition(s)) < Stream_Length(s))
while (Stream_GetPosition(s) < Stream_Length(s))
{
if ((error = rdpgfx_recv_pdu(callback, s)))
{
WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_recv_pdu failed with error %"PRIu32"!", error);
break;
}
}
@ -1429,7 +1432,7 @@ static UINT rdpgfx_plugin_terminated(IWTSPlugin* pPlugin)
if (error)
{
WLog_ERR(TAG, "context->DeleteSurface failed with error %u", error);
WLog_ERR(TAG, "context->DeleteSurface failed with error %"PRIu32"", error);
free(pKeys);
free(context);
free(gfx);
@ -1454,7 +1457,7 @@ static UINT rdpgfx_plugin_terminated(IWTSPlugin* pPlugin)
if (error)
{
WLog_ERR(TAG, "context->EvictCacheEntry failed with error %u", error);
WLog_ERR(TAG, "context->EvictCacheEntry failed with error %"PRIu32"", error);
free(context);
free(gfx);
return error;

View File

@ -130,7 +130,7 @@ static UINT rdpgfx_server_packet_send(RdpgfxServerContext* context, wStream* s)
if (written < Stream_GetPosition(fs))
{
WLog_WARN(TAG, "Unexpected bytes written: %lu/%lu",
WLog_WARN(TAG, "Unexpected bytes written: %"PRIu32"/%"PRIuz"",
written, Stream_GetPosition(fs));
}
@ -168,7 +168,7 @@ static wStream* rdpgfx_server_single_packet_new(UINT16 cmdId, UINT32 dataLen)
if ((error = rdpgfx_server_packet_init_header(s, cmdId, pduLength)))
{
WLog_ERR(TAG, "Failed to init header with error %u!", error);
WLog_ERR(TAG, "Failed to init header with error %"PRIu32"!", error);
goto error;
}
@ -233,8 +233,8 @@ static UINT rdpgfx_send_reset_graphics_pdu(RdpgfxServerContext* context,
/* Check monitorCount. This ensures total size within 340 bytes) */
if (pdu->monitorCount >= 16)
{
WLog_ERR(TAG, "Monitor count MUST be less than or equal to 16: %lu",
(unsigned long) pdu->monitorCount);
WLog_ERR(TAG, "Monitor count MUST be less than or equal to 16: %"PRIu32"",
pdu->monitorCount);
return ERROR_INVALID_DATA;
}
@ -516,7 +516,7 @@ static UINT rdpgfx_write_h264_metablock(wStream* s, RDPGFX_H264_METABLOCK* meta)
if ((error = rdpgfx_write_rect16(s, regionRect)))
{
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %"PRIu32"!", error);
return error;
}
}
@ -547,7 +547,7 @@ static INLINE UINT rdpgfx_write_h264_avc420(wStream* s,
if ((error = rdpgfx_write_h264_metablock(s, &(havc420->meta))))
{
WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %u!",
WLog_ERR(TAG, "rdpgfx_write_h264_metablock failed with error %"PRIu32"!",
error);
return error;
}
@ -748,7 +748,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context,
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "Failed to init header with error %u!", error);
WLog_ERR(TAG, "Failed to init header with error %"PRIu32"!", error);
goto error;
}
@ -764,7 +764,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context,
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "Failed to init header with error %u!", error);
WLog_ERR(TAG, "Failed to init header with error %"PRIu32"!", error);
goto error;
}
@ -787,7 +787,7 @@ static UINT rdpgfx_send_surface_frame_command(RdpgfxServerContext* context,
if (error != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "Failed to init header with error %u!", error);
WLog_ERR(TAG, "Failed to init header with error %"PRIu32"!", error);
goto error;
}
@ -850,7 +850,7 @@ static UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context,
/* fillPixel (4 bytes) */
if ((error = rdpgfx_write_color32(s, &(pdu->fillPixel))))
{
WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_color32 failed with error %"PRIu32"!", error);
goto error;
}
@ -862,7 +862,7 @@ static UINT rdpgfx_send_solid_fill_pdu(RdpgfxServerContext* context,
if ((error = rdpgfx_write_rect16(s, fillRect)))
{
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %"PRIu32"!", error);
goto error;
}
}
@ -900,7 +900,7 @@ static UINT rdpgfx_send_surface_to_surface_pdu(RdpgfxServerContext* context,
/* rectSrc (8 bytes ) */
if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc))))
{
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %"PRIu32"!", error);
goto error;
}
@ -912,7 +912,7 @@ static UINT rdpgfx_send_surface_to_surface_pdu(RdpgfxServerContext* context,
if ((error = rdpgfx_write_point16(s, destPt)))
{
WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %"PRIu32"!", error);
goto error;
}
}
@ -948,7 +948,7 @@ static UINT rdpgfx_send_surface_to_cache_pdu(RdpgfxServerContext* context,
/* rectSrc (8 bytes ) */
if ((error = rdpgfx_write_rect16(s, &(pdu->rectSrc))))
{
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_write_rect16 failed with error %"PRIu32"!", error);
goto error;
}
@ -989,7 +989,7 @@ static UINT rdpgfx_send_cache_to_surface_pdu(RdpgfxServerContext* context,
if ((error = rdpgfx_write_point16(s, destPt)))
{
WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %u", error);
WLog_ERR(TAG, "rdpgfx_write_point16 failed with error %"PRIu32"", error);
goto error;
}
}
@ -1075,7 +1075,7 @@ static UINT rdpgfx_recv_frame_acknowledge_pdu(RdpgfxServerContext* context,
IFCALLRET(context->FrameAcknowledge, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->FrameAcknowledge failed with error %u",
WLog_ERR(TAG, "context->FrameAcknowledge failed with error %"PRIu32"",
error);
}
@ -1107,7 +1107,7 @@ static UINT rdpgfx_recv_cache_import_offer_pdu(RdpgfxServerContext* context,
if (pdu.cacheEntriesCount <= 0)
{
/* According to the latest spec, capsSetCount <= 3 */
WLog_ERR(TAG, "Invalid cacheEntriesCount: %u", pdu.cacheEntriesCount);
WLog_ERR(TAG, "Invalid cacheEntriesCount: %"PRIu16"", pdu.cacheEntriesCount);
return ERROR_INVALID_DATA;
}
@ -1140,7 +1140,7 @@ static UINT rdpgfx_recv_cache_import_offer_pdu(RdpgfxServerContext* context,
IFCALLRET(context->CacheImportOffer, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->CacheImportOffer failed with error %u",
WLog_ERR(TAG, "context->CacheImportOffer failed with error %"PRIu32"",
error);
}
@ -1191,7 +1191,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context,
if (capsDataLength != 4)
{
WLog_ERR(TAG, "capsDataLength does not equal to 4: %u",
WLog_ERR(TAG, "capsDataLength does not equal to 4: %"PRIu32"",
capsDataLength);
free(capsSets);
return ERROR_INVALID_DATA;
@ -1205,7 +1205,7 @@ static UINT rdpgfx_recv_caps_advertise_pdu(RdpgfxServerContext* context,
IFCALLRET(context->CapsAdvertise, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->CapsAdvertise failed with error %u", error);
WLog_ERR(TAG, "context->CapsAdvertise failed with error %"PRIu32"", error);
}
free(capsSets);
@ -1239,7 +1239,7 @@ static UINT rdpgfx_recv_qoe_frame_acknowledge_pdu(RdpgfxServerContext* context,
IFCALLRET(context->QoeFrameAcknowledge, error, context, &pdu);
if (error)
WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %u",
WLog_ERR(TAG, "context->QoeFrameAcknowledge failed with error %"PRIu32"",
error);
}
@ -1260,11 +1260,11 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s)
if ((error = rdpgfx_read_header(s, &header)))
{
WLog_ERR(TAG, "rdpgfx_read_header failed with error %u!", error);
WLog_ERR(TAG, "rdpgfx_read_header failed with error %"PRIu32"!", error);
return error;
}
WLog_DBG(TAG, "cmdId: %s (0x%04X) flags: 0x%04X pduLength: %d",
WLog_DBG(TAG, "cmdId: %s (0x%04"PRIX16") flags: 0x%04"PRIX16" pduLength: %"PRIu32"",
rdpgfx_get_cmd_id_string(header.cmdId), header.cmdId,
header.flags, header.pduLength);
@ -1273,28 +1273,28 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s)
case RDPGFX_CMDID_FRAMEACKNOWLEDGE:
if ((error = rdpgfx_recv_frame_acknowledge_pdu(context, s)))
WLog_ERR(TAG, "rdpgfx_recv_frame_acknowledge_pdu "
"failed with error %u!", error);
"failed with error %"PRIu32"!", 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 %u!", error);
"failed with error %"PRIu32"!", 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 %u!", error);
"failed with error %"PRIu32"!", 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 %u!", error);
"failed with error %"PRIu32"!", error);
break;
@ -1305,7 +1305,7 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s)
if (error)
{
WLog_ERR(TAG, "Error while parsing GFX cmdId: %s (0x%04X)",
WLog_ERR(TAG, "Error while parsing GFX cmdId: %s (0x%04"PRIX16")",
rdpgfx_get_cmd_id_string(header.cmdId), header.cmdId);
return error;
}
@ -1314,7 +1314,7 @@ static UINT rdpgfx_server_receive_pdu(RdpgfxServerContext* context, wStream* s)
if (end != (beg + header.pduLength))
{
WLog_ERR(TAG, "Unexpected gfx pdu end: Actual: %d, Expected: %d",
WLog_ERR(TAG, "Unexpected gfx pdu end: Actual: %d, Expected: %"PRIu32"",
end, (beg + header.pduLength));
Stream_SetPosition(s, (beg + header.pduLength));
}
@ -1347,7 +1347,7 @@ static void* rdpgfx_server_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@ -1357,7 +1357,7 @@ static void* rdpgfx_server_thread_func(void* arg)
if ((error = rdpgfx_server_handle_messages(context)))
{
WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %u",
WLog_ERR(TAG, "rdpgfx_server_handle_messages failed with error %"PRIu32"",
error);
break;
}
@ -1407,8 +1407,8 @@ static BOOL rdpgfx_server_open(RdpgfxServerContext* context)
&buffer, &BytesReturned)
|| (BytesReturned != sizeof(HANDLE)))
{
WLog_ERR(TAG, "WTSVirtualChannelQuery failed "
"or invalid returned size(%d)",
WLog_ERR(TAG, "WTSVirtualChannelQuery failed "
"or invalid returned size(%"PRIu32")",
BytesReturned);
if (buffer)
@ -1474,8 +1474,8 @@ static BOOL rdpgfx_server_close(RdpgfxServerContext* context)
if (WaitForSingleObject(priv->thread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu",
(unsigned long)GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"",
GetLastError());
return FALSE;
}
@ -1651,12 +1651,12 @@ UINT rdpgfx_server_handle_messages(RdpgfxServerContext* context)
Stream_SetLength(s, BytesReturned);
Stream_SetPosition(s, 0);
while (((size_t) Stream_GetPosition(s)) < Stream_Length(s))
while (Stream_GetPosition(s) < Stream_Length(s))
{
if ((ret = rdpgfx_server_receive_pdu(context, s)))
{
WLog_ERR(TAG, "rdpgfx_server_receive_pdu "
"failed with error %u!", ret);
"failed with error %"PRIu32"!", ret);
return ret;
}
}

View File

@ -131,8 +131,8 @@ static int rdpsnd_alsa_set_hw_params(rdpsndAlsaPlugin* alsa)
if (alsa->period_size > buffer_size_max)
{
WLog_ERR(TAG, "Warning: requested sound buffer size %d, got %d instead\n",
(int) alsa->buffer_size, (int) buffer_size_max);
WLog_ERR(TAG, "Warning: requested sound buffer size %lu, got %lu instead\n",
alsa->buffer_size, buffer_size_max);
alsa->period_size = (buffer_size_max / 8);
}
@ -686,7 +686,7 @@ UINT freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS p
{
if ((error = rdpsnd_alsa_parse_addin_args((rdpsndDevicePlugin *) alsa, args)))
{
WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %u", error);
WLog_ERR(TAG, "rdpsnd_alsa_parse_addin_args failed with error %"PRIu32"", error);
goto error_parse_args;
}
}

View File

@ -42,20 +42,20 @@ static SLresult openSLCreateEngine(OPENSL_STREAM* p)
SLresult result;
// create engine
result = slCreateEngine(&(p->engineObject), 0, NULL, 0, NULL, NULL);
DEBUG_SND("engineObject=%p", p->engineObject);
DEBUG_SND("engineObject=%p", (void*) p->engineObject);
if (result != SL_RESULT_SUCCESS) goto engine_end;
// realize the engine
result = (*p->engineObject)->Realize(p->engineObject, SL_BOOLEAN_FALSE);
DEBUG_SND("Realize=%d", result);
DEBUG_SND("Realize=%"PRIu32"", result);
if (result != SL_RESULT_SUCCESS) goto engine_end;
// get the engine interface, which is needed in order to create other objects
result = (*p->engineObject)->GetInterface(p->engineObject, SL_IID_ENGINE,
&(p->engineEngine));
DEBUG_SND("engineEngine=%p", p->engineEngine);
DEBUG_SND("engineEngine=%p", (void*) p->engineEngine);
if (result != SL_RESULT_SUCCESS) goto engine_end;
@ -139,14 +139,14 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
const SLboolean req[] = {SL_BOOLEAN_FALSE};
result = (*p->engineEngine)->CreateOutputMix(p->engineEngine,
&(p->outputMixObject), 1, ids, req);
DEBUG_SND("engineEngine=%p", p->engineEngine);
DEBUG_SND("engineEngine=%p", (void*) p->engineEngine);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
// realize the output mix
result = (*p->outputMixObject)->Realize(p->outputMixObject, SL_BOOLEAN_FALSE);
DEBUG_SND("Realize=%d", result);
DEBUG_SND("Realize=%"PRIu32"", result);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -170,14 +170,14 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
const SLboolean req1[] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*p->engineEngine)->CreateAudioPlayer(p->engineEngine,
&(p->bqPlayerObject), &audioSrc, &audioSnk, 2, ids1, req1);
DEBUG_SND("bqPlayerObject=%p", p->bqPlayerObject);
DEBUG_SND("bqPlayerObject=%p", (void*) p->bqPlayerObject);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
// realize the player
result = (*p->bqPlayerObject)->Realize(p->bqPlayerObject, SL_BOOLEAN_FALSE);
DEBUG_SND("Realize=%d", result);
DEBUG_SND("Realize=%"PRIu32"", result);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -185,7 +185,7 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
// get the play interface
result = (*p->bqPlayerObject)->GetInterface(p->bqPlayerObject, SL_IID_PLAY,
&(p->bqPlayerPlay));
DEBUG_SND("bqPlayerPlay=%p", p->bqPlayerPlay);
DEBUG_SND("bqPlayerPlay=%p", (void*) p->bqPlayerPlay);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -193,7 +193,7 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
// get the volume interface
result = (*p->bqPlayerObject)->GetInterface(p->bqPlayerObject, SL_IID_VOLUME,
&(p->bqPlayerVolume));
DEBUG_SND("bqPlayerVolume=%p", p->bqPlayerVolume);
DEBUG_SND("bqPlayerVolume=%p", (void*) p->bqPlayerVolume);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -202,7 +202,7 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
result = (*p->bqPlayerObject)->GetInterface(p->bqPlayerObject,
SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
&(p->bqPlayerBufferQueue));
DEBUG_SND("bqPlayerBufferQueue=%p", p->bqPlayerBufferQueue);
DEBUG_SND("bqPlayerBufferQueue=%p", (void*) p->bqPlayerBufferQueue);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -210,7 +210,7 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
// register callback on the buffer queue
result = (*p->bqPlayerBufferQueue)->RegisterCallback(p->bqPlayerBufferQueue,
bqPlayerCallback, p);
DEBUG_SND("bqPlayerCallback=%p", p->bqPlayerCallback);
DEBUG_SND("bqPlayerCallback=%p", (void*) p->bqPlayerCallback);
assert(!result);
if (result != SL_RESULT_SUCCESS) goto end_openaudio;
@ -218,7 +218,7 @@ static SLresult openSLPlayOpen(OPENSL_STREAM* p)
// set the player's state to playing
result = (*p->bqPlayerPlay)->SetPlayState(p->bqPlayerPlay,
SL_PLAYSTATE_PLAYING);
DEBUG_SND("SetPlayState=%d", result);
DEBUG_SND("SetPlayState=%"PRIu32"", result);
assert(!result);
end_openaudio:
assert(!result);

View File

@ -68,7 +68,7 @@ static int rdpsnd_opensles_volume_to_millibel(unsigned short level, int max)
const int min = SL_MILLIBEL_MIN;
const int step = max - min;
const int rc = (level * step / 0xFFFF) + min;
DEBUG_SND("level=%d, min=%d, max=%d, step=%d, result=%d",
DEBUG_SND("level=%hu, min=%d, max=%d, step=%d, result=%d",
level, min, max, step, rc);
return rc;
}
@ -106,7 +106,7 @@ static BOOL rdpsnd_opensles_set_volume(rdpsndDevicePlugin* device,
static int rdpsnd_opensles_set_params(rdpsndopenslesPlugin* opensles)
{
DEBUG_SND("opensles=%p", opensles);
DEBUG_SND("opensles=%p", (void*) opensles);
if (!rdpsnd_opensles_check_handle(opensles))
return 0;
@ -124,11 +124,11 @@ static BOOL rdpsnd_opensles_set_format(rdpsndDevicePlugin* device,
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
rdpsnd_opensles_check_handle(opensles);
DEBUG_SND("opensles=%p format=%p, latency=%d", opensles, format, latency);
DEBUG_SND("opensles=%p format=%p, latency=%d", (void*) opensles, (void*) format, latency);
if (format)
{
DEBUG_SND("format=%d, cbsize=%d, samples=%d, bits=%d, channels=%d, align=%d",
DEBUG_SND("format=%"PRIu16", cbsize=%"PRIu16", samples=%"PRIu32", bits=%"PRIu16", channels=%"PRIu16", align=%"PRIu16"",
format->wFormatTag, format->cbSize, format->nSamplesPerSec,
format->wBitsPerSample, format->nChannels, format->nBlockAlign);
opensles->rate = format->nSamplesPerSec;
@ -146,8 +146,8 @@ static BOOL rdpsnd_opensles_open(rdpsndDevicePlugin* device,
AUDIO_FORMAT* format, int latency)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p format=%p, latency=%d, rate=%d",
opensles, format, latency, opensles->rate);
DEBUG_SND("opensles=%p format=%p, latency=%d, rate=%"PRIu32"",
(void*) opensles, (void*) format, latency, opensles->rate);
if (rdpsnd_opensles_check_handle(opensles))
return TRUE;
@ -168,7 +168,7 @@ static BOOL rdpsnd_opensles_open(rdpsndDevicePlugin* device,
static void rdpsnd_opensles_close(rdpsndDevicePlugin* device)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p", opensles);
DEBUG_SND("opensles=%p", (void*) opensles);
if (!rdpsnd_opensles_check_handle(opensles))
return;
@ -180,7 +180,7 @@ static void rdpsnd_opensles_close(rdpsndDevicePlugin* device)
static void rdpsnd_opensles_free(rdpsndDevicePlugin* device)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p", opensles);
DEBUG_SND("opensles=%p", (void*) opensles);
assert(opensles);
assert(opensles->device_name);
free(opensles->device_name);
@ -192,7 +192,7 @@ static void rdpsnd_opensles_free(rdpsndDevicePlugin* device)
static BOOL rdpsnd_opensles_format_supported(rdpsndDevicePlugin* device,
AUDIO_FORMAT* format)
{
DEBUG_SND("format=%d, cbsize=%d, samples=%d, bits=%d, channels=%d, align=%d",
DEBUG_SND("format=%"PRIu16", cbsize=%"PRIu16", samples=%"PRIu32", bits=%"PRIu16", channels=%"PRIu16", align=%"PRIu16"",
format->wFormatTag, format->cbSize, format->nSamplesPerSec,
format->wBitsPerSample, format->nChannels, format->nBlockAlign);
assert(device);
@ -235,7 +235,7 @@ static BOOL rdpsnd_opensles_format_supported(rdpsndDevicePlugin* device,
static UINT32 rdpsnd_opensles_get_volume(rdpsndDevicePlugin* device)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p", opensles);
DEBUG_SND("opensles=%p", (void*) opensles);
assert(opensles);
if (opensles->stream)
@ -259,7 +259,7 @@ static BOOL rdpsnd_opensles_set_volume(rdpsndDevicePlugin* device,
UINT32 value)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p, value=%d", opensles, value);
DEBUG_SND("opensles=%p, value=%"PRIu32"", (void*) opensles, value);
assert(opensles);
opensles->volume = value;
@ -293,15 +293,16 @@ static void rdpsnd_opensles_play(rdpsndDevicePlugin* device,
} src;
int ret;
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
DEBUG_SND("opensles=%p, data=%p, size=%d", opensles, data, size);
DEBUG_SND("opensles=%p, data=%p, size=%d", (void*) opensles, (void*) data, size);
if (!rdpsnd_opensles_check_handle(opensles))
return;
if (opensles->format == WAVE_FORMAT_ADPCM)
{
DEBUG_SND("dsp_context=%p, channels=%d, block_size=%d",
opensles->dsp_context, opensles->channels, opensles->block_size);
DEBUG_SND("dsp_context=%p, channels=%"PRIu32", block_size=%d",
(void*) opensles->dsp_context, opensles->channels, opensles->block_size);
opensles->dsp_context->decode_ms_adpcm(opensles->dsp_context,
data, size, opensles->channels, opensles->block_size);
size = opensles->dsp_context->adpcm_size;
@ -309,8 +310,9 @@ static void rdpsnd_opensles_play(rdpsndDevicePlugin* device,
}
else if (opensles->format == WAVE_FORMAT_DVI_ADPCM)
{
DEBUG_SND("dsp_context=%p, channels=%d, block_size=%d",
opensles->dsp_context, opensles->channels, opensles->block_size);
DEBUG_SND("dsp_context=%p, channels=%"PRIu32", block_size=%d",
(void*) opensles->dsp_context, opensles->channels, opensles->block_size);
opensles->dsp_context->decode_ima_adpcm(opensles->dsp_context,
data, size, opensles->channels, opensles->block_size);
size = opensles->dsp_context->adpcm_size;
@ -321,7 +323,7 @@ static void rdpsnd_opensles_play(rdpsndDevicePlugin* device,
src.b = data;
}
DEBUG_SND("size=%d, src=%p", size, src.b);
DEBUG_SND("size=%d, src=%p", size, (void*) src.b);
assert(0 == size % 2);
assert(size > 0);
assert(src.b);
@ -335,7 +337,7 @@ static void rdpsnd_opensles_start(rdpsndDevicePlugin* device)
{
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
rdpsnd_opensles_check_handle(opensles);
DEBUG_SND("opensles=%p", opensles);
DEBUG_SND("opensles=%p", (void*) opensles);
}
static COMMAND_LINE_ARGUMENT_A rdpsnd_opensles_args[] =
@ -356,7 +358,7 @@ static int rdpsnd_opensles_parse_addin_args(rdpsndDevicePlugin* device,
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*) device;
assert(opensles);
assert(args);
DEBUG_SND("opensles=%p, args=%p", opensles, args);
DEBUG_SND("opensles=%p, args=%p", (void*) opensles, (void*) args);
flags = COMMAND_LINE_SIGIL_NONE | COMMAND_LINE_SEPARATOR_COLON |
COMMAND_LINE_IGN_UNKNOWN_KEYWORD;
status = CommandLineParseArgumentsA(args->argc, (const char**) args->argv,
@ -406,7 +408,7 @@ UINT freerdp_rdpsnd_client_subsystem_entry(
ADDIN_ARGV* args;
rdpsndopenslesPlugin* opensles;
UINT error;
DEBUG_SND("pEntryPoints=%p", pEntryPoints);
DEBUG_SND("pEntryPoints=%p", (void*) pEntryPoints);
opensles = (rdpsndopenslesPlugin*) calloc(1, sizeof(rdpsndopenslesPlugin));
if (!opensles)

View File

@ -121,7 +121,7 @@ static void* rdpsnd_schedule_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -130,7 +130,7 @@ static void* rdpsnd_schedule_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -142,7 +142,7 @@ static void* rdpsnd_schedule_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -205,7 +205,7 @@ static UINT rdpsnd_send_quality_mode_pdu(rdpsndPlugin* rdpsnd)
Stream_Write_UINT16(pdu, 4); /* BodySize */
Stream_Write_UINT16(pdu, rdpsnd->wQualityMode); /* wQualityMode */
Stream_Write_UINT16(pdu, 0); /* Reserved */
WLog_Print(rdpsnd->log, WLOG_DEBUG, "QualityMode: %d", rdpsnd->wQualityMode);
WLog_Print(rdpsnd->log, WLOG_DEBUG, "QualityMode: %"PRIu16"", rdpsnd->wQualityMode);
return rdpsnd_virtual_channel_write(rdpsnd, pdu);
}
@ -457,7 +457,7 @@ static UINT rdpsnd_send_training_confirm_pdu(rdpsndPlugin* rdpsnd,
Stream_Write_UINT16(pdu, wTimeStamp);
Stream_Write_UINT16(pdu, wPackSize);
WLog_Print(rdpsnd->log, WLOG_DEBUG,
"Training Response: wTimeStamp: %d wPackSize: %d",
"Training Response: wTimeStamp: %"PRIu16" wPackSize: %"PRIu16"",
wTimeStamp, wPackSize);
return rdpsnd_virtual_channel_write(rdpsnd, pdu);
}
@ -478,7 +478,7 @@ static UINT rdpsnd_recv_training_pdu(rdpsndPlugin* rdpsnd, wStream* s)
Stream_Read_UINT16(s, wTimeStamp);
Stream_Read_UINT16(s, wPackSize);
WLog_Print(rdpsnd->log, WLOG_DEBUG,
"Training Request: wTimeStamp: %d wPackSize: %d",
"Training Request: wTimeStamp: %"PRIu16" wPackSize: %"PRIu16"",
wTimeStamp, wPackSize);
return rdpsnd_send_training_confirm_pdu(rdpsnd, wTimeStamp, wPackSize);
}
@ -505,7 +505,7 @@ static UINT rdpsnd_recv_wave_info_pdu(rdpsndPlugin* rdpsnd, wStream* s,
Stream_Read(s, rdpsnd->waveData, 4);
rdpsnd->waveDataSize = BodySize - 8;
format = &rdpsnd->ClientFormats[wFormatNo];
WLog_Print(rdpsnd->log, WLOG_DEBUG, "WaveInfo: cBlockNo: %d wFormatNo: %d",
WLog_Print(rdpsnd->log, WLOG_DEBUG, "WaveInfo: cBlockNo: %"PRIu8" wFormatNo: %"PRIu16"",
rdpsnd->cBlockNo, wFormatNo);
if (!rdpsnd->isOpen)
@ -570,7 +570,7 @@ static UINT rdpsnd_send_wave_confirm_pdu(rdpsndPlugin* rdpsnd,
static UINT rdpsnd_confirm_wave(rdpsndPlugin* rdpsnd, RDPSND_WAVE* wave)
{
WLog_Print(rdpsnd->log, WLOG_DEBUG,
"WaveConfirm: cBlockNo: %d wTimeStamp: %d wTimeDiff: %d",
"WaveConfirm: cBlockNo: %"PRIu8" wTimeStamp: %"PRIu16" wTimeDiff: %d",
wave->cBlockNo, wave->wTimeStampB, wave->wTimeStampB - wave->wTimeStampA);
return rdpsnd_send_wave_confirm_pdu(rdpsnd, wave->wTimeStampB, wave->cBlockNo);
}
@ -635,7 +635,7 @@ static UINT rdpsnd_recv_wave_pdu(rdpsndPlugin* rdpsnd, wStream* s)
wave->AutoConfirm = TRUE;
format = &rdpsnd->ClientFormats[rdpsnd->wCurrentFormatNo];
wave->wAudioLength = rdpsnd_compute_audio_time_length(format, size);
WLog_Print(rdpsnd->log, WLOG_DEBUG, "Wave: cBlockNo: %d wTimeStamp: %d",
WLog_Print(rdpsnd->log, WLOG_DEBUG, "Wave: cBlockNo: %"PRIu8" wTimeStamp: %"PRIu16"",
wave->cBlockNo, wave->wTimeStampA);
if (!rdpsnd->device)
@ -702,7 +702,7 @@ static UINT rdpsnd_recv_volume_pdu(rdpsndPlugin* rdpsnd, wStream* s)
return ERROR_BAD_LENGTH;
Stream_Read_UINT32(s, dwVolume);
WLog_Print(rdpsnd->log, WLOG_DEBUG, "Volume: 0x%04X", dwVolume);
WLog_Print(rdpsnd->log, WLOG_DEBUG, "Volume: 0x%08"PRIX32"", dwVolume);
if (rdpsnd->device && rdpsnd->device->SetVolume &&
!rdpsnd->device->SetVolume(rdpsnd->device, dwVolume))
@ -741,7 +741,7 @@ static UINT rdpsnd_recv_pdu(rdpsndPlugin* rdpsnd, wStream* s)
Stream_Seek_UINT8(s); /* bPad */
Stream_Read_UINT16(s, BodySize);
//WLog_ERR(TAG, "msgType %d BodySize %d", msgType, BodySize);
//WLog_ERR(TAG, "msgType %"PRIu8" BodySize %"PRIu16"", msgType, BodySize);
switch (msgType)
{
@ -766,7 +766,7 @@ static UINT rdpsnd_recv_pdu(rdpsndPlugin* rdpsnd, wStream* s)
break;
default:
WLog_ERR(TAG, "unknown msgType %d", msgType);
WLog_ERR(TAG, "unknown msgType %"PRIu8"", msgType);
break;
}
@ -811,7 +811,7 @@ static UINT rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name,
entryPoints.args = args;
if ((error = entry(&entryPoints)))
WLog_ERR(TAG, "%s entry returns error %u", name, error);
WLog_ERR(TAG, "%s entry returns error %"PRIu32"", name, error);
WLog_INFO(TAG, "Loaded %s backend for rdpsnd", name);
return error;
@ -955,7 +955,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
if ((status = rdpsnd_load_device_plugin(rdpsnd, rdpsnd->subsystem, args)))
{
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
rdpsnd->subsystem, status);
return status;
}
@ -970,7 +970,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -983,7 +983,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -996,7 +996,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -1009,7 +1009,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -1022,7 +1022,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -1035,7 +1035,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -1048,7 +1048,7 @@ static UINT rdpsnd_process_connect(rdpsndPlugin* rdpsnd)
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 %u",
WLog_ERR(TAG, "unable to load the %s subsystem plugin because of error %"PRIu32"",
subsystem_name, status);
}
@ -1103,7 +1103,7 @@ static void rdpsnd_process_disconnect(rdpsndPlugin* rdpsnd)
if (WaitForSingleObject(rdpsnd->ScheduleThread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
return;
}
@ -1134,7 +1134,7 @@ UINT rdpsnd_virtual_channel_write(rdpsndPlugin* rdpsnd, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -1221,7 +1221,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_open_event_ex(LPVOID lpUserParam, D
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 %u", error);
"rdpsnd_virtual_channel_event_data_received failed with error %"PRIu32"", error);
break;
@ -1308,7 +1308,7 @@ static UINT rdpsnd_virtual_channel_event_connected(rdpsndPlugin* rdpsnd,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -1349,7 +1349,7 @@ static UINT rdpsnd_virtual_channel_event_disconnected(rdpsndPlugin* rdpsnd)
if (WaitForSingleObject(rdpsnd->thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -1359,7 +1359,7 @@ static UINT rdpsnd_virtual_channel_event_disconnected(rdpsndPlugin* rdpsnd)
if (CHANNEL_RC_OK != error)
{
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08"PRIX32"]",
WTSErrorToString(error), error);
return error;
}
@ -1424,7 +1424,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L
{
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 %u!",
WLog_ERR(TAG, "rdpsnd_virtual_channel_event_connected failed with error %"PRIu32"!",
error);
break;
@ -1432,7 +1432,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L
case CHANNEL_EVENT_DISCONNECTED:
if ((error = rdpsnd_virtual_channel_event_disconnected(plugin)))
WLog_ERR(TAG,
"rdpsnd_virtual_channel_event_disconnected failed with error %u!", error);
"rdpsnd_virtual_channel_event_disconnected failed with error %"PRIu32"!", error);
break;
@ -1440,7 +1440,7 @@ static VOID VCAPITYPE rdpsnd_virtual_channel_init_event_ex(LPVOID lpUserParam, L
if (plugin->thread != NULL)
if ((error = rdpsnd_virtual_channel_event_disconnected(plugin)))
WLog_ERR(TAG,
"rdpsnd_virtual_channel_event_disconnected failed with error %u!", error);
"rdpsnd_virtual_channel_event_disconnected failed with error %"PRIu32"!", error);
rdpsnd_virtual_channel_event_terminated(plugin);
plugin = NULL;
@ -1506,7 +1506,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID p
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
free(rdpsnd);
return FALSE;

View File

@ -128,7 +128,7 @@ static void CALLBACK rdpsnd_winmm_callback_function(HWAVEOUT hwo, UINT uMsg, DWO
if (!wave)
return;
WLog_DBG(TAG, "MM_WOM_DONE: dwBufferLength: %d cBlockNo: %d",
WLog_DBG(TAG, "MM_WOM_DONE: dwBufferLength: %"PRIu32" cBlockNo: %"PRIu8"",
lpWaveHdr->dwBufferLength, wave->cBlockNo);
wave->wLocalTimeB = GetTickCount();
wTimeDelta = wave->wLocalTimeB - wave->wLocalTimeA;
@ -161,7 +161,7 @@ static BOOL rdpsnd_winmm_open(rdpsndDevicePlugin* device, AUDIO_FORMAT* format,
if (mmResult != MMSYSERR_NOERROR)
{
WLog_ERR(TAG, "waveOutOpen failed: %d", mmResult);
WLog_ERR(TAG, "waveOutOpen failed: %"PRIu32"", mmResult);
return FALSE;
}
@ -169,7 +169,7 @@ static BOOL rdpsnd_winmm_open(rdpsndDevicePlugin* device, AUDIO_FORMAT* format,
if (mmResult != MMSYSERR_NOERROR)
{
WLog_ERR(TAG, "waveOutSetVolume failed: %d", mmResult);
WLog_ERR(TAG, "waveOutSetVolume failed: %"PRIu32"", mmResult);
return FALSE;
}
@ -189,7 +189,7 @@ static void rdpsnd_winmm_close(rdpsndDevicePlugin* device)
if (mmResult != MMSYSERR_NOERROR)
{
WLog_ERR(TAG, "waveOutClose failure: %d", mmResult);
WLog_ERR(TAG, "waveOutClose failure: %"PRIu32"", mmResult);
}
winmm->hWaveOut = NULL;
@ -322,7 +322,7 @@ void rdpsnd_winmm_wave_play(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
if (mmResult != MMSYSERR_NOERROR)
{
WLog_ERR(TAG, "waveOutPrepareHeader failure: %d", mmResult);
WLog_ERR(TAG, "waveOutPrepareHeader failure: %"PRIu32"", mmResult);
return;
}
@ -330,7 +330,7 @@ void rdpsnd_winmm_wave_play(rdpsndDevicePlugin* device, RDPSND_WAVE* wave)
if (mmResult != MMSYSERR_NOERROR)
{
WLog_ERR(TAG, "waveOutWrite failure: %d", mmResult);
WLog_ERR(TAG, "waveOutWrite failure: %"PRIu32"", mmResult);
waveOutUnprepareHeader(winmm->hWaveOut, lpWaveHdr, sizeof(WAVEHDR));
free(lpWaveHdr);
return;

View File

@ -115,7 +115,7 @@ static UINT rdpsnd_server_recv_waveconfirm(RdpsndServerContext* context,
IFCALLRET(context->ConfirmBlock, error, context, confirmBlockNum, timestamp);
if (error)
WLog_ERR(TAG, "context->ConfirmBlock failed with error %u", error);
WLog_ERR(TAG, "context->ConfirmBlock failed with error %"PRIu32"", error);
return error;
}
@ -138,7 +138,7 @@ static UINT rdpsnd_server_recv_quality_mode(RdpsndServerContext* context,
Stream_Read_UINT16(s, quality);
Stream_Seek_UINT16(s); // reserved
WLog_DBG(TAG, "Client requested sound quality: %#0X", quality);
WLog_DBG(TAG, "Client requested sound quality: 0x%04"PRIX16"", quality);
return CHANNEL_RC_OK;
}
@ -253,7 +253,7 @@ static void* rdpsnd_server_thread(void* arg)
if ((error = rdpsnd_server_send_formats(context, context->priv->rdpsnd_pdu)))
{
WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %u", error);
WLog_ERR(TAG, "rdpsnd_server_send_formats failed with error %"PRIu32"", error);
goto out;
}
@ -264,7 +264,7 @@ static void* rdpsnd_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -273,7 +273,7 @@ static void* rdpsnd_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -282,7 +282,7 @@ static void* rdpsnd_server_thread(void* arg)
if ((error = rdpsnd_server_handle_messages(context)))
{
WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %u", error);
WLog_ERR(TAG, "rdpsnd_server_handle_messages failed with error %"PRIu32"", error);
break;
}
}
@ -555,7 +555,7 @@ static UINT rdpsnd_server_send_samples(RdpsndServerContext* context,
{
if ((error = rdpsnd_server_send_audio_pdu(context, wTimestamp)))
{
WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error);
WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %"PRIu32"", error);
break;
}
}
@ -616,7 +616,7 @@ static UINT rdpsnd_server_close(RdpsndServerContext* context)
}
else if ((error = rdpsnd_server_send_audio_pdu(context, 0)))
{
WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %u", error);
WLog_ERR(TAG, "rdpsnd_server_send_audio_pdu failed with error %"PRIu32"", error);
}
}
@ -663,7 +663,7 @@ static UINT rdpsnd_server_start(RdpsndServerContext* context)
&bytesReturned) || (bytesReturned != sizeof(HANDLE)))
{
WLog_ERR(TAG,
"error during WTSVirtualChannelQuery(WTSVirtualEventHandle) or invalid returned size(%d)",
"error during WTSVirtualChannelQuery(WTSVirtualEventHandle) or invalid returned size(%"PRIu32")",
bytesReturned);
if (buffer)
@ -742,7 +742,7 @@ static UINT rdpsnd_server_stop(RdpsndServerContext* context)
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -912,7 +912,7 @@ UINT rdpsnd_server_handle_messages(RdpsndServerContext* context)
/* when here we have the header + the body */
#ifdef WITH_DEBUG_SND
WLog_DBG(TAG, "message type %d", priv->msgType);
WLog_DBG(TAG, "message type %"PRIu8"", priv->msgType);
#endif
priv->expectedBytes = 4;
priv->waitingHeader = TRUE;
@ -942,7 +942,7 @@ UINT rdpsnd_server_handle_messages(RdpsndServerContext* context)
break;
default:
WLog_ERR(TAG, "UNKNOWN MESSAGE TYPE!! (%#0X)", priv->msgType);
WLog_ERR(TAG, "UNKNOWN MESSAGE TYPE!! (0x%02"PRIX8")", priv->msgType);
ret = ERROR_INVALID_DATA;
break;
}

View File

@ -61,7 +61,7 @@ static UINT remdesk_virtual_channel_write(remdeskPlugin* remdesk, wStream* s)
Stream_Buffer(s), (UINT32) Stream_Length(s), s);
if (status != CHANNEL_RC_OK)
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
@ -293,7 +293,7 @@ static UINT remdesk_send_ctl_version_info_pdu(remdeskPlugin* remdesk)
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
if (error != CHANNEL_RC_OK)
Stream_Free(s, TRUE);
@ -319,7 +319,7 @@ static UINT remdesk_recv_ctl_result_pdu(remdeskPlugin* remdesk, wStream* s,
Stream_Read_UINT32(s, result); /* result (4 bytes) */
*pResult = result;
//WLog_DBG(TAG, "RemdeskRecvResult: 0x%04X", result);
//WLog_DBG(TAG, "RemdeskRecvResult: 0x%08"PRIX32"", result);
return CHANNEL_RC_OK;
}
@ -341,7 +341,7 @@ static UINT remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk)
if ((error = remdesk_generate_expert_blob(remdesk)))
{
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u", error);
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %"PRIu32"", error);
return error;
}
@ -384,7 +384,7 @@ static UINT remdesk_send_ctl_authenticate_pdu(remdeskPlugin* remdesk)
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
out:
free(raConnectionStringW);
@ -436,7 +436,7 @@ static UINT remdesk_send_ctl_remote_control_desktop_pdu(remdeskPlugin* remdesk)
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
out:
free(raConnectionStringW);
@ -463,7 +463,7 @@ static UINT remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk)
if ((error = remdesk_generate_expert_blob(remdesk)))
{
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error);
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %"PRIu32"!", error);
return error;
}
@ -493,7 +493,7 @@ static UINT remdesk_send_ctl_verify_password_pdu(remdeskPlugin* remdesk)
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(remdesk, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
out:
free(expertBlobW);
@ -517,7 +517,7 @@ static UINT remdesk_send_ctl_expert_on_vista_pdu(remdeskPlugin* remdesk)
if ((error = remdesk_generate_expert_blob(remdesk)))
{
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %u!", error);
WLog_ERR(TAG, "remdesk_generate_expert_blob failed with error %"PRIu32"!", error);
return error;
}
@ -559,7 +559,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
Stream_Read_UINT32(s, msgType); /* msgType (4 bytes) */
//WLog_DBG(TAG, "msgType: %d", msgType);
//WLog_DBG(TAG, "msgType: %"PRIu32"", msgType);
switch (msgType)
{
@ -568,7 +568,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
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 %u", error);
WLog_ERR(TAG, "remdesk_recv_ctl_result_pdu failed with error %"PRIu32"", error);
break;
@ -577,7 +577,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
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 %u",
WLog_ERR(TAG, "remdesk_recv_ctl_server_announce_pdu failed with error %"PRIu32"",
error);
break;
@ -588,7 +588,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
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 %u", error);
WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %"PRIu32"", error);
break;
}
@ -596,20 +596,20 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
{
if ((error = remdesk_send_ctl_version_info_pdu(remdesk)))
{
WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u", error);
WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %"PRIu32"", error);
break;
}
if ((error = remdesk_send_ctl_authenticate_pdu(remdesk)))
{
WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %u", error);
WLog_ERR(TAG, "remdesk_send_ctl_authenticate_pdu failed with error %"PRIu32"", 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 %u", error);
"remdesk_send_ctl_remote_control_desktop_pdu failed with error %"PRIu32"", error);
break;
}
}
@ -617,14 +617,14 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
{
if ((error = remdesk_send_ctl_expert_on_vista_pdu(remdesk)))
{
WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %u",
WLog_ERR(TAG, "remdesk_send_ctl_expert_on_vista_pdu failed with error %"PRIu32"",
error);
break;
}
if ((error = remdesk_send_ctl_verify_password_pdu(remdesk)))
{
WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %u",
WLog_ERR(TAG, "remdesk_send_ctl_verify_password_pdu failed with error %"PRIu32"",
error);
break;
}
@ -651,7 +651,7 @@ static UINT remdesk_recv_ctl_pdu(remdeskPlugin* remdesk, wStream* s,
break;
default:
WLog_ERR(TAG, "unknown msgType: %d", msgType);
WLog_ERR(TAG, "unknown msgType: %"PRIu32"", msgType);
error = ERROR_INVALID_DATA;
break;
}
@ -669,13 +669,13 @@ static UINT remdesk_process_receive(remdeskPlugin* remdesk, wStream* s)
UINT status;
REMDESK_CHANNEL_HEADER header;
#if 0
WLog_DBG(TAG, "RemdeskReceive: %d", Stream_GetRemainingLength(s));
WLog_DBG(TAG, "RemdeskReceive: %"PRIuz"", Stream_GetRemainingLength(s));
winpr_HexDump(Stream_Pointer(s), Stream_GetRemainingLength(s));
#endif
if ((status = remdesk_read_channel_header(s, &header)))
{
WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u", status);
WLog_ERR(TAG, "remdesk_read_channel_header failed with error %"PRIu32"", status);
return status;
}
@ -733,7 +733,7 @@ static UINT remdesk_send(remdeskPlugin* remdesk, wStream* s)
if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}
@ -820,7 +820,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event_ex(LPVOID lpUserParam,
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 %u!", error);
"remdesk_virtual_channel_event_data_received failed with error %"PRIu32"!", error);
break;
@ -832,7 +832,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_open_event_ex(LPVOID lpUserParam,
break;
default:
WLog_ERR(TAG, "unhandled event %u!", event);
WLog_ERR(TAG, "unhandled event %"PRIu32"!", event);
error = ERROR_INTERNAL_ERROR;
}
@ -874,7 +874,7 @@ static void* remdesk_virtual_channel_client_thread(void* arg)
if ((error = remdesk_process_receive(remdesk, data)))
{
WLog_ERR(TAG, "remdesk_process_receive failed with error %u!", error);
WLog_ERR(TAG, "remdesk_process_receive failed with error %"PRIu32"!", error);
break;
}
}
@ -904,7 +904,7 @@ static UINT remdesk_virtual_channel_event_connected(remdeskPlugin* remdesk,
if (status != CHANNEL_RC_OK)
{
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelOpenEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
return status;
}
@ -949,7 +949,7 @@ static UINT remdesk_virtual_channel_event_disconnected(remdeskPlugin* remdesk)
&& (WaitForSingleObject(remdesk->thread, INFINITE) == WAIT_FAILED))
{
rc = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", rc);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", rc);
return rc;
}
@ -961,7 +961,7 @@ static UINT remdesk_virtual_channel_event_disconnected(remdeskPlugin* remdesk)
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelCloseEx failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
}
@ -1000,7 +1000,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_init_event_ex(LPVOID lpUserParam,
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 %u",
WLog_ERR(TAG, "remdesk_virtual_channel_event_connected failed with error %"PRIu32"",
error);
break;
@ -1008,7 +1008,7 @@ static VOID VCAPITYPE remdesk_virtual_channel_init_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_DISCONNECTED:
if ((error = remdesk_virtual_channel_event_disconnected(remdesk)))
WLog_ERR(TAG,
"remdesk_virtual_channel_event_disconnected failed with error %u", error);
"remdesk_virtual_channel_event_disconnected failed with error %"PRIu32"", error);
break;
@ -1079,7 +1079,7 @@ BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID p
if (CHANNEL_RC_OK != rc)
{
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08X]",
WLog_ERR(TAG, "pVirtualChannelInitEx failed with %s [%08"PRIX32"]",
WTSErrorToString(rc), rc);
goto error_out;
}

View File

@ -135,7 +135,7 @@ static UINT remdesk_write_ctl_header(wStream* s, REMDESK_CTL_HEADER* ctlHeader)
if ((error = remdesk_write_channel_header(s,
(REMDESK_CHANNEL_HEADER*) ctlHeader)))
{
WLog_ERR(TAG, "remdesk_write_channel_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_write_channel_header failed with error %"PRIu32"!", error);
return error;
}
@ -173,7 +173,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context,
if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader), REMDESK_CTL_RESULT,
4)))
{
WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %"PRIu32"!", error);
return error;
}
@ -187,7 +187,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context,
if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader))))
{
WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %"PRIu32"!", error);
goto out;
}
@ -195,7 +195,7 @@ static UINT remdesk_send_ctl_result_pdu(RemdeskServerContext* context,
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(context, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
out:
Stream_Free(s, TRUE);
@ -216,7 +216,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
if ((error = remdesk_prepare_ctl_header(&(pdu.ctlHeader),
REMDESK_CTL_VERSIONINFO, 8)))
{
WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_prepare_ctl_header failed with error %"PRIu32"!", error);
return error;
}
@ -232,7 +232,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
if ((error = remdesk_write_ctl_header(s, &(pdu.ctlHeader))))
{
WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_write_ctl_header failed with error %"PRIu32"!", error);
goto out;
}
@ -241,7 +241,7 @@ static UINT remdesk_send_ctl_version_info_pdu(RemdeskServerContext* context)
Stream_SealLength(s);
if ((error = remdesk_virtual_channel_write(context, s)))
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %u!", error);
WLog_ERR(TAG, "remdesk_virtual_channel_write failed with error %"PRIu32"!", error);
out:
Stream_Free(s, TRUE);
@ -317,7 +317,7 @@ static UINT remdesk_recv_ctl_remote_control_desktop_pdu(
free(pdu.raConnectionString);
if ((error = remdesk_send_ctl_result_pdu(context, 0)))
WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %u!", error);
WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -433,7 +433,7 @@ static UINT remdesk_recv_ctl_verify_password_pdu(RemdeskServerContext* context,
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 %u!", error);
WLog_ERR(TAG, "remdesk_send_ctl_result_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -456,7 +456,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
}
Stream_Read_UINT32(s, msgType); /* msgType (4 bytes) */
WLog_INFO(TAG, "msgType: %d", msgType);
WLog_INFO(TAG, "msgType: %"PRIu32"", msgType);
switch (msgType)
{
@ -464,7 +464,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
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 %u!", error);
"remdesk_recv_ctl_remote_control_desktop_pdu failed with error %"PRIu32"!", error);
return error;
}
@ -473,7 +473,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
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 %u!",
WLog_ERR(TAG, "remdesk_recv_ctl_authenticate_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -486,7 +486,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
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 %u!",
WLog_ERR(TAG, "remdesk_recv_ctl_version_info_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -499,7 +499,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
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 %u!",
WLog_ERR(TAG, "remdesk_recv_ctl_verify_password_pdu failed with error %"PRIu32"!",
error);
return error;
}
@ -519,7 +519,7 @@ static UINT remdesk_recv_ctl_pdu(RemdeskServerContext* context, wStream* s,
break;
default:
WLog_ERR(TAG, "remdesk_recv_control_pdu: unknown msgType: %d", msgType);
WLog_ERR(TAG, "remdesk_recv_control_pdu: unknown msgType: %"PRIu32"", msgType);
error = ERROR_INVALID_DATA;
break;
}
@ -538,13 +538,13 @@ static UINT remdesk_server_receive_pdu(RemdeskServerContext* context,
UINT error = CHANNEL_RC_OK;
REMDESK_CHANNEL_HEADER header;
#if 0
WLog_INFO(TAG, "RemdeskReceive: %d", Stream_GetRemainingLength(s));
WLog_INFO(TAG, "RemdeskReceive: %"PRIuz"", Stream_GetRemainingLength(s));
winpr_HexDump(Stream_Pointer(s), Stream_GetRemainingLength(s));
#endif
if ((error = remdesk_read_channel_header(s, &header)))
{
WLog_ERR(TAG, "remdesk_read_channel_header failed with error %u!", error);
WLog_ERR(TAG, "remdesk_read_channel_header failed with error %"PRIu32"!", error);
return error;
}
@ -552,7 +552,7 @@ static UINT remdesk_server_receive_pdu(RemdeskServerContext* context,
{
if ((error = remdesk_recv_ctl_pdu(context, s, &header)))
{
WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %u!", error);
WLog_ERR(TAG, "remdesk_recv_ctl_pdu failed with error %"PRIu32"!", error);
return error;
}
}
@ -626,7 +626,7 @@ static void* remdesk_server_thread(void* arg)
if ((error = remdesk_send_ctl_version_info_pdu(context)))
{
WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %u!",
WLog_ERR(TAG, "remdesk_send_ctl_version_info_pdu failed with error %"PRIu32"!",
error);
goto out;
}
@ -638,7 +638,7 @@ static void* remdesk_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"", error);
break;
}
@ -647,7 +647,7 @@ static void* remdesk_server_thread(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"", error);
break;
}
@ -684,7 +684,7 @@ static void* remdesk_server_thread(void* arg)
if ((error = remdesk_server_receive_pdu(context, s)))
{
WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %u!", error);
WLog_ERR(TAG, "remdesk_server_receive_pdu failed with error %"PRIu32"!", error);
break;
}
@ -751,7 +751,7 @@ static UINT remdesk_server_stop(RemdeskServerContext* context)
if (WaitForSingleObject(context->priv->Thread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}

View File

@ -119,7 +119,7 @@ static UINT32 _GetLastErrorToIoStatus(SERIAL_DEVICE* serial)
/* no default */
}
WLog_Print(serial->log, WLOG_DEBUG, "unexpected last-error: 0x%lx",
WLog_Print(serial->log, WLOG_DEBUG, "unexpected last-error: 0x%08"PRIX32"",
GetLastError());
return STATUS_UNSUCCESSFUL;
}
@ -157,7 +157,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
*
*/
WLog_Print(serial->log, WLOG_DEBUG,
"DesiredAccess: 0x%lX, SharedAccess: 0x%lX, CreateDisposition: 0x%lX",
"DesiredAccess: 0x%"PRIX32", SharedAccess: 0x%"PRIX32", CreateDisposition: 0x%"PRIX32"",
DesiredAccess, SharedAccess, CreateDisposition);
/* FIXME: As of today only the flags below are supported by CommCreateFileA: */
DesiredAccess = GENERIC_READ | GENERIC_WRITE;
@ -174,7 +174,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
if (!serial->hComm || (serial->hComm == INVALID_HANDLE_VALUE))
{
WLog_Print(serial->log, WLOG_WARN, "CreateFile failure: %s last-error: 0x%lX\n",
WLog_Print(serial->log, WLOG_WARN, "CreateFile failure: %s last-error: 0x%08"PRIX32"",
serial->device.name, GetLastError());
irp->IoStatus = STATUS_UNSUCCESSFUL;
goto error_handle;
@ -194,7 +194,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
irp->FileId =
irp->devman->id_sequence++; /* FIXME: why not ((WINPR_COMM*)hComm)->fd? */
irp->IoStatus = STATUS_SUCCESS;
WLog_Print(serial->log, WLOG_DEBUG, "%s (DeviceId: %d, FileId: %d) created.",
WLog_Print(serial->log, WLOG_DEBUG, "%s (DeviceId: %"PRIu32", FileId: %"PRIu32") created.",
serial->device.name, irp->device->id, irp->FileId);
error_handle:
Stream_Write_UINT32(irp->output, irp->FileId); /* FileId (4 bytes) */
@ -207,13 +207,13 @@ static void serial_process_irp_close(SERIAL_DEVICE* serial, IRP* irp)
if (!CloseHandle(serial->hComm))
{
WLog_Print(serial->log, WLOG_WARN, "CloseHandle failure: %s (%d) closed.",
WLog_Print(serial->log, WLOG_WARN, "CloseHandle failure: %s (%"PRIu32") closed.",
serial->device.name, irp->device->id);
irp->IoStatus = STATUS_UNSUCCESSFUL;
goto error_handle;
}
WLog_Print(serial->log, WLOG_DEBUG, "%s (DeviceId: %d, FileId: %d) closed.",
WLog_Print(serial->log, WLOG_DEBUG, "%s (DeviceId: %"PRIu32", FileId: %"PRIu32") closed.",
serial->device.name, irp->device->id, irp->FileId);
serial->hComm = NULL;
irp->IoStatus = STATUS_SUCCESS;
@ -246,7 +246,7 @@ static UINT serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
/* MS-RDPESP 3.2.5.1.4: If the Offset field is not set to 0, the value MUST be ignored
* assert(Offset == 0);
*/
WLog_Print(serial->log, WLOG_DEBUG, "reading %d bytes from %s", Length,
WLog_Print(serial->log, WLOG_DEBUG, "reading %"PRIu32" bytes from %s", Length,
serial->device.name);
/* FIXME: CommReadFile to be replaced by ReadFile */
@ -257,12 +257,12 @@ static UINT serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
else
{
WLog_Print(serial->log, WLOG_DEBUG,
"read failure to %s, nbRead=%ld, last-error: 0x%lX", serial->device.name,
"read failure to %s, nbRead=%"PRIu32", last-error: 0x%08"PRIX32"", serial->device.name,
nbRead, GetLastError());
irp->IoStatus = _GetLastErrorToIoStatus(serial);
}
WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes read from %s", nbRead,
WLog_Print(serial->log, WLOG_DEBUG, "%"PRIu32" bytes read from %s", nbRead,
serial->device.name);
error_handle:
Stream_Write_UINT32(irp->output, nbRead); /* Length (4 bytes) */
@ -297,7 +297,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp)
* Using a serial printer, noticed though this field could be
* set.
*/
WLog_Print(serial->log, WLOG_DEBUG, "writing %d bytes to %s", Length,
WLog_Print(serial->log, WLOG_DEBUG, "writing %"PRIu32" bytes to %s", Length,
serial->device.name);
/* FIXME: CommWriteFile to be replaced by WriteFile */
@ -309,12 +309,12 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp)
else
{
WLog_Print(serial->log, WLOG_DEBUG,
"write failure to %s, nbWritten=%ld, last-error: 0x%lX", serial->device.name,
"write failure to %s, nbWritten=%"PRIu32", last-error: 0x%08"PRIX32"", serial->device.name,
nbWritten, GetLastError());
irp->IoStatus = _GetLastErrorToIoStatus(serial);
}
WLog_Print(serial->log, WLOG_DEBUG, "%lu bytes written to %s", (unsigned long) nbWritten,
WLog_Print(serial->log, WLOG_DEBUG, "%"PRIu32" bytes written to %s", nbWritten,
serial->device.name);
Stream_Write_UINT32(irp->output, nbWritten); /* Length (4 bytes) */
Stream_Write_UINT8(irp->output, 0); /* Padding (1 byte) */
@ -358,20 +358,20 @@ static UINT serial_process_irp_device_control(SERIAL_DEVICE* serial, IRP* irp)
Stream_Read(irp->input, InputBuffer, InputBufferLength);
WLog_Print(serial->log, WLOG_DEBUG,
"CommDeviceIoControl: CompletionId=%d, IoControlCode=[0x%X] %s",
"CommDeviceIoControl: CompletionId=%"PRIu32", IoControlCode=[0x%"PRIX32"] %s",
irp->CompletionId, IoControlCode, _comm_serial_ioctl_name(IoControlCode));
/* FIXME: CommDeviceIoControl to be replaced by DeviceIoControl() */
if (CommDeviceIoControl(serial->hComm, IoControlCode, InputBuffer,
InputBufferLength, OutputBuffer, OutputBufferLength, &BytesReturned, NULL))
{
/* WLog_Print(serial->log, WLOG_DEBUG, "CommDeviceIoControl: CompletionId=%d, IoControlCode=[0x%X] %s done", irp->CompletionId, IoControlCode, _comm_serial_ioctl_name(IoControlCode)); */
/* WLog_Print(serial->log, WLOG_DEBUG, "CommDeviceIoControl: CompletionId=%"PRIu32", IoControlCode=[0x%"PRIX32"] %s done", irp->CompletionId, IoControlCode, _comm_serial_ioctl_name(IoControlCode)); */
irp->IoStatus = STATUS_SUCCESS;
}
else
{
WLog_Print(serial->log, WLOG_DEBUG,
"CommDeviceIoControl failure: IoControlCode=[0x%X] %s, last-error: 0x%lX",
"CommDeviceIoControl failure: IoControlCode=[0x%"PRIX32"] %s, last-error: 0x%08"PRIX32"",
IoControlCode, _comm_serial_ioctl_name(IoControlCode), GetLastError());
irp->IoStatus = _GetLastErrorToIoStatus(serial);
}
@ -419,7 +419,7 @@ static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp)
{
UINT error = CHANNEL_RC_OK;
WLog_Print(serial->log, WLOG_DEBUG,
"IRP MajorFunction: 0x%04X MinorFunction: 0x%04X\n",
"IRP MajorFunction: 0x%08"PRIX32" MinorFunction: 0x%08"PRIX32"\n",
irp->MajorFunction, irp->MinorFunction);
switch (irp->MajorFunction)
@ -434,7 +434,7 @@ static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp)
case IRP_MJ_READ:
if ((error = serial_process_irp_read(serial, irp)))
WLog_ERR(TAG, "serial_process_irp_read failed with error %u!", error);
WLog_ERR(TAG, "serial_process_irp_read failed with error %"PRIu32"!", error);
break;
@ -444,7 +444,7 @@ static UINT serial_process_irp(SERIAL_DEVICE* serial, IRP* irp)
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 %u!",
WLog_ERR(TAG, "serial_process_irp_device_control failed with error %"PRIu32"!",
error);
break;
@ -466,7 +466,7 @@ static void* irp_thread_func(void* arg)
/* 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 %u", error);
WLog_ERR(TAG, "serial_process_irp failed with error %"PRIu32"", error);
goto error_out;
}
@ -528,7 +528,7 @@ static void create_irp_thread(SERIAL_DEVICE* serial, IRP* irp)
if (waitResult == WAIT_OBJECT_0)
{
/* terminating thread */
/* WLog_Print(serial->log, WLOG_DEBUG, "IRP thread with CompletionId=%d naturally died", id); */
/* WLog_Print(serial->log, WLOG_DEBUG, "IRP thread with CompletionId=%"PRIuz" naturally died", id); */
CloseHandle(irpThread);
ListDictionary_Remove(serial->IrpThreads, (void*)id);
serial->IrpThreadToBeTerminatedCount--;
@ -537,7 +537,7 @@ static void create_irp_thread(SERIAL_DEVICE* serial, IRP* irp)
{
/* unexpected thread state */
WLog_Print(serial->log, WLOG_WARN,
"WaitForSingleObject, got an unexpected result=0x%lX\n", waitResult);
"WaitForSingleObject, got an unexpected result=0x%"PRIX32"\n", waitResult);
assert(FALSE);
}
@ -546,7 +546,7 @@ static void create_irp_thread(SERIAL_DEVICE* serial, IRP* irp)
if (serial->IrpThreadToBeTerminatedCount > 0)
{
WLog_Print(serial->log, WLOG_DEBUG, "%d IRP thread(s) not yet terminated",
WLog_Print(serial->log, WLOG_DEBUG, "%"PRIu32" IRP thread(s) not yet terminated",
serial->IrpThreadToBeTerminatedCount);
Sleep(1); /* 1 ms */
}
@ -570,7 +570,7 @@ static void create_irp_thread(SERIAL_DEVICE* serial, IRP* irp)
{
/* Thread still alived <=> Request still pending */
WLog_Print(serial->log, WLOG_DEBUG,
"IRP recall: IRP with the CompletionId=%d not yet completed!",
"IRP recall: IRP with the CompletionId=%"PRIu32" not yet completed!",
irp->CompletionId);
assert(FALSE); /* unimplemented */
/* TODO: asserts that previousIrpThread handles well
@ -665,7 +665,7 @@ static void terminate_pending_irp_threads(SERIAL_DEVICE* serial)
}
CloseHandle(irpThread);
WLog_Print(serial->log, WLOG_DEBUG, "IRP thread terminated, CompletionId %d",
WLog_Print(serial->log, WLOG_DEBUG, "IRP thread terminated, CompletionId %"PRIuz"",
id);
}
@ -760,7 +760,7 @@ static UINT serial_free(DEVICE* device)
if (WaitForSingleObject(serial->MainThread, INFINITE) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -922,7 +922,7 @@ UINT DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
if ((error = pEntryPoints->RegisterDevice(pEntryPoints->devman,
(DEVICE*) serial)))
{
WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %u!", error);
WLog_ERR(TAG, "EntryPoints->RegisterDevice failed with error %"PRIu32"!", error);
goto error_out;
}

View File

@ -56,7 +56,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext)
if (waitStatus == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -65,7 +65,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext)
if (waitStatus == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -87,7 +87,7 @@ void* smartcard_context_thread(SMARTCARD_CONTEXT* pContext)
{
if ((status = smartcard_irp_device_control_call(smartcard, operation)))
{
WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %u",
WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %"PRIu32"",
status);
break;
}
@ -162,7 +162,7 @@ void smartcard_context_free(SMARTCARD_CONTEXT* pContext)
if (MessageQueue_PostQuit(pContext->IrpQueue, 0)
&& (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED))
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
CloseHandle(pContext->thread);
MessageQueue_Free(pContext->IrpQueue);
@ -237,7 +237,7 @@ static void smartcard_release_all_contexts(SMARTCARD_DEVICE* smartcard)
if (MessageQueue_PostQuit(pContext->IrpQueue, 0)
&& (WaitForSingleObject(pContext->thread, INFINITE) == WAIT_FAILED))
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
CloseHandle(pContext->thread);
MessageQueue_Free(pContext->IrpQueue);
@ -273,7 +273,7 @@ static UINT smartcard_free(DEVICE* device)
&& (WaitForSingleObject(smartcard->thread, INFINITE) == WAIT_FAILED))
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
@ -465,7 +465,7 @@ UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
{
if ((status = smartcard_irp_device_control_call(smartcard, operation)))
{
WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %ld!",
WLog_ERR(TAG, "smartcard_irp_device_control_call failed with error %"PRId32"!",
status);
return (UINT32)status;
}
@ -493,7 +493,7 @@ UINT smartcard_process_irp(SMARTCARD_DEVICE* smartcard, IRP* irp)
else
{
WLog_ERR(TAG,
"Unexpected SmartCard IRP: MajorFunction 0x%08X MinorFunction: 0x%08X",
"Unexpected SmartCard IRP: MajorFunction 0x%08"PRIX32" MinorFunction: 0x%08"PRIX32"",
irp->MajorFunction, irp->MinorFunction);
irp->IoStatus = (UINT32)STATUS_NOT_SUPPORTED;
@ -528,7 +528,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -537,7 +537,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -559,7 +559,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
goto out;
}
@ -577,7 +577,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
goto out;
}
@ -587,7 +587,7 @@ static void* smartcard_thread_func(void* arg)
if ((error = smartcard_complete_irp(smartcard, irp)))
{
WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error);
WLog_ERR(TAG, "smartcard_complete_irp failed with error %"PRIu32"!", error);
goto out;
}
}
@ -602,7 +602,7 @@ static void* smartcard_thread_func(void* arg)
{
if ((error = smartcard_process_irp(smartcard, irp)))
{
WLog_ERR(TAG, "smartcard_process_irp failed with error %u!", error);
WLog_ERR(TAG, "smartcard_process_irp failed with error %"PRIu32"!", error);
goto out;
}
}
@ -613,7 +613,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -630,7 +630,7 @@ static void* smartcard_thread_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -646,7 +646,7 @@ static void* smartcard_thread_func(void* arg)
goto out;
}
WLog_ERR(TAG, "smartcard_complete_irp failed with error %u!", error);
WLog_ERR(TAG, "smartcard_complete_irp failed with error %"PRIu32"!", error);
goto out;
}
}

View File

@ -202,7 +202,7 @@ static LONG smartcard_EstablishContext_Decode(SMARTCARD_DEVICE* smartcard, SMART
if ((status = smartcard_unpack_establish_context_call(smartcard, irp->input, call)))
{
WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_establish_context_call failed with error %"PRId32"", status);
return status;
}
smartcard_trace_establish_context_call(smartcard, call);
@ -236,7 +236,7 @@ static LONG smartcard_EstablishContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCA
}
else
{
WLog_ERR(TAG, "SCardEstablishContext failed with error %ld", status);
WLog_ERR(TAG, "SCardEstablishContext failed with error %"PRId32"", status);
return status;
}
@ -244,7 +244,7 @@ static LONG smartcard_EstablishContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCA
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_establish_context_return failed with error %"PRId32"", status);
return status;
}
@ -260,7 +260,7 @@ static LONG smartcard_ReleaseContext_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %"PRId32"", status);
smartcard_trace_context_call(smartcard, call, "ReleaseContext");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -282,7 +282,7 @@ static LONG smartcard_ReleaseContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD
}
else
{
WLog_ERR(TAG, "SCardReleaseContext failed with error %ld", status);
WLog_ERR(TAG, "SCardReleaseContext failed with error %"PRId32"", status);
return status;
}
@ -299,7 +299,7 @@ static LONG smartcard_IsValidContext_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %"PRId32"", status);
smartcard_trace_context_call(smartcard, call, "IsValidContext");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -311,7 +311,7 @@ static LONG smartcard_IsValidContext_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD
Long_Return ret;
if ((status = ret.ReturnCode = SCardIsValidContext(operation->hContext)))
{
WLog_ERR(TAG, "SCardIsValidContext failed with error %ld", status);
WLog_ERR(TAG, "SCardIsValidContext failed with error %"PRId32"", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "IsValidContext");
@ -327,7 +327,7 @@ static LONG smartcard_ListReadersA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %"PRId32"", status);
smartcard_trace_list_readers_call(smartcard, call, FALSE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -356,14 +356,14 @@ static LONG smartcard_ListReadersA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O
if (status)
{
WLog_ERR(TAG, "SCardListReadersA failed with error %ld", status);
WLog_ERR(TAG, "SCardListReadersA failed with error %"PRId32"", 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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %"PRId32"", status);
return status;
}
@ -385,7 +385,7 @@ static LONG smartcard_ListReadersW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_list_readers_call failed with error %"PRId32"", status);
smartcard_trace_list_readers_call(smartcard, call, TRUE);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
@ -417,7 +417,7 @@ static LONG smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O
if (status)
{
WLog_ERR(TAG, "SCardListReadersW failed with error %ld", status);
WLog_ERR(TAG, "SCardListReadersW failed with error %"PRId32"", status);
return status;
}
@ -425,7 +425,7 @@ static LONG smartcard_ListReadersW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_O
if ((status = smartcard_pack_list_readers_return(smartcard, irp->output, &ret)))
{
WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %ld", status);
WLog_ERR(TAG, "smartcard_pack_list_readers_return failed with error %"PRId32"", status);
return status;
}
@ -448,7 +448,7 @@ static LONG smartcard_GetStatusChangeA_Decode(SMARTCARD_DEVICE* smartcard, SMART
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_get_status_change_a_call failed with error %"PRId32"", status);
return status;
}
@ -492,7 +492,7 @@ static LONG smartcard_GetStatusChangeA_Call(SMARTCARD_DEVICE* smartcard, SMARTCA
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %"PRId32"", status);
return status;
}
@ -520,7 +520,7 @@ static LONG smartcard_GetStatusChangeW_Decode(SMARTCARD_DEVICE* smartcard, SMART
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_get_status_change_w_call failed with error %"PRId32"", status);
smartcard_trace_get_status_change_w_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -559,7 +559,7 @@ static LONG smartcard_GetStatusChangeW_Call(SMARTCARD_DEVICE* smartcard, SMARTCA
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %"PRId32"", status);
return status;
}
@ -587,7 +587,7 @@ static LONG smartcard_Cancel_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_context_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_context_call failed with error %"PRId32"", status);
smartcard_trace_context_call(smartcard, call, "Cancel");
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -600,7 +600,7 @@ static LONG smartcard_Cancel_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATI
if ((status = ret.ReturnCode = SCardCancel(operation->hContext)))
{
WLog_ERR(TAG, "SCardCancel failed with error %ld", status);
WLog_ERR(TAG, "SCardCancel failed with error %"PRId32"", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "Cancel");
@ -616,7 +616,7 @@ static LONG smartcard_ConnectA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_connect_a_call failed with error %"PRId32"", status);
smartcard_trace_connect_a_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext));
return status;
@ -644,14 +644,14 @@ static LONG smartcard_ConnectA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA
if (status)
{
WLog_ERR(TAG, "SCardConnectA failed with error %ld", status);
WLog_ERR(TAG, "SCardConnectA failed with error %"PRId32"", status);
return status;
}
if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret)))
{
WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status);
WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %"PRId32"", status);
return status;
}
@ -669,7 +669,7 @@ static LONG smartcard_ConnectW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_connect_w_call failed with error %"PRId32"", status);
smartcard_trace_connect_w_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->Common.hContext));
@ -699,13 +699,13 @@ static LONG smartcard_ConnectW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA
if (status)
{
WLog_ERR(TAG, "SCardConnectW failed with error %ld", status);
WLog_ERR(TAG, "SCardConnectW failed with error %"PRId32"", status);
return status;
}
if ((status = smartcard_pack_connect_return(smartcard, irp->output, &ret)))
{
WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %ld", status);
WLog_ERR(TAG, "smartcard_pack_connect_return failed with error %"PRId32"", status);
return status;
}
@ -723,7 +723,7 @@ static LONG smartcard_Reconnect_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_reconnect_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_reconnect_call failed with error %"PRId32"", 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));
@ -740,7 +740,7 @@ static LONG smartcard_Reconnect_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_reconnect_return failed with error %"PRId32"", status);
return status;
}
@ -756,7 +756,7 @@ static LONG smartcard_Disconnect_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_O
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %"PRId32"", 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));
@ -769,7 +769,7 @@ static LONG smartcard_Disconnect_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE
Long_Return ret;
if ((status = ret.ReturnCode = SCardDisconnect(operation->hCard, call->dwDisposition)))
{
WLog_ERR(TAG, "SCardDisconnect failed with error %ld", status);
WLog_ERR(TAG, "SCardDisconnect failed with error %"PRId32"", status);
return status;
}
smartcard_trace_long_return(smartcard, &ret, "Disconnect");
@ -786,7 +786,7 @@ static LONG smartcard_BeginTransaction_Decode(SMARTCARD_DEVICE* smartcard, SMART
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %"PRId32"", 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));
@ -798,7 +798,7 @@ static LONG smartcard_BeginTransaction_Call(SMARTCARD_DEVICE* smartcard, SMARTCA
Long_Return ret;
if ((ret.ReturnCode = SCardBeginTransaction(operation->hCard)))
{
WLog_ERR(TAG, "SCardBeginTransaction failed with error %ld", ret.ReturnCode);
WLog_ERR(TAG, "SCardBeginTransaction failed with error %"PRId32"", ret.ReturnCode);
return ret.ReturnCode;
}
smartcard_trace_long_return(smartcard, &ret, "BeginTransaction");
@ -814,7 +814,7 @@ static LONG smartcard_EndTransaction_Decode(SMARTCARD_DEVICE* smartcard, SMARTCA
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_hcard_and_disposition_call failed with error %"PRId32"", 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));
@ -826,7 +826,7 @@ static LONG smartcard_EndTransaction_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD
Long_Return ret;
if ((ret.ReturnCode = SCardEndTransaction(operation->hCard, call->dwDisposition)))
{
WLog_ERR(TAG, "SCardEndTransaction failed with error %ld", ret.ReturnCode);
WLog_ERR(TAG, "SCardEndTransaction failed with error %"PRId32"", ret.ReturnCode);
return ret.ReturnCode;
}
smartcard_trace_long_return(smartcard, &ret, "EndTransaction");
@ -842,7 +842,7 @@ static LONG smartcard_State_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_state_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_state_call failed with error %"PRId32"", 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;
@ -857,7 +857,7 @@ static LONG smartcard_State_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERATIO
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_state_return failed with error %"PRId32"", status);
return status;
}
@ -873,7 +873,7 @@ static LONG smartcard_StatusA_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_status_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %"PRId32"", 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));
@ -904,7 +904,7 @@ static LONG smartcard_StatusA_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_status_return failed with error %"PRId32"", status);
return status;
}
@ -923,7 +923,7 @@ static LONG smartcard_StatusW_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_status_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_status_call failed with error %"PRId32"", 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));
@ -950,7 +950,7 @@ static LONG smartcard_StatusW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_status_return failed with error %"PRId32"", status);
return status;
}
@ -969,7 +969,7 @@ static LONG smartcard_Transmit_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPE
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_transmit_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_transmit_call failed with error %"PRId32"", status);
smartcard_trace_transmit_call(smartcard, call);
@ -1007,7 +1007,7 @@ static LONG smartcard_Transmit_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERA
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_transmit_return failed with error %"PRId32"", status);
return status;
}
@ -1028,7 +1028,7 @@ static LONG smartcard_Control_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
return STATUS_NO_MEMORY;
if ((status = smartcard_unpack_control_call(smartcard, irp->input, call)))
WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_control_call failed with error %"PRId32"", 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));
@ -1053,7 +1053,7 @@ static LONG smartcard_Control_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_control_return failed with error %"PRId32"", status);
return status;
}
@ -1072,7 +1072,7 @@ static LONG smartcard_GetAttrib_Decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_get_attrib_call failed with error %"PRId32"", 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));
@ -1113,7 +1113,7 @@ static LONG smartcard_GetAttrib_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
if (ret.ReturnCode)
{
WLog_WARN(TAG, "SCardGetAttrib: %s (0x%08X) cbAttrLen: %d",
WLog_WARN(TAG, "SCardGetAttrib: %s (0x%08"PRIX32") cbAttrLen: %"PRIu32"",
SCardGetAttributeString(call->dwAttrId), call->dwAttrId, call->cbAttrLen);
Stream_Zero(irp->output, 256);
@ -1123,7 +1123,7 @@ static LONG smartcard_GetAttrib_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPER
if ((status = smartcard_pack_get_attrib_return(smartcard, irp->output, &ret)))
{
WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %ld", status);
WLog_ERR(TAG, "smartcard_pack_get_attrib_return failed with error %"PRId32"", status);
return status;
}
@ -1140,8 +1140,8 @@ static LONG smartcard_AccessStartedEvent_Decode(SMARTCARD_DEVICE* smartcard, SMA
if (Stream_GetRemainingLength(irp->input) < 4)
{
WLog_WARN(TAG, "AccessStartedEvent is too short: %d",
(int) Stream_GetRemainingLength(irp->input));
WLog_WARN(TAG, "AccessStartedEvent is too short: %"PRIuz"",
Stream_GetRemainingLength(irp->input));
return SCARD_F_INTERNAL_ERROR;
}
@ -1169,7 +1169,7 @@ static LONG smartcard_LocateCardsByATRA_Decode(SMARTCARD_DEVICE* smartcard, SMAR
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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_locate_cards_by_atr_a_call failed with error %"PRId32"", status);
smartcard_trace_locate_cards_by_atr_a_call(smartcard, call);
operation->hContext = smartcard_scard_context_native_from_redir(smartcard, &(call->hContext));
return status;
@ -1249,7 +1249,7 @@ static LONG smartcard_LocateCardsByATRA_Call(SMARTCARD_DEVICE* smartcard, SMARTC
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 %ld", status);
WLog_ERR(TAG, "smartcard_pack_get_status_change_return failed with error %"PRId32"", status);
return status;
}
@ -1287,8 +1287,8 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_
if (Stream_GetRemainingLength(irp->input) < 32)
{
WLog_WARN(TAG, "Device Control Request is too short: %lu",
(unsigned long) Stream_GetRemainingLength(irp->input));
WLog_WARN(TAG, "Device Control Request is too short: %"PRIuz"",
Stream_GetRemainingLength(irp->input));
return SCARD_F_INTERNAL_ERROR;
}
@ -1300,13 +1300,13 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_
if (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));
WLog_WARN(TAG, "InputBufferLength mismatch: Actual: %"PRIuz" Expected: %"PRIuz"",
Stream_Length(irp->input),
Stream_GetPosition(irp->input) + inputBufferLength);
return SCARD_F_INTERNAL_ERROR;
}
WLog_DBG(TAG, "%s (0x%08X) FileId: %d CompletionId: %d",
WLog_DBG(TAG, "%s (0x%08"PRIX32") FileId: %"PRIu32" CompletionId: %"PRIu32"",
smartcard_get_ioctl_string(ioControlCode, TRUE),
ioControlCode, irp->FileId, irp->CompletionId);
@ -1315,13 +1315,13 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_
{
if ((status = smartcard_unpack_common_type_header(smartcard, irp->input)))
{
WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %ld", status);
WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %"PRId32"", 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 %ld", status);
WLog_ERR(TAG, "smartcard_unpack_common_type_header failed with error %"PRId32"", status);
return SCARD_F_INTERNAL_ERROR;
}
}
@ -1645,23 +1645,23 @@ LONG smartcard_irp_device_control_decode(SMARTCARD_DEVICE* smartcard, SMARTCARD_
Stream_GetPosition(irp->input) - offset, 8);
}
if (((size_t) Stream_GetPosition(irp->input)) < Stream_Length(irp->input))
if (Stream_GetPosition(irp->input) < Stream_Length(irp->input))
{
UINT32 difference;
difference = (int)(Stream_Length(irp->input) - Stream_GetPosition(irp->input));
WLog_WARN(TAG, "IRP was not fully parsed %s (0x%08X): Actual: %d, Expected: %d, Difference: %d",
SIZE_T difference;
difference = Stream_Length(irp->input) - Stream_GetPosition(irp->input);
WLog_WARN(TAG, "IRP was not fully parsed %s (0x%08"PRIX32"): Actual: %"PRIuz", Expected: %"PRIuz", Difference: %"PRIuz"",
smartcard_get_ioctl_string(ioControlCode, TRUE), ioControlCode,
(int) Stream_GetPosition(irp->input), (int) Stream_Length(irp->input), difference);
Stream_GetPosition(irp->input), Stream_Length(irp->input), difference);
winpr_HexDump(TAG, WLOG_WARN, Stream_Pointer(irp->input), difference);
}
if (((size_t) Stream_GetPosition(irp->input)) > Stream_Length(irp->input))
if (Stream_GetPosition(irp->input) > Stream_Length(irp->input))
{
UINT32 difference;
difference = (int)(Stream_GetPosition(irp->input) - Stream_Length(irp->input));
WLog_WARN(TAG, "IRP was parsed beyond its end %s (0x%08X): Actual: %d, Expected: %d, Difference: %d",
SIZE_T difference;
difference = Stream_GetPosition(irp->input) - Stream_Length(irp->input);
WLog_WARN(TAG, "IRP was parsed beyond its end %s (0x%08"PRIX32"): Actual: %"PRIuz", Expected: %"PRIuz", Difference: %"PRIuz"",
smartcard_get_ioctl_string(ioControlCode, TRUE), ioControlCode,
(int) Stream_GetPosition(irp->input), (int) Stream_Length(irp->input), difference);
Stream_GetPosition(irp->input), Stream_Length(irp->input), difference);
}
if (status != SCARD_S_SUCCESS)
@ -1921,7 +1921,7 @@ LONG smartcard_irp_device_control_call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP
if ((result != SCARD_S_SUCCESS) && (result != SCARD_E_TIMEOUT) &&
(result != SCARD_E_NO_READERS_AVAILABLE) && (result != SCARD_E_NO_SERVICE))
{
WLog_WARN(TAG, "IRP failure: %s (0x%08X), status: %s (0x%08X)",
WLog_WARN(TAG, "IRP failure: %s (0x%08"PRIX32"), status: %s (0x%08"PRIX32")",
smartcard_get_ioctl_string(ioControlCode, TRUE), ioControlCode,
SCardGetErrorString(result), result);
}
@ -1933,7 +1933,7 @@ LONG smartcard_irp_device_control_call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP
/* NTSTATUS error */
irp->IoStatus = (UINT32)result;
Stream_SetPosition(irp->output, RDPDR_DEVICE_IO_RESPONSE_LENGTH);
WLog_WARN(TAG, "IRP failure: %s (0x%08X), ntstatus: 0x%08X",
WLog_WARN(TAG, "IRP failure: %s (0x%08"PRIX32"), ntstatus: 0x%08"PRIX32"",
smartcard_get_ioctl_string(ioControlCode, TRUE), ioControlCode, result);
}
@ -1946,12 +1946,12 @@ LONG smartcard_irp_device_control_call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OP
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 %ld", result);
WLog_ERR(TAG, "smartcard_pack_common_type_header failed with error %"PRId32"", 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 %ld", result);
WLog_ERR(TAG, "smartcard_pack_private_type_header failed with error %"PRId32"", result);
return result;
}

File diff suppressed because it is too large Load Diff

View File

@ -123,14 +123,14 @@ static BOOL tsmf_alsa_set_format(ITSMFAudioDevice *audio,
snd_pcm_sw_params(alsa->out_handle, sw_params);
snd_pcm_sw_params_free(sw_params);
snd_pcm_prepare(alsa->out_handle);
DEBUG_TSMF("sample_rate %d channels %d bits_per_sample %d",
DEBUG_TSMF("sample_rate %"PRIu32" channels %"PRIu32" bits_per_sample %"PRIu32"",
sample_rate, channels, bits_per_sample);
DEBUG_TSMF("hardware buffer %d frames", (int)frames);
DEBUG_TSMF("hardware buffer %lu frames", frames);
if((alsa->actual_rate != alsa->source_rate) ||
(alsa->actual_channels != alsa->source_channels))
{
DEBUG_TSMF("actual rate %d / channel %d is different "
"from source rate %d / channel %d, resampling required.",
DEBUG_TSMF("actual rate %"PRIu32" / channel %"PRIu32" is different "
"from source rate %"PRIu32" / channel %"PRIu32", resampling required.",
alsa->actual_rate, alsa->actual_channels,
alsa->source_rate, alsa->source_channels);
}
@ -148,7 +148,7 @@ static BOOL tsmf_alsa_play(ITSMFAudioDevice *audio, BYTE *data, UINT32 data_size
int rbytes_per_frame;
int sbytes_per_frame;
TSMFAlsaAudioDevice *alsa = (TSMFAlsaAudioDevice *) audio;
DEBUG_TSMF("data_size %d", data_size);
DEBUG_TSMF("data_size %"PRIu32"", data_size);
if(alsa->out_handle)
{
sbytes_per_frame = alsa->source_channels * alsa->bytes_per_sample;
@ -164,7 +164,7 @@ static BOOL tsmf_alsa_play(ITSMFAudioDevice *audio, BYTE *data, UINT32 data_size
alsa->source_channels, alsa->source_rate, data_size / sbytes_per_frame,
alsa->actual_channels, alsa->actual_rate);
frames = alsa->dsp_context->resampled_frames;
DEBUG_TSMF("resampled %d frames at %d to %d frames at %d",
DEBUG_TSMF("resampled %"PRIu32" frames at %"PRIu32" to %d frames at %"PRIu32"",
data_size / sbytes_per_frame, alsa->source_rate, frames, alsa->actual_rate);
data_size = frames * rbytes_per_frame;
src = alsa->dsp_context->resampled_buffer;

View File

@ -313,12 +313,12 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE *data, UI
#endif
if (len < 0)
{
WLog_ERR(TAG, "data_size %d, avcodec_decode_video failed (%d)", data_size, len);
WLog_ERR(TAG, "data_size %"PRIu32", avcodec_decode_video failed (%d)", data_size, len);
ret = FALSE;
}
else if (!decoded)
{
WLog_ERR(TAG, "data_size %d, no frame is decoded.", data_size);
WLog_ERR(TAG, "data_size %"PRIu32", no frame is decoded.", data_size);
ret = FALSE;
}
else
@ -362,11 +362,11 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE *data, UI
BYTE *dst;
int dst_offset;
#if 0
WLog_DBG(TAG, ("tsmf_ffmpeg_decode_audio: data_size %d", data_size));
WLog_DBG(TAG, ("tsmf_ffmpeg_decode_audio: data_size %"PRIu32"", data_size));
int i;
for(i = 0; i < data_size; i++)
{
WLog_DBG(TAG, ("%02X ", data[i]));
WLog_DBG(TAG, ("%02"PRIX8"", data[i]));
if (i % 16 == 15)
WLog_DBG(TAG, ("\n"));
}
@ -452,7 +452,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE *data, UI
/* move the aligned decoded data to original place */
memmove(mdecoder->decoded_data, mdecoder->decoded_data + dst_offset, mdecoder->decoded_size);
}
DEBUG_TSMF("data_size %d decoded_size %d",
DEBUG_TSMF("data_size %"PRIu32" decoded_size %"PRIu32"",
data_size, mdecoder->decoded_size);
return TRUE;
}

View File

@ -104,14 +104,14 @@ static void tsmf_gstreamer_need_data(GstAppSrc *src, guint length, gpointer user
{
TSMFGstreamerDecoder* mdecoder = user_data;
(void) mdecoder;
DEBUG_TSMF("%s length=%lu", get_type(mdecoder), length);
DEBUG_TSMF("%s length=%u", get_type(mdecoder), length);
}
static gboolean tsmf_gstreamer_seek_data(GstAppSrc *src, guint64 offset, gpointer user_data)
{
TSMFGstreamerDecoder* mdecoder = user_data;
(void) mdecoder;
DEBUG_TSMF("%s offset=%llu", get_type(mdecoder), offset);
DEBUG_TSMF("%s offset=%"PRIu64"", get_type(mdecoder), offset);
return TRUE;
}
@ -127,7 +127,7 @@ static BOOL tsmf_gstreamer_change_volume(ITSMFDecoder* decoder, UINT32 newVolume
return TRUE;
mdecoder->gstMuted = (BOOL) muted;
DEBUG_TSMF("mute=[%d]", mdecoder->gstMuted);
DEBUG_TSMF("mute=[%"PRId32"]", mdecoder->gstMuted);
mdecoder->gstVolume = (double) newVolume / (double) 10000;
DEBUG_TSMF("gst_new_vol=[%f]", mdecoder->gstVolume);
@ -499,7 +499,7 @@ static BOOL tsmf_gstreamer_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
if (media_type->ExtraDataSize > 0)
{
GstBuffer *buffer;
DEBUG_TSMF("Extra data available (%d)", media_type->ExtraDataSize);
DEBUG_TSMF("Extra data available (%"PRIu32")", media_type->ExtraDataSize);
buffer = tsmf_get_buffer_from_data(media_type->ExtraData, media_type->ExtraDataSize);
if (!buffer)
@ -511,7 +511,7 @@ static BOOL tsmf_gstreamer_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
gst_caps_set_simple(mdecoder->gst_caps, "codec_data", GST_TYPE_BUFFER, buffer, NULL);
}
DEBUG_TSMF("%p format '%s'", mdecoder, gst_caps_to_string(mdecoder->gst_caps));
DEBUG_TSMF("%p format '%s'", (void*) mdecoder, gst_caps_to_string(mdecoder->gst_caps));
tsmf_platform_set_format(mdecoder);
/* Create the pipeline... */
@ -693,8 +693,8 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
* We don't expect to block here often, since the pipeline should
* have more than enough buffering.
*/
DEBUG_TSMF("%s. Start:(%lu) End:(%lu) Duration:(%d) Last Start:(%lu)",
get_type(mdecoder), start_time, end_time, (int)duration,
DEBUG_TSMF("%s. Start:(%"PRIu64") End:(%"PRIu64") Duration:(%"PRIu64") Last Start:(%"PRIu64")",
get_type(mdecoder), start_time, end_time, duration,
mdecoder->last_sample_start_time);
if (mdecoder->shutdown)
@ -722,7 +722,7 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
if (gst_buf == NULL)
{
WLog_ERR(TAG, "tsmf_get_buffer_from_data(%p, %d) failed.", data, data_size);
WLog_ERR(TAG, "tsmf_get_buffer_from_data(%p, %"PRIu32") failed.", (void*) data, data_size);
return FALSE;
}
@ -752,7 +752,7 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
if (mdecoder->pipeline_start_time_valid)
{
DEBUG_TSMF("%s start time %lu", get_type(mdecoder), start_time);
DEBUG_TSMF("%s start time %"PRIu64"", get_type(mdecoder), start_time);
/* Adjusted the condition for a seek to be based on start time only
* WMV1 and WMV2 files in particular have bad end time and duration values
@ -768,10 +768,10 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
/* If the start_time is valid and different from the previous start time by more than the seek tolerance, then we have a seek condition */
if (((start_time > maxTime) || (start_time < minTime)) && useTimestamps)
{
DEBUG_TSMF("tsmf_gstreamer_decodeEx: start_time=[%lu] > last_sample_start_time=[%lu] OR ", start_time, mdecoder->last_sample_start_time);
DEBUG_TSMF("tsmf_gstreamer_decodeEx: start_time=[%lu] < last_sample_start_time=[%lu] with", start_time, mdecoder->last_sample_start_time);
DEBUG_TSMF("tsmf_gstreamer_decodeEx: start_time=[%"PRIu64"] > last_sample_start_time=[%"PRIu64"] OR ", start_time, mdecoder->last_sample_start_time);
DEBUG_TSMF("tsmf_gstreamer_decodeEx: start_time=[%"PRIu64"] < last_sample_start_time=[%"PRIu64"] with", start_time, mdecoder->last_sample_start_time);
DEBUG_TSMF("tsmf_gstreamer_decodeEX: a tolerance of more than [%lu] from the last sample", SEEK_TOLERANCE);
DEBUG_TSMF("tsmf_gstreamer_decodeEX: minTime=[%lu] maxTime=[%lu]", minTime, maxTime);
DEBUG_TSMF("tsmf_gstreamer_decodeEX: minTime=[%"PRIu64"] maxTime=[%"PRIu64"]", minTime, maxTime);
mdecoder->seeking = TRUE;
@ -783,7 +783,7 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
}
else
{
DEBUG_TSMF("%s start time %lu", get_type(mdecoder), start_time);
DEBUG_TSMF("%s start time %"PRIu64"", get_type(mdecoder), start_time);
/* Always set base/start time to 0. Will use seek offset to translate real buffer times
* back to 0. This allows the video to be started from anywhere and the ability to handle seeks
* without rebuilding the pipeline, etc. since that is costly
@ -834,7 +834,7 @@ static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder* decoder, const BYTE *data, UIN
{
DEBUG_TSMF("%s: state=%s", get_type(mdecoder), gst_element_state_get_name(GST_STATE(mdecoder->pipe)));
DEBUG_TSMF("%s Paused: %i Shutdown: %i Ready: %i", get_type(mdecoder), mdecoder->paused, mdecoder->shutdown, mdecoder->ready);
DEBUG_TSMF("%s Paused: %"PRIi32" Shutdown: %i Ready: %"PRIi32"", get_type(mdecoder), mdecoder->paused, mdecoder->shutdown, mdecoder->ready);
if (!mdecoder->paused && !mdecoder->shutdown && mdecoder->ready)
tsmf_gstreamer_pipeline_set_state(mdecoder, GST_STATE_PLAYING);
}

View File

@ -160,7 +160,7 @@ static BOOL tsmf_oss_set_format(ITSMFAudioDevice* audio, UINT32 sample_rate, UIN
if (ioctl(oss->pcm_handle, SNDCTL_DSP_SETFRAGMENT, &tmp) == -1)
OSS_LOG_ERR("SNDCTL_DSP_SETFRAGMENT failed", errno);
DEBUG_TSMF("sample_rate %d channels %d bits_per_sample %d",
DEBUG_TSMF("sample_rate %"PRIu32" channels %"PRIu32" bits_per_sample %"PRIu32"",
sample_rate, channels, bits_per_sample);
return TRUE;
}
@ -170,7 +170,7 @@ static BOOL tsmf_oss_play(ITSMFAudioDevice* audio, BYTE* data, UINT32 data_size)
int status;
UINT32 offset;
TSMFOssAudioDevice* oss = (TSMFOssAudioDevice*)audio;
DEBUG_TSMF("tsmf_oss_play: data_size %d", data_size);
DEBUG_TSMF("tsmf_oss_play: data_size %"PRIu32"", data_size);
if (oss == NULL || oss->pcm_handle == -1)
return FALSE;

View File

@ -56,11 +56,11 @@ static void tsmf_pulse_context_state_callback(pa_context *context, void *userdat
break;
case PA_CONTEXT_FAILED:
case PA_CONTEXT_TERMINATED:
DEBUG_TSMF("state %d", (int)state);
DEBUG_TSMF("state %d", state);
pa_threaded_mainloop_signal(pulse->mainloop, 0);
break;
default:
DEBUG_TSMF("state %d", (int)state);
DEBUG_TSMF("state %d", state);
break;
}
}
@ -169,11 +169,11 @@ static void tsmf_pulse_stream_state_callback(pa_stream *stream, void *userdata)
break;
case PA_STREAM_FAILED:
case PA_STREAM_TERMINATED:
DEBUG_TSMF("state %d", (int)state);
DEBUG_TSMF("state %d", state);
pa_threaded_mainloop_signal(pulse->mainloop, 0);
break;
default:
DEBUG_TSMF("state %d", (int)state);
DEBUG_TSMF("state %d", state);
break;
}
}
@ -181,7 +181,7 @@ static void tsmf_pulse_stream_state_callback(pa_stream *stream, void *userdata)
static void tsmf_pulse_stream_request_callback(pa_stream *stream, size_t length, void *userdata)
{
TSMFPulseAudioDevice *pulse = (TSMFPulseAudioDevice *) userdata;
DEBUG_TSMF("%d", (int) length);
DEBUG_TSMF("%"PRIdz"", length);
pa_threaded_mainloop_signal(pulse->mainloop, 0);
}
@ -267,7 +267,7 @@ static BOOL tsmf_pulse_set_format(ITSMFAudioDevice *audio,
UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample)
{
TSMFPulseAudioDevice *pulse = (TSMFPulseAudioDevice *) audio;
DEBUG_TSMF("sample_rate %d channels %d bits_per_sample %d",
DEBUG_TSMF("sample_rate %"PRIu32" channels %"PRIu32" bits_per_sample %"PRIu32"",
sample_rate, channels, bits_per_sample);
pulse->sample_spec.rate = sample_rate;
pulse->sample_spec.channels = channels;
@ -281,7 +281,7 @@ static BOOL tsmf_pulse_play(ITSMFAudioDevice *audio, BYTE *data, UINT32 data_siz
BYTE *src;
int len;
int ret;
DEBUG_TSMF("data_size %d", data_size);
DEBUG_TSMF("data_size %"PRIu32"", data_size);
if(pulse->stream)
{
pa_threaded_mainloop_lock(pulse->mainloop);

View File

@ -304,7 +304,7 @@ static void tsmf_print_guid(const BYTE* guid)
#ifdef WITH_DEBUG_TSMF
char guidString[37];
snprintf(guidString, sizeof(guidString), "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
snprintf(guidString, sizeof(guidString), "%02"PRIX8"%02"PRIX8"%02"PRIX8"%02"PRIX8"-%02"PRIX8"%02"PRIX8"-%02"PRIX8"%02"PRIX8"-%02"PRIX8"%02"PRIX8"-%02"PRIX8"%02"PRIX8"%02"PRIX8"%02"PRIX8"%02"PRIX8"%02"PRIX8"",
guid[3], guid[2], guid[1], guid[0],
guid[5], guid[4],
guid[7], guid[6],
@ -600,7 +600,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, wStream* s)
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read_UINT32(s, cbFormat);
DEBUG_TSMF("cbFormat %d", cbFormat);
DEBUG_TSMF("cbFormat %"PRIu32"", cbFormat);
#ifdef WITH_DEBUG_TSMF
winpr_HexDump(TAG, WLOG_DEBUG, Stream_Pointer(s), cbFormat);
#endif

View File

@ -52,7 +52,7 @@ UINT tsmf_ifman_rim_exchange_capability_request(TSMF_IFMAN* ifman)
return ERROR_INVALID_DATA;
Stream_Read_UINT32(ifman->input, CapabilityValue);
DEBUG_TSMF("server CapabilityValue %d", CapabilityValue);
DEBUG_TSMF("server CapabilityValue %"PRIu32"", CapabilityValue);
if (!Stream_EnsureRemainingCapacity(ifman->output, 8))
return ERROR_INVALID_DATA;
@ -106,19 +106,19 @@ UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
return ERROR_INVALID_DATA;
Stream_Read_UINT32(ifman->output, v);
DEBUG_TSMF("server protocol version %d", v);
DEBUG_TSMF("server protocol version %"PRIu32"", v);
break;
case 2: /* Supported platform */
if (Stream_GetRemainingLength(ifman->output) < 4)
return ERROR_INVALID_DATA;
Stream_Peek_UINT32(ifman->output, v);
DEBUG_TSMF("server supported platform %d", v);
DEBUG_TSMF("server supported platform %"PRIu32"", v);
/* Claim that we support both MF and DShow platforms. */
Stream_Write_UINT32(ifman->output, MMREDIR_CAPABILITY_PLATFORM_MF | MMREDIR_CAPABILITY_PLATFORM_DSHOW);
break;
default:
WLog_ERR(TAG, "skipping unknown capability type %d", CapabilityType);
WLog_ERR(TAG, "skipping unknown capability type %"PRIu32"", CapabilityType);
break;
}
Stream_SetPosition(ifman->output, pos + cbCapabilityLength);
@ -148,7 +148,7 @@ UINT tsmf_ifman_check_format_support_request(TSMF_IFMAN* ifman)
Stream_Seek_UINT32(ifman->input); /* NoRolloverFlags (4 bytes) */
Stream_Read_UINT32(ifman->input, numMediaType);
DEBUG_TSMF("PlatformCookie %d numMediaType %d", PlatformCookie, numMediaType);
DEBUG_TSMF("PlatformCookie %"PRIu32" numMediaType %"PRIu32"", PlatformCookie, numMediaType);
if (!tsmf_codec_check_media_type(ifman->decoder_name, ifman->input))
FormatSupported = 0;
@ -414,9 +414,9 @@ UINT tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman)
Stream_Seek(ifman->input, 16);
Stream_Read_UINT32(ifman->input, newVolume);
DEBUG_TSMF("on stream volume: new volume=[%d]", newVolume);
DEBUG_TSMF("on stream volume: new volume=[%"PRIu32"]", newVolume);
Stream_Read_UINT32(ifman->input, muted);
DEBUG_TSMF("on stream volume: muted=[%d]", muted);
DEBUG_TSMF("on stream volume: muted=[%"PRIu32"]", muted);
if (!tsmf_presentation_volume_changed(presentation, newVolume, muted))
return ERROR_INVALID_OPERATION;
@ -447,9 +447,9 @@ UINT tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman)
UINT32 changedChannel;
Stream_Seek(ifman->input, 16);
Stream_Read_UINT32(ifman->input, channelVolume);
DEBUG_TSMF("on channel volume: channel volume=[%d]", channelVolume);
DEBUG_TSMF("on channel volume: channel volume=[%"PRIu32"]", channelVolume);
Stream_Read_UINT32(ifman->input, changedChannel);
DEBUG_TSMF("on stream volume: changed channel=[%d]", changedChannel);
DEBUG_TSMF("on stream volume: changed channel=[%"PRIu32"]", changedChannel);
}
ifman->output_pending = TRUE;
@ -508,7 +508,7 @@ UINT tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
Stream_SetPosition(ifman->input, pos + numGeometryInfo);
Stream_Read_UINT32(ifman->input, cbVisibleRect);
num_rects = cbVisibleRect / 16;
DEBUG_TSMF("numGeometryInfo %d Width %d Height %d Left %d Top %d cbVisibleRect %d num_rects %d",
DEBUG_TSMF("numGeometryInfo %"PRIu32" Width %"PRIu32" Height %"PRIu32" Left %"PRIu32" Top %"PRIu32" cbVisibleRect %"PRIu32" num_rects %d",
numGeometryInfo, Width, Height, Left, Top, cbVisibleRect, num_rects);
if (num_rects > 0)
@ -527,7 +527,7 @@ UINT tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
Stream_Seek_UINT16(ifman->input);
rects[i].width -= rects[i].x;
rects[i].height -= rects[i].y;
DEBUG_TSMF("rect %d: %d %d %d %d", i,
DEBUG_TSMF("rect %d: %"PRId16" %"PRId16" %"PRId16" %"PRId16"", i,
rects[i].x, rects[i].y, rects[i].width, rects[i].height);
}
}
@ -597,10 +597,10 @@ UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman)
if (Stream_GetRemainingLength(ifman->input) < cbData)
return ERROR_INVALID_DATA;
DEBUG_TSMF("MessageId %d StreamId %d SampleStartTime %lu SampleEndTime %lu "
"ThrottleDuration %d SampleExtensions %d cbData %d",
DEBUG_TSMF("MessageId %"PRIu32" StreamId %"PRIu32" SampleStartTime %"PRIu64" SampleEndTime %"PRIu64" "
"ThrottleDuration %"PRIu64" SampleExtensions %"PRIu32" cbData %"PRIu32"",
ifman->message_id, StreamId, SampleStartTime, SampleEndTime,
(int)ThrottleDuration, SampleExtensions, cbData);
ThrottleDuration, SampleExtensions, cbData);
presentation = tsmf_presentation_find_by_id(ifman->presentation_id);
@ -628,7 +628,7 @@ UINT tsmf_ifman_on_sample(TSMF_IFMAN* ifman)
if ((error = tsmf_presentation_sync(presentation)))
{
WLog_ERR(TAG, "tsmf_presentation_sync failed with error %u", error);
WLog_ERR(TAG, "tsmf_presentation_sync failed with error %"PRIu32"", error);
return error;
}
ifman->output_pending = TRUE;
@ -653,7 +653,7 @@ UINT tsmf_ifman_on_flush(TSMF_IFMAN* ifman)
Stream_Seek(ifman->input, 16);
Stream_Read_UINT32(ifman->input, StreamId);
DEBUG_TSMF("StreamId %d", StreamId);
DEBUG_TSMF("StreamId %"PRIu32"", StreamId);
presentation = tsmf_presentation_find_by_id(ifman->presentation_id);
if (!presentation)
@ -706,7 +706,7 @@ UINT tsmf_ifman_on_end_of_stream(TSMF_IFMAN* ifman)
tsmf_stream_end(stream, ifman->message_id, ifman->channel_callback);
}
DEBUG_TSMF("StreamId %d", StreamId);
DEBUG_TSMF("StreamId %"PRIu32"", StreamId);
ifman->output_pending = TRUE;

View File

@ -59,7 +59,7 @@ BOOL tsmf_send_eos_response(IWTSVirtualChannelCallback* pChannelCallback, UINT32
Stream_Write_UINT32(s, callback->stream_id); /* StreamId */
Stream_Write_UINT32(s, TSMM_CLIENT_EVENT_ENDOFSTREAM); /* EventId */
Stream_Write_UINT32(s, 0); /* cbData */
DEBUG_TSMF("EOS response size %i", Stream_GetPosition(s));
DEBUG_TSMF("EOS response size %"PRIuz"", Stream_GetPosition(s));
status = callback->channel->Write(callback->channel, Stream_GetPosition(s), Stream_Buffer(s), NULL);
if (status)
@ -90,13 +90,13 @@ BOOL tsmf_playback_ack(IWTSVirtualChannelCallback *pChannelCallback,
Stream_Write_UINT64(s, duration); /* DataDuration */
Stream_Write_UINT64(s, data_size); /* cbData */
DEBUG_TSMF("ACK response size %d", (int) Stream_GetPosition(s));
DEBUG_TSMF("ACK response size %"PRIuz"", Stream_GetPosition(s));
if (!callback || !callback->channel || !callback->channel->Write)
{
WLog_ERR(TAG, "callback=%p, channel=%p, write=%p", callback,
callback ? callback->channel : NULL,
(callback && callback->channel) ? callback->channel->Write : NULL);
WLog_ERR(TAG, "callback=%p, channel=%p, write=%p", (void*) callback,
(void*) (callback ? callback->channel : NULL),
(void*) (callback && callback->channel ? callback->channel->Write : NULL));
}
else
{
@ -135,7 +135,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
/* 2.2.1 Shared Message Header (SHARED_MSG_HEADER) */
if (cbSize < 12)
{
WLog_ERR(TAG, "invalid size. cbSize=%d", cbSize);
WLog_ERR(TAG, "invalid size. cbSize=%"PRIu32"", cbSize);
return ERROR_INVALID_DATA;
}
@ -148,7 +148,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
Stream_Read_UINT32(input, MessageId); /* MessageId (4 bytes) */
Stream_Read_UINT32(input, FunctionId); /* FunctionId (4 bytes) */
DEBUG_TSMF("cbSize=%d InterfaceId=0x%X MessageId=0x%X FunctionId=0x%X",
DEBUG_TSMF("cbSize=%"PRIu32" InterfaceId=0x%"PRIX32" MessageId=0x%"PRIX32" FunctionId=0x%"PRIX32"",
cbSize, InterfaceId, MessageId, FunctionId);
ZeroMemory(&ifman, sizeof(TSMF_IFMAN));
@ -165,7 +165,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
ifman.output_pending = FALSE;
ifman.output_interface_id = InterfaceId;
//fprintf(stderr, "InterfaceId: 0x%04X MessageId: 0x%04X FunctionId: 0x%04X\n", InterfaceId, MessageId, FunctionId);
//fprintf(stderr, "InterfaceId: 0x%08"PRIX32" MessageId: 0x%08"PRIX32" FunctionId: 0x%08"PRIX32"\n", InterfaceId, MessageId, FunctionId);
switch (InterfaceId)
{
@ -196,7 +196,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
CopyMemory(callback->presentation_id, Stream_Pointer(input), GUID_SIZE);
Stream_Seek(input, GUID_SIZE);
Stream_Read_UINT32(input, callback->stream_id);
DEBUG_TSMF("SET_CHANNEL_PARAMS StreamId=%d", callback->stream_id);
DEBUG_TSMF("SET_CHANNEL_PARAMS StreamId=%"PRIu32"", callback->stream_id);
ifman.output_pending = TRUE;
processed = TRUE;
break;
@ -305,7 +305,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
if (error)
{
WLog_ERR(TAG, "ifman data received processing error %d", error);
WLog_ERR(TAG, "ifman data received processing error %"PRIu32"", error);
}
if (!processed)
@ -327,7 +327,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
if (!processed)
{
WLog_ERR(TAG, "Unknown InterfaceId: 0x%04X MessageId: 0x%04X FunctionId: 0x%04X\n", InterfaceId, MessageId, FunctionId);
WLog_ERR(TAG, "Unknown InterfaceId: 0x%08"PRIX32" MessageId: 0x%08"PRIX32" FunctionId: 0x%08"PRIX32"\n", InterfaceId, MessageId, FunctionId);
/* When a request is not implemented we return empty response indicating error */
}
@ -346,7 +346,7 @@ static UINT tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
if (error)
{
WLog_ERR(TAG, "response error %d", error);
WLog_ERR(TAG, "response error %"PRIu32"", error);
}
}

View File

@ -386,7 +386,7 @@ static char* guid_to_string(const BYTE* guid, char* str, size_t len)
return NULL;
for (i = 0; i < GUID_SIZE && len > 2 * i; i++)
sprintf_s(str + (2 * i), len - 2 * i, "%02X", guid[i]);
sprintf_s(str + (2 * i), len - 2 * i, "%02"PRIX8"", guid[i]);
return str;
}
@ -430,8 +430,8 @@ static BOOL tsmf_sample_playback_video(TSMF_SAMPLE* sample)
TSMF_CHANNEL_CALLBACK* callback = (TSMF_CHANNEL_CALLBACK*)
sample->channel_callback;
TsmfClientContext* tsmf = (TsmfClientContext*) callback->plugin->pInterface;
DEBUG_TSMF("MessageId %d EndTime %d data_size %d consumed.",
sample->sample_id, (int) sample->end_time, sample->data_size);
DEBUG_TSMF("MessageId %"PRIu32" EndTime %"PRIu64" data_size %"PRIu32" consumed.",
sample->sample_id, sample->end_time, sample->data_size);
if (sample->data)
{
@ -467,7 +467,7 @@ static BOOL tsmf_sample_playback_video(TSMF_SAMPLE* sample)
sprintf_s(buf, sizeof(buf), "/tmp/FreeRDP_Frame_%d.ppm", frame_id);
fp = fopen(buf, "wb");
fwrite("P5\n", 1, 3, fp);
sprintf_s(buf, sizeof(buf), "%d %d\n", sample->stream->width,
sprintf_s(buf, sizeof(buf), "%"PRIu32" %"PRIu32"\n", sample->stream->width,
sample->stream->height);
fwrite(buf, 1, strlen(buf), fp);
fwrite("255\n", 1, 4, fp);
@ -496,8 +496,8 @@ static BOOL tsmf_sample_playback_audio(TSMF_SAMPLE* sample)
UINT64 latency = 0;
TSMF_STREAM* stream = sample->stream;
BOOL ret;
DEBUG_TSMF("MessageId %d EndTime %d consumed.",
sample->sample_id, (int)sample->end_time);
DEBUG_TSMF("MessageId %"PRIu32" EndTime %"PRIu64" consumed.",
sample->sample_id, sample->end_time);
if (stream->audio && sample->data)
{
@ -638,7 +638,7 @@ static BOOL tsmf_sample_playback(TSMF_SAMPLE* sample)
if (ret && (width != stream->width || height != stream->height))
{
DEBUG_TSMF("video dimension changed to %d x %d", width, height);
DEBUG_TSMF("video dimension changed to %"PRIu32" x %"PRIu32"", width, height);
stream->width = width;
stream->height = height;
}
@ -717,7 +717,7 @@ static void* tsmf_stream_ack_func(void* arg)
HANDLE hdl[2];
TSMF_STREAM* stream = (TSMF_STREAM*) arg;
UINT error = CHANNEL_RC_OK;
DEBUG_TSMF("in %d", stream->stream_id);
DEBUG_TSMF("in %"PRIu32"", stream->stream_id);
hdl[0] = stream->stopEvent;
hdl[1] = Queue_Event(stream->sample_ack_list);
@ -729,7 +729,7 @@ static void* tsmf_stream_ack_func(void* arg)
if (ev == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -792,7 +792,7 @@ static void* tsmf_stream_ack_func(void* arg)
setChannelError(stream->rdpcontext, error,
"tsmf_stream_ack_func reported an error");
DEBUG_TSMF("out %d", stream->stream_id);
DEBUG_TSMF("out %"PRIu32"", stream->stream_id);
ExitThread(0);
return NULL;
}
@ -805,7 +805,7 @@ static void* tsmf_stream_playback_func(void* arg)
TSMF_PRESENTATION* presentation = stream->presentation;
UINT error = CHANNEL_RC_OK;
DWORD status;
DEBUG_TSMF("in %d", stream->stream_id);
DEBUG_TSMF("in %"PRIu32"", stream->stream_id);
if (stream->major_type == TSMF_MAJOR_TYPE_AUDIO &&
stream->sample_rate && stream->channels && stream->bits_per_sample)
@ -839,7 +839,7 @@ static void* tsmf_stream_playback_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %u!", error);
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", error);
break;
}
@ -848,7 +848,7 @@ static void* tsmf_stream_playback_func(void* arg)
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
break;
}
@ -882,7 +882,7 @@ static void* tsmf_stream_playback_func(void* arg)
setChannelError(stream->rdpcontext, error,
"tsmf_stream_playback_func reported an error");
DEBUG_TSMF("out %d", stream->stream_id);
DEBUG_TSMF("out %"PRIu32"", stream->stream_id);
ExitThread(0);
return NULL;
}
@ -1056,7 +1056,7 @@ UINT tsmf_presentation_sync(TSMF_PRESENTATION* presentation)
if (WaitForSingleObject(stream->ready, 500) == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %u!", error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return error;
}
}
@ -1188,7 +1188,7 @@ TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id,
if (stream)
{
WLog_ERR(TAG, "duplicated stream id %d!", stream_id);
WLog_ERR(TAG, "duplicated stream id %"PRIu32"!", stream_id);
return NULL;
}
@ -1252,13 +1252,13 @@ error_add:
SetEvent(stream->stopEvent);
if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED)
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
error_ack_thread:
SetEvent(stream->stopEvent);
if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED)
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
error_play_thread:
Queue_Free(stream->sample_ack_list);
@ -1323,7 +1323,7 @@ BOOL tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, wStream* s)
if (mediatype.MajorType == TSMF_MAJOR_TYPE_VIDEO)
{
DEBUG_TSMF("video width %d height %d bit_rate %d frame_rate %f codec_data %d",
DEBUG_TSMF("video width %"PRIu32" height %"PRIu32" bit_rate %"PRIu32" frame_rate %f codec_data %"PRIu32"",
mediatype.Width, mediatype.Height, mediatype.BitRate,
(double) mediatype.SamplesPerSecond.Numerator / (double)
mediatype.SamplesPerSecond.Denominator,
@ -1333,7 +1333,7 @@ BOOL tsmf_stream_set_format(TSMF_STREAM* stream, const char* name, wStream* s)
}
else if (mediatype.MajorType == TSMF_MAJOR_TYPE_AUDIO)
{
DEBUG_TSMF("audio channel %d sample_rate %d bits_per_sample %d codec_data %d",
DEBUG_TSMF("audio channel %"PRIu32" sample_rate %"PRIu32" bits_per_sample %"PRIu32" codec_data %"PRIu32"",
mediatype.Channels, mediatype.SamplesPerSecond.Numerator,
mediatype.BitsPerSample,
mediatype.ExtraDataSize);
@ -1392,7 +1392,7 @@ void _tsmf_stream_free(TSMF_STREAM* stream)
{
if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
return;
}
@ -1404,7 +1404,7 @@ void _tsmf_stream_free(TSMF_STREAM* stream)
{
if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED)
{
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) GetLastError());
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", GetLastError());
return;
}

View File

@ -165,7 +165,7 @@ static int urbdrc_process_cancel_request(BYTE* data, UINT32 data_sizem, IUDEVMAN
data_read_UINT32(data + 0, CancelId); /** RequestId */
WLog_DBG(TAG, "urbdrc_process_cancel_request: id 0x%x", CancelId);
WLog_DBG(TAG, "urbdrc_process_cancel_request: id 0x%"PRIx32"", CancelId);
pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@ -192,7 +192,7 @@ static int urbdrc_process_retract_device_request(BYTE* data, UINT32 data_sizem,
break;
default:
WLog_DBG(TAG, "urbdrc_process_retract_device_request: Unknown Reason %d", Reason);
WLog_DBG(TAG, "urbdrc_process_retract_device_request: Unknown Reason %"PRIu32"", Reason);
return -1;
break;
}
@ -261,7 +261,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* da
OutputBufferSize = 4;
}
WLog_DBG(TAG, "PORT STATUS(fake!):0x%02x%02x%02x%02x",
WLog_DBG(TAG, "PORT STATUS(fake!):0x%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"",
OutputBuffer[3], OutputBuffer[2], OutputBuffer[1], OutputBuffer[0]);
}
@ -278,7 +278,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* da
break;
default:
WLog_DBG(TAG, "urbdrc_process_io_control: unknown IoControlCode 0x%X", IoControlCode);
WLog_DBG(TAG, "urbdrc_process_io_control: unknown IoControlCode 0x%"PRIX32"", IoControlCode);
zfree(OutputBuffer);
return ERROR_INVALID_OPERATION;
break;
@ -325,7 +325,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback,
data_read_UINT32(data + 0, IoControlCode);
WLog_DBG(TAG, "urbdrc_process_internal_io_control:0x%x", IoControlCode);
WLog_DBG(TAG, "urbdrc_process_internal_io_control:0x%"PRIx32"", IoControlCode);
data_read_UINT32(data + 4, InputBufferSize);
data_read_UINT32(data + 8, OutputBufferSize);
@ -870,12 +870,14 @@ static int urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
break;
}
WLog_DBG(TAG, "urb_isoch_transfer: EndpointAddress: 0x%x, "
"TransferFlags: 0x%x, " "StartFrame: 0x%x, "
"NumberOfPackets: 0x%x, " "OutputBufferSize: 0x%x "
"RequestId: 0x%x",
EndpointAddress, TransferFlags, StartFrame,
NumberOfPackets, OutputBufferSize, RequestId);
WLog_DBG(TAG, "urb_isoch_transfer: EndpointAddress: 0x%"PRIx32", "
"TransferFlags: 0x%"PRIx32", "
"StartFrame: 0x%"PRIx32", "
"NumberOfPackets: 0x%"PRIx32", "
"OutputBufferSize: 0x%"PRIx32" "
"RequestId: 0x%"PRIx32"",
EndpointAddress, TransferFlags, StartFrame,
NumberOfPackets, OutputBufferSize, RequestId);
#if ISOCH_FIFO
ISOCH_CALLBACK_QUEUE * isoch_queue = NULL;
@ -1203,10 +1205,10 @@ static int urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callbac
bmRequestType |= 0x80;
WLog_DBG(TAG, "urb_control_vendor_or_class_request: "
"RequestId 0x%x TransferFlags: 0x%x ReqTypeReservedBits: 0x%x "
"Request:0x%x Value: 0x%x Index: 0x%x OutputBufferSize: 0x%x bmRequestType: 0x%x!!",
RequestId, TransferFlags, ReqTypeReservedBits, Request, Value,
Index, OutputBufferSize, bmRequestType);
"RequestId 0x%"PRIx32" TransferFlags: 0x%"PRIx32" ReqTypeReservedBits: 0x%"PRIx8" "
"Request:0x%"PRIx8" Value: 0x%"PRIx16" Index: 0x%"PRIx16" OutputBufferSize: 0x%"PRIx32" bmRequestType: 0x%"PRIx8"!!",
RequestId, TransferFlags, ReqTypeReservedBits, Request, Value,
Index, OutputBufferSize, bmRequestType);
ret = pdev->control_transfer(
pdev, RequestId, 0, 0, bmRequestType,
@ -1308,11 +1310,12 @@ static int urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
break;
}
WLog_DBG(TAG, "Ms descriptor arg: Recipient:0x%x, "
"InterfaceNumber:0x%x, Ms_PageIndex:0x%x, "
"Ms_featureDescIndex:0x%x, OutputBufferSize:0x%x",
Recipient, InterfaceNumber, Ms_PageIndex,
Ms_featureDescIndex, OutputBufferSize);
WLog_DBG(TAG, "Ms descriptor arg: Recipient:0x%"PRIx8", "
"InterfaceNumber:0x%"PRIx8", Ms_PageIndex:0x%"PRIx8", "
"Ms_featureDescIndex:0x%"PRIx16", OutputBufferSize:0x%"PRIx32"",
Recipient, InterfaceNumber, Ms_PageIndex,
Ms_featureDescIndex, OutputBufferSize);
/** get ms string */
ret = pdev->os_feature_descriptor_request(
pdev, RequestId, Recipient,
@ -1390,7 +1393,7 @@ static int urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
switch (action){
case PIPE_CANCEL:
WLog_DBG(TAG, "urb_pipe_request: PIPE_CANCEL 0x%x ", EndpointAddress);
WLog_DBG(TAG, "urb_pipe_request: PIPE_CANCEL 0x%"PRIx32"", EndpointAddress);
ret = pdev->control_pipe_request(
pdev, RequestId, EndpointAddress,
@ -1404,7 +1407,7 @@ static int urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
break;
case PIPE_RESET:
WLog_DBG(TAG, "urb_pipe_request: PIPE_RESET ep 0x%x ", EndpointAddress);
WLog_DBG(TAG, "urb_pipe_request: PIPE_RESET ep 0x%"PRIx32"", EndpointAddress);
ret = pdev->control_pipe_request(
pdev, RequestId, EndpointAddress,
@ -1722,7 +1725,7 @@ static int urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE
bmRequest = 0x01; /* REQUEST_CLEAR_FEATURE */
break;
default:
WLog_ERR(TAG, "urb_control_feature_request: Error Command %x", command);
WLog_ERR(TAG, "urb_control_feature_request: Error Command 0x%02"PRIx8"", command);
zfree(out_data);
return -1;
}
@ -2294,7 +2297,7 @@ static int urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, B
URB_CONTROL_TRANSFER_EXTERNAL);
break;
default:
WLog_DBG(TAG, "URB_Func: %x is not found!", URB_Function);
WLog_DBG(TAG, "URB_Func: %"PRIx16" is not found!", URB_Function);
break;
}
@ -2336,7 +2339,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
{
case CANCEL_REQUEST:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>CANCEL_REQUEST<<0x%X", FunctionId);
" >>CANCEL_REQUEST<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_cancel_request(
pBuffer + 8,
cbSize - 8,
@ -2345,7 +2348,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case REGISTER_REQUEST_CALLBACK:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>REGISTER_REQUEST_CALLBACK<<0x%X", FunctionId);
" >>REGISTER_REQUEST_CALLBACK<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_register_request_callback(
callback,
pBuffer + 8,
@ -2355,7 +2358,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case IO_CONTROL:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>IO_CONTROL<<0x%X", FunctionId);
" >>IO_CONTROL<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_io_control(
callback,
pBuffer + 8,
@ -2365,7 +2368,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case INTERNAL_IO_CONTROL:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>INTERNAL_IO_CONTROL<<0x%X", FunctionId);
" >>INTERNAL_IO_CONTROL<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_internal_io_control(
callback,
pBuffer + 8,
@ -2375,7 +2378,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case QUERY_DEVICE_TEXT:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>QUERY_DEVICE_TEXT<<0x%X", FunctionId);
" >>QUERY_DEVICE_TEXT<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_query_device_text(
callback,
pBuffer + 8,
@ -2386,7 +2389,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case TRANSFER_IN_REQUEST:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>TRANSFER_IN_REQUEST<<0x%X", FunctionId);
" >>TRANSFER_IN_REQUEST<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_transfer_request(
callback,
pBuffer + 8,
@ -2398,7 +2401,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case TRANSFER_OUT_REQUEST:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>TRANSFER_OUT_REQUEST<<0x%X", FunctionId);
" >>TRANSFER_OUT_REQUEST<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_transfer_request(
callback,
pBuffer + 8,
@ -2410,7 +2413,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
case RETRACT_DEVICE:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" >>RETRACT_DEVICE<<0x%X", FunctionId);
" >>RETRACT_DEVICE<<0x%"PRIX32"", FunctionId);
error = urbdrc_process_retract_device_request(
pBuffer + 8,
cbSize - 8,
@ -2419,7 +2422,7 @@ void* urbdrc_process_udev_data_transfer(void* arg)
break;
default:
WLog_DBG(TAG, "urbdrc_process_udev_data_transfer:"
" unknown FunctionId 0x%X", FunctionId);
" unknown FunctionId 0x%"PRIX32"", FunctionId);
error = -1;
break;
}

View File

@ -203,7 +203,7 @@ static void func_iso_callback(struct libusb_transfer *transfer)
}
else
{
//WLog_ERR(TAG, "actual length %d ", act_len);
//WLog_ERR(TAG, "actual length %"PRIu32"", act_len);
//exit(EXIT_FAILURE);
}
}
@ -527,7 +527,7 @@ static int udev_get_hub_handle(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_numb
error = 0;
WLog_DBG(TAG, " Port: %d", pdev->port_number);
/* gen device path */
sprintf(pdev->path, "ugen%d.%d", bus_number, dev_number);
sprintf(pdev->path, "ugen%"PRIu16".%"PRIu16"", bus_number, dev_number);
WLog_DBG(TAG, " DevPath: %s", pdev->path);
break;
}
@ -540,7 +540,7 @@ static int udev_get_hub_handle(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_numb
if ((bus_number != libusb_get_bus_number(libusb_list[i])) ||
(1 != libusb_get_device_address(libusb_list[i]))) /* Root hub allways first on bus. */
continue;
WLog_DBG(TAG, " Open hub: %d", bus_number);
WLog_DBG(TAG, " Open hub: %"PRIu16"", bus_number);
error = libusb_open(libusb_list[i], &pdev->hub_handle);
if (error < 0)
WLog_ERR(TAG,"libusb_open error: %i - %s", error, libusb_strerror(error));
@ -745,8 +745,8 @@ static MSUSB_CONFIG_DESCRIPTOR* libusb_udev_complete_msconfig_setup(IUDEVICE* id
LibusbConfig = pdev->LibusbConfig;
if (LibusbConfig->bNumInterfaces != MsConfig->NumInterfaces)
{
WLog_ERR(TAG, "Select Configuration: Libusb NumberInterfaces(%d) is different "
"with MsConfig NumberInterfaces(%d)",
WLog_ERR(TAG, "Select Configuration: Libusb NumberInterfaces(%"PRIu8") is different "
"with MsConfig NumberInterfaces(%"PRIu32")",
LibusbConfig->bNumInterfaces, MsConfig->NumInterfaces);
}
@ -983,7 +983,7 @@ static int libusb_udev_control_query_device_text(IUDEVICE* idev, UINT32 TextType
if (ret <= 0 || ret < 4){
WLog_DBG(TAG,"libusb_get_string_descriptor: "
"ERROR num %d, iProduct: %d!", ret, devDescriptor->iProduct);
"ERROR num %d, iProduct: %"PRIu8"!", ret, devDescriptor->iProduct);
memcpy(Buffer, strDesc, strlen(strDesc));
Buffer[strlen(strDesc)] = '\0';
*BufferSize = (strlen((char *)Buffer)) * 2;
@ -1002,7 +1002,7 @@ static int libusb_udev_control_query_device_text(IUDEVICE* idev, UINT32 TextType
case DeviceTextLocationInformation:
bus_number = libusb_get_bus_number(pdev->libusb_dev);
device_address = libusb_get_device_address(pdev->libusb_dev);
sprintf(deviceLocation, "Port_#%04d.Hub_#%04d", device_address, bus_number);
sprintf(deviceLocation, "Port_#%04"PRIu8".Hub_#%04"PRIu8"", device_address, bus_number);
for(i=0;i<strlen(deviceLocation);i++){
Buffer[i*2] = (BYTE)deviceLocation[i];
@ -1011,7 +1011,7 @@ static int libusb_udev_control_query_device_text(IUDEVICE* idev, UINT32 TextType
*BufferSize = (i*2);
break;
default:
WLog_DBG(TAG,"Query Text: unknown TextType %d", TextType);
WLog_DBG(TAG,"Query Text: unknown TextType %"PRIu32"", TextType);
break;
}
@ -1292,7 +1292,7 @@ static int libusb_udev_query_device_port_status(IUDEVICE* idev, UINT32* UsbdStat
}
else
{
WLog_DBG(TAG,"PORT STATUS:0x%02x%02x%02x%02x",
WLog_DBG(TAG,"PORT STATUS:0x%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"",
Buffer[3], Buffer[2], Buffer[1], Buffer[0]);
success = 1;
}
@ -1433,14 +1433,14 @@ static int libusb_udev_bulk_or_interrupt_transfer(IUDEVICE* idev, UINT32 Request
if (!ep_desc)
{
WLog_ERR(TAG, "func_get_ep_desc: endpoint 0x%x is not found!!", EndpointAddress);
WLog_ERR(TAG, "func_get_ep_desc: endpoint 0x%"PRIx32" is not found!!", EndpointAddress);
return -1;
}
transfer_type = (ep_desc->bmAttributes) & 0x3;
WLog_DBG(TAG,"urb_bulk_or_interrupt_transfer: ep:0x%x "
"transfer_type %d flag:%d OutputBufferSize:0x%x",
EndpointAddress, transfer_type, TransferFlags, *BufferSize);
WLog_DBG(TAG,"urb_bulk_or_interrupt_transfer: ep:0x%"PRIx32" "
"transfer_type %"PRIu32" flag:%"PRIu32" OutputBufferSize:0x%"PRIx32"",
EndpointAddress, transfer_type, TransferFlags, *BufferSize);
switch (transfer_type)
{
@ -1468,7 +1468,7 @@ static int libusb_udev_bulk_or_interrupt_transfer(IUDEVICE* idev, UINT32 Request
default:
WLog_DBG(TAG,"urb_bulk_or_interrupt_transfer:"
" other transfer type 0x%X", transfer_type);
" other transfer type 0x%"PRIX32"", transfer_type);
return -1;
break;
}
@ -1554,12 +1554,12 @@ static int libusb_udev_bulk_or_interrupt_transfer(IUDEVICE* idev, UINT32 Request
*BufferSize = transfer->actual_length;
}
WLog_DBG(TAG,"bulk or interrupt Transfer data size : 0x%x", *BufferSize);
WLog_DBG(TAG,"bulk or interrupt Transfer data size : 0x%"PRIx32"", *BufferSize);
if (request)
{
if(pdev->request_queue->unregister_request(pdev->request_queue, RequestId))
WLog_ERR(TAG, "request_queue_unregister_request: not fount request 0x%x", RequestId);
WLog_ERR(TAG, "request_queue_unregister_request: not fount request 0x%"PRIx32"", RequestId);
}
libusb_free_transfer(transfer);
@ -1655,7 +1655,7 @@ cancel_retry:
if (!request)
continue;
WLog_DBG(TAG,"CancelId:0x%x RequestId:0x%x endpoint 0x%x!!",
WLog_DBG(TAG,"CancelId:0x%"PRIx32" RequestId:0x%x endpoint 0x%x!!",
RequestId, request->RequestId, request->endpoint);
if ((request && request->RequestId) == (RequestId && retry_times <= 10))
@ -1797,8 +1797,8 @@ static IUDEVICE* udev_init(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_number)
/* get the first interface and first altsetting */
interface_temp = config_temp->interface[0].altsetting[0];
WLog_DBG(TAG,"Regist Device: Vid: 0x%04X Pid: 0x%04X"
" InterfaceClass = 0x%X",
WLog_DBG(TAG,"Regist Device: Vid: 0x%04"PRIX16" Pid: 0x%04"PRIX16""
" InterfaceClass = 0x%02"PRIX8"",
pdev->devDescriptor->idVendor,
pdev->devDescriptor->idProduct,
interface_temp.bInterfaceClass);
@ -1883,7 +1883,7 @@ int udev_new_by_id(UINT16 idVendor, UINT16 idProduct, IUDEVICE*** devArray)
ssize_t i, total_device;
int status, num = 0;
WLog_INFO(TAG, "VID: 0x%04X, PID: 0x%04X", idVendor, idProduct);
WLog_INFO(TAG, "VID: 0x%04"PRIX16", PID: 0x%04"PRIX16"", idVendor, idProduct);
array = (UDEVICE**) malloc(16 * sizeof(UDEVICE*));

View File

@ -390,7 +390,7 @@ static IUDEVICE* udevman_get_udevice_by_UsbDevice(IUDEVMAN* idevman, UINT32 UsbD
return (IUDEVICE*) pdev;
}
WLog_ERR(TAG, "0x%x ERROR!!", UsbDevice);
WLog_ERR(TAG, "0x%"PRIx32" ERROR!!", UsbDevice);
return NULL;
}

View File

@ -166,8 +166,8 @@ static void searchman_list_show(USB_SEARCHMAN* self)
{
usb = self->get_next(self);
WLog_DBG(TAG, " USB %d: ", num++);
WLog_DBG(TAG, " idVendor: 0x%04X", usb->idVendor);
WLog_DBG(TAG, " idProduct: 0x%04X", usb->idProduct);
WLog_DBG(TAG, " idVendor: 0x%04"PRIX16"", usb->idVendor);
WLog_DBG(TAG, " idProduct: 0x%04"PRIX16"", usb->idProduct);
}
WLog_DBG(TAG, "================= END ===============");

View File

@ -58,10 +58,10 @@ static int func_hardware_id_format(IUDEVICE* pdev, char(*HardwareIds)[DEVICE_HAR
idProduct = (UINT16)pdev->query_device_descriptor(pdev, ID_PRODUCT);
bcdDevice = (UINT16)pdev->query_device_descriptor(pdev, BCD_DEVICE);
sprintf_s(str, sizeof(str), "USB\\VID_%04X&PID_%04X", idVendor, idProduct);
sprintf_s(str, sizeof(str), "USB\\VID_%04"PRIX16"&PID_%04"PRIX16"", idVendor, idProduct);
strcpy(HardwareIds[1], str);
sprintf_s(str, sizeof(str), "%s&REV_%04X", HardwareIds[1], bcdDevice);
sprintf_s(str, sizeof(str), "%s&REV_%04"PRIX16"", HardwareIds[1], bcdDevice);
strcpy(HardwareIds[0], str);
return 0;
@ -78,11 +78,11 @@ static int func_compat_id_format(IUDEVICE* pdev, char (*CompatibilityIds)[DEVICE
if(!(pdev->isCompositeDevice(pdev)))
{
sprintf_s(str, sizeof(str),"USB\\Class_%02X", bDeviceClass);
sprintf_s(str, sizeof(str),"USB\\Class_%02"PRIX8"", bDeviceClass);
strcpy(CompatibilityIds[2], str);
sprintf_s(str, sizeof(str),"%s&SubClass_%02X", CompatibilityIds[2], bDeviceSubClass);
sprintf_s(str, sizeof(str),"%s&SubClass_%02"PRIX8"", CompatibilityIds[2], bDeviceSubClass);
strcpy(CompatibilityIds[1], str);
sprintf_s(str, sizeof(str),"%s&Prot_%02X", CompatibilityIds[1], bDeviceProtocol);
sprintf_s(str, sizeof(str),"%s&Prot_%02"PRIX8"", CompatibilityIds[1], bDeviceProtocol);
strcpy(CompatibilityIds[0], str);
}
else
@ -162,11 +162,11 @@ static int func_container_id_generate(IUDEVICE* pdev, char* strContainerId)
p = path;
ZeroMemory(containerId, sizeof(containerId));
sprintf_s((char*)containerId, sizeof(containerId), "%04X%04X%s", idVendor, idProduct, p);
sprintf_s((char*)containerId, sizeof(containerId), "%04"PRIX16"%04"PRIX16"%s", idVendor, idProduct, p);
/* format */
sprintf_s(strContainerId, DEVICE_CONTAINER_STR_SIZE,
"{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
"{%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"}",
containerId[0], containerId[1],containerId[2], containerId[3],
containerId[4], containerId[5], containerId[6], containerId[7],
containerId[8], containerId[9], containerId[10], containerId[11],
@ -184,7 +184,7 @@ static int func_instance_id_generate(IUDEVICE* pdev, char* strInstanceId)
/* format */
sprintf_s(strInstanceId, DEVICE_INSTANCE_STR_SIZE,
"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"-%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"%02"PRIx8"",
instanceId[0], instanceId[1],instanceId[2], instanceId[3],
instanceId[4], instanceId[5], instanceId[6], instanceId[7],
instanceId[8], instanceId[9], instanceId[10], instanceId[11],
@ -471,7 +471,7 @@ static UINT urbdrc_exchange_capabilities(URBDRC_CHANNEL_CALLBACK* callback, char
break;
default:
WLog_ERR(TAG, "unknown FunctionId 0x%X", FunctionId);
WLog_ERR(TAG, "unknown FunctionId 0x%"PRIX32"", FunctionId);
error = ERROR_NOT_FOUND;
break;
}
@ -568,7 +568,7 @@ static void *urbdrc_search_usb_device(void *arg) {
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", error);
return 0;
}
@ -667,7 +667,7 @@ static void *urbdrc_search_usb_device(void *arg) {
if (sdev->idVendor == idVendor &&
sdev->idProduct == idProduct)
{
WLog_VRB(TAG, "Searchman Found Device: %04x:%04x",
WLog_VRB(TAG, "Searchman Found Device: %04"PRIx16":%04"PRIx16"",
sdev->idVendor, sdev->idProduct);
found = 1;
break;
@ -767,10 +767,11 @@ static void* urbdrc_search_usb_device(void* arg)
HANDLE mon_fd;
int numobj, timeout;
int busnum, devnum;
int success = 0, error, on_close = 0, found = 0;
int success = 0, on_close = 0, found = 0;
WLog_VRB(TAG, "");
channel_mgr = urbdrc->listener_callback->channel_mgr;
DWORD status;
DWORD status;
DWORD dwError;
/* init usb monitor */
struct udev* udev;
@ -812,36 +813,36 @@ static void* urbdrc_search_usb_device(void* arg)
status = WaitForMultipleObjects(numobj, listobj, FALSE, INFINITE);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", dwError);
goto out;
}
status = WaitForSingleObject(searchman->term_event, 0);
status = WaitForSingleObject(searchman->term_event, 0);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", dwError);
goto out;
}
if (status == WAIT_OBJECT_0)
{
sem_post(&searchman->sem_term);
goto out;
}
if (status == WAIT_OBJECT_0)
{
sem_post(&searchman->sem_term);
goto out;
}
status = WaitForSingleObject(mon_fd, 0);
status = WaitForSingleObject(mon_fd, 0);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", dwError);
goto out;
}
if (status == WAIT_OBJECT_0)
@ -882,7 +883,7 @@ static void* urbdrc_search_usb_device(void* arg)
if (sdev->idVendor == idVendor &&
sdev->idProduct == idProduct)
{
WLog_VRB(TAG, "Searchman Find Device: %04x:%04x ",
WLog_VRB(TAG, "Searchman Find Device: %04"PRIx16":%04"PRIx16"",
sdev->idVendor, sdev->idProduct);
found = 1;
break;
@ -920,30 +921,30 @@ static void* urbdrc_search_usb_device(void* arg)
status = WaitForMultipleObjects(numobj, listobj, FALSE, timeout);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", dwError);
goto out;
}
status = WaitForSingleObject(searchman->term_event, 0);
status = WaitForSingleObject(searchman->term_event, 0);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", dwError);
goto out;
}
if (status == WAIT_OBJECT_0)
if (status == WAIT_OBJECT_0)
{
CloseHandle(mon_fd);
sem_post(&searchman->sem_term);
return 0;
}
error = urdbrc_send_virtual_channel_add(dvc_channel, 0);
urdbrc_send_virtual_channel_add(dvc_channel, 0);
if (found == 1)
searchman->remove(searchman, sdev->idVendor, sdev->idProduct);
@ -992,23 +993,23 @@ static void* urbdrc_search_usb_device(void* arg)
status = WaitForMultipleObjects(numobj, listobj, FALSE, timeout);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForMultipleObjects failed with error %"PRIu32"!", dwError);
goto out;
}
status = WaitForSingleObject(searchman->term_event, 0);
status = WaitForSingleObject(searchman->term_event, 0);
if (status == WAIT_FAILED)
{
error = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", (unsigned long) error);
goto out;
}
if (status == WAIT_FAILED)
{
dwError = GetLastError();
WLog_ERR(TAG, "WaitForSingleObject failed with error %"PRIu32"!", dwError);
goto out;
}
if (status == WAIT_OBJECT_0)
if (status == WAIT_OBJECT_0)
{
CloseHandle(mon_fd);
sem_post(&searchman->sem_term);
@ -1115,7 +1116,7 @@ void* urbdrc_new_device_create(void* arg)
break;
default:
WLog_ERR(TAG, "vchannel_status unknown value %d",
WLog_ERR(TAG, "vchannel_status unknown value %"PRIu32"",
urbdrc->vchannel_status);
break;
}
@ -1183,7 +1184,7 @@ static UINT urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callbac
break;
default:
WLog_VRB(TAG, "unknown FunctionId 0x%X", FunctionId);
WLog_VRB(TAG, "unknown FunctionId 0x%"PRIX32"", FunctionId);
error = 1;
break;
}
@ -1223,7 +1224,7 @@ static UINT urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback
data_read_UINT32(pBuffer + 0, InterfaceTemp);
InterfaceId = (InterfaceTemp & 0x0fffffff);
Mask = ((InterfaceTemp & 0xf0000000)>>30);
WLog_VRB(TAG, "Size=%d InterfaceId=0x%X Mask=0x%X", cbSize, InterfaceId, Mask);
WLog_VRB(TAG, "Size=%"PRIu32" InterfaceId=0x%"PRIX32" Mask=0x%"PRIX32"", cbSize, InterfaceId, Mask);
switch (InterfaceId)
{
@ -1236,7 +1237,7 @@ static UINT urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback
break;
default:
WLog_VRB(TAG, "InterfaceId 0x%X Start matching devices list", InterfaceId);
WLog_VRB(TAG, "InterfaceId 0x%"PRIX32" Start matching devices list", InterfaceId);
pthread_t thread;
TRANSFER_DATA* transfer_data;
@ -1272,7 +1273,7 @@ static UINT urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback
error = pthread_create(&thread, 0, urbdrc_process_udev_data_transfer, transfer_data);
if (error != 0)
{
WLog_ERR(TAG, "Create Data Transfer Thread got error = %d", error);
WLog_ERR(TAG, "Create Data Transfer Thread got error = %"PRIu32"", error);
free(transfer_data->pBuffer);
free(transfer_data);
return ERROR_INVALID_OPERATION;
@ -1301,7 +1302,7 @@ static UINT urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback)
int found = 0;
ChannelId = callback->channel_mgr->GetChannelId(callback->channel);
WLog_INFO(TAG, "urbdrc_on_close: channel id %d", ChannelId);
WLog_INFO(TAG, "urbdrc_on_close: channel id %"PRIu32"", ChannelId);
udevman->loading_lock(udevman);
udevman->rewind(udevman);

View File

@ -25,9 +25,9 @@ set (WITH_DEBUG_LICENSE OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_NEGO OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_NLA OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_NTLM OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_ORDERS OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_RAIL OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_RDP OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_RDPEI OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_REDIR OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_RFX OFF CACHE BOOL "enable debug")
set (WITH_DEBUG_SCARD OFF CACHE BOOL "enable debug")

View File

@ -67,7 +67,7 @@ static void android_OnChannelConnectedEventHandler(
if (!context || !e)
{
WLog_FATAL(TAG, "%s(context=%p, EventArgs=%p",
__FUNCTION__, context, e);
__FUNCTION__, (void*) context, (void*) e);
return;
}
@ -102,7 +102,7 @@ static void android_OnChannelDisconnectedEventHandler(
if (!context || !e)
{
WLog_FATAL(TAG, "%s(context=%p, EventArgs=%p",
__FUNCTION__, context, e);
__FUNCTION__, (void*) context, (void*) e);
return;
}
@ -551,7 +551,7 @@ static int android_freerdp_run(freerdp* instance)
const rdpSettings* settings = instance->context->settings;
rdpContext* context = instance->context;
BOOL async_input = settings->AsyncInput;
WLog_DBG(TAG, "AsyncInput=%d", settings->AsyncInput);
WLog_DBG(TAG, "AsyncInput=%"PRIu8"", settings->AsyncInput);
if (async_input)
{
@ -588,8 +588,7 @@ static int android_freerdp_run(freerdp* instance)
if ((status == WAIT_FAILED))
{
WLog_ERR(TAG, "WaitForMultipleObjects failed with %u [%08lX]",
(unsigned)status, GetLastError());
WLog_ERR(TAG, "WaitForMultipleObjects failed with %"PRIu32" [%08lX]", status, GetLastError());
break;
}
@ -661,7 +660,7 @@ static void* android_thread_func(void* param)
goto fail;
fail:
WLog_DBG(TAG, "Session ended with %08lX", status);
WLog_DBG(TAG, "Session ended with %08"PRIX32"", status);
if (status == CHANNEL_RC_OK)
freerdp_callback("OnDisconnected", "(J)V", (jlong)instance);
@ -738,7 +737,7 @@ static jlong JNICALL jni_freerdp_new(JNIEnv* env, jclass cls, jobject context)
if (!contextClass || !fileClass)
{
WLog_FATAL(TAG, "Failed to load class references %s=%p, %s=%p",
JAVA_CONTEXT_CLASS, contextClass, JAVA_FILE_CLASS, fileClass);
JAVA_CONTEXT_CLASS, (void*) contextClass, JAVA_FILE_CLASS, (void*) fileClass);
return (jlong)NULL;
}
@ -866,7 +865,7 @@ static jboolean JNICALL jni_freerdp_connect(JNIEnv* env, jclass cls,
if (!inst || !inst->context)
{
WLog_FATAL(TAG, "%s(env=%p, cls=%p, instance=%d", __FUNCTION__,
env, cls, instance);
(void*) env, (void*) cls, instance);
return JNI_FALSE;
}
@ -892,7 +891,7 @@ static jboolean JNICALL jni_freerdp_disconnect(JNIEnv* env, jclass cls,
if (!inst || !inst->context || !cls || !env)
{
WLog_FATAL(TAG, "%s(env=%p, cls=%p, instance=%d", __FUNCTION__,
env, cls, instance);
(void*) env, (void*) cls, instance);
return JNI_FALSE;
}
@ -929,7 +928,7 @@ static jboolean JNICALL jni_freerdp_update_graphics(
if (!env || !cls || !inst)
{
WLog_FATAL(TAG, "%s(env=%p, cls=%p, instance=%d", __FUNCTION__,
env, cls, instance);
(void*) env, (void*) cls, instance);
return JNI_FALSE;
}
@ -1004,7 +1003,7 @@ static jboolean JNICALL jni_freerdp_send_key_event(
return JNI_FALSE;
}
WLog_DBG(TAG, "send_key_event: %d, %d", (int)scancode, flags);
WLog_DBG(TAG, "send_key_event: %"PRIu32", %d", scancode, flags);
return JNI_TRUE;
}

View File

@ -273,7 +273,7 @@ static void df_process_channel_event(rdpChannels* channels, freerdp* instance)
break;
default:
WLog_ERR(TAG, "df_process_channel_event: unknown event type %d",
WLog_ERR(TAG, "df_process_channel_event: unknown event type %"PRIu32"",
GetMessageType(event->id));
break;
}

View File

@ -138,8 +138,8 @@ static void* tf_client_thread_proc(freerdp* instance)
if (status == WAIT_FAILED)
{
WLog_ERR(TAG, "%s: WaitForMultipleObjects failed with %lu", __FUNCTION__,
(unsigned long) status);
WLog_ERR(TAG, "%s: WaitForMultipleObjects failed with %"PRIu32"", __FUNCTION__,
status);
break;
}

View File

@ -263,7 +263,7 @@ static BOOL wf_pre_connect(freerdp* instance)
if ((settings->DesktopWidth < 64) || (settings->DesktopHeight < 64) ||
(settings->DesktopWidth > 4096) || (settings->DesktopHeight > 4096))
{
WLog_ERR(TAG, "invalid dimensions %d %d", settings->DesktopWidth,
WLog_ERR(TAG, "invalid dimensions %lu %lu", settings->DesktopWidth,
settings->DesktopHeight);
return FALSE;
}
@ -335,7 +335,7 @@ static BOOL wf_post_connect(freerdp* instance)
_snwprintf(lpWindowName, ARRAYSIZE(lpWindowName), L"FreeRDP: %S",
settings->ServerHostname);
else
_snwprintf(lpWindowName, ARRAYSIZE(lpWindowName), L"FreeRDP: %S:%d",
_snwprintf(lpWindowName, ARRAYSIZE(lpWindowName), L"FreeRDP: %S:%u",
settings->ServerHostname, settings->ServerPort);
if (settings->EmbeddedWindow)
@ -425,7 +425,7 @@ static BOOL wf_authenticate_raw(freerdp* instance, const char* title,
if (status != NO_ERROR)
{
WLog_ERR(TAG, "CredUIPromptForCredentials unexpected status: 0x%08X", status);
WLog_ERR(TAG, "CredUIPromptForCredentials unexpected status: 0x%08lX", status);
return FALSE;
}
@ -569,7 +569,7 @@ static BOOL wf_auto_reconnect(freerdp* instance)
return FALSE;
/* Attempt the next reconnect */
WLog_INFO(TAG, "Attempting reconnect (%u of %u)", num_retries, max_retries);
WLog_INFO(TAG, "Attempting reconnect (%lu of %lu)", num_retries, max_retries);
if (freerdp_reconnect(instance))
{
@ -678,7 +678,7 @@ static DWORD WINAPI wf_client_thread(LPVOID lpParam)
if (MsgWaitForMultipleObjects(nCount, handles, FALSE, 1000,
QS_ALLINPUT) == WAIT_FAILED)
{
WLog_ERR(TAG, "wfreerdp_run: WaitForMultipleObjects failed: 0x%04X",
WLog_ERR(TAG, "wfreerdp_run: WaitForMultipleObjects failed: 0x%08lX",
GetLastError());
break;
}

View File

@ -1660,8 +1660,7 @@ static BOOL wf_cliprdr_get_file_contents(WCHAR* file_name, BYTE* buffer,
if (!ReadFile(hFile, buffer, nRequested, &nGet, NULL))
{
DWORD err = GetLastError();
DEBUG_CLIPRDR("ReadFile failed with 0x%x.", err);
DEBUG_CLIPRDR("ReadFile failed with 0x%08lX.", GetLastError());
goto error;
}

View File

@ -86,8 +86,8 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam)
input = wfc->context.input;
rdp_scancode = MAKE_RDP_SCANCODE((BYTE) p->scanCode, p->flags & LLKHF_EXTENDED);
DEBUG_KBD("keydown %d scanCode %04X flags %02X vkCode %02X",
(wParam == WM_KEYDOWN), (BYTE) p->scanCode, p->flags, p->vkCode);
DEBUG_KBD("keydown %d scanCode 0x%08lX flags 0x%08lX vkCode 0x%08lX",
(wParam == WM_KEYDOWN), p->scanCode, p->flags, p->vkCode);
if (wfc->fs_toggle &&
((p->vkCode == VK_RETURN) || (p->vkCode == VK_CANCEL)) &&

View File

@ -143,20 +143,20 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
WINDOW_STATE_ORDER* windowState)
{
if (orderInfo->fieldFlags & WINDOW_ORDER_STATE_NEW)
WLog_INFO(TAG, "WindowCreate: WindowId: 0x%04X", orderInfo->windowId);
WLog_INFO(TAG, "WindowCreate: WindowId: 0x%08X", orderInfo->windowId);
else
WLog_INFO(TAG, "WindowUpdate: WindowId: 0x%04X", orderInfo->windowId);
WLog_INFO(TAG, "WindowUpdate: WindowId: 0x%08X", orderInfo->windowId);
WLog_INFO(TAG, "{");
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
{
WLog_INFO(TAG, "\tOwnerWindowId: 0x%04X", windowState->ownerWindowId);
WLog_INFO(TAG, "\tOwnerWindowId: 0x%08X", windowState->ownerWindowId);
}
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
{
WLog_INFO(TAG, "\tStyle: 0x%04X ExtendedStyle: 0x%04X",
WLog_INFO(TAG, "\tStyle: 0x%08X ExtendedStyle: 0x%08X",
windowState->style, windowState->extendedStyle);
PrintWindowStyles(windowState->style);
PrintExtendedWindowStyles(windowState->extendedStyle);
@ -164,7 +164,7 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
{
WLog_INFO(TAG, "\tShowState: %d", windowState->showState);
WLog_INFO(TAG, "\tShowState: %u", windowState->showState);
}
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
@ -172,7 +172,7 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
char* title = NULL;
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) windowState->titleInfo.string,
windowState->titleInfo.length / 2, &title, 0, NULL, NULL);
WLog_INFO(TAG, "\tTitleInfo: %s (length = %d)", title,
WLog_INFO(TAG, "\tTitleInfo: %s (length = %hu)", title,
windowState->titleInfo.length);
free(title);
}
@ -185,18 +185,18 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
{
WLog_INFO(TAG, "\tClientAreaWidth: %d ClientAreaHeight: %d",
WLog_INFO(TAG, "\tClientAreaWidth: %u ClientAreaHeight: %u",
windowState->clientAreaWidth, windowState->clientAreaHeight);
}
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
{
WLog_INFO(TAG, "\tRPContent: %d", windowState->RPContent);
WLog_INFO(TAG, "\tRPContent: %u", windowState->RPContent);
}
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
{
WLog_INFO(TAG, "\tRootParentHandle: 0x%04X", windowState->rootParentHandle);
WLog_INFO(TAG, "\tRootParentHandle: 0x%08X", windowState->rootParentHandle);
}
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET)
@ -213,7 +213,7 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE)
{
WLog_INFO(TAG, "\tWindowWidth: %d WindowHeight: %d",
WLog_INFO(TAG, "\tWindowWidth: %u WindowHeight: %u",
windowState->windowWidth, windowState->windowHeight);
}
@ -221,12 +221,12 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
{
UINT32 index;
RECTANGLE_16* rect;
WLog_INFO(TAG, "\tnumWindowRects: %d", windowState->numWindowRects);
WLog_INFO(TAG, "\tnumWindowRects: %u", windowState->numWindowRects);
for (index = 0; index < windowState->numWindowRects; index++)
{
rect = &windowState->windowRects[index];
WLog_INFO(TAG, "\twindowRect[%d]: left: %d top: %d right: %d bottom: %d",
WLog_INFO(TAG, "\twindowRect[%u]: left: %hu top: %hu right: %hu bottom: %hu",
index, rect->left, rect->top, rect->right, rect->bottom);
}
}
@ -241,12 +241,12 @@ void PrintRailWindowState(WINDOW_ORDER_INFO* orderInfo,
{
UINT32 index;
RECTANGLE_16* rect;
WLog_INFO(TAG, "\tnumVisibilityRects: %d", windowState->numVisibilityRects);
WLog_INFO(TAG, "\tnumVisibilityRects: %u", windowState->numVisibilityRects);
for (index = 0; index < windowState->numVisibilityRects; index++)
{
rect = &windowState->visibilityRects[index];
WLog_INFO(TAG, "\tvisibilityRect[%d]: left: %d top: %d right: %d bottom: %d",
WLog_INFO(TAG, "\tvisibilityRect[%u]: left: %hu top: %hu right: %hu bottom: %hu",
index, rect->left, rect->top, rect->right, rect->bottom);
}
}
@ -260,17 +260,17 @@ static void PrintRailIconInfo(WINDOW_ORDER_INFO* orderInfo, ICON_INFO* iconInfo)
WLog_INFO(TAG, "{");
WLog_INFO(TAG, "\tbigIcon: %s",
(orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? "true" : "false");
WLog_INFO(TAG, "\tcacheEntry; 0x%04X", iconInfo->cacheEntry);
WLog_INFO(TAG, "\tcacheId: 0x%04X", iconInfo->cacheId);
WLog_INFO(TAG, "\tbpp: %d", iconInfo->bpp);
WLog_INFO(TAG, "\twidth: %d", iconInfo->width);
WLog_INFO(TAG, "\theight: %d", iconInfo->height);
WLog_INFO(TAG, "\tcbColorTable: %d", iconInfo->cbColorTable);
WLog_INFO(TAG, "\tcbBitsMask: %d", iconInfo->cbBitsMask);
WLog_INFO(TAG, "\tcbBitsColor: %d", iconInfo->cbBitsColor);
WLog_INFO(TAG, "\tcolorTable: %p", iconInfo->colorTable);
WLog_INFO(TAG, "\tbitsMask: %p", iconInfo->bitsMask);
WLog_INFO(TAG, "\tbitsColor: %p", iconInfo->bitsColor);
WLog_INFO(TAG, "\tcacheEntry; 0x%08X", iconInfo->cacheEntry);
WLog_INFO(TAG, "\tcacheId: 0x%08X", iconInfo->cacheId);
WLog_INFO(TAG, "\tbpp: %u", iconInfo->bpp);
WLog_INFO(TAG, "\twidth: %u", iconInfo->width);
WLog_INFO(TAG, "\theight: %u", iconInfo->height);
WLog_INFO(TAG, "\tcbColorTable: %u", iconInfo->cbColorTable);
WLog_INFO(TAG, "\tcbBitsMask: %u", iconInfo->cbBitsMask);
WLog_INFO(TAG, "\tcbBitsColor: %u", iconInfo->cbBitsColor);
WLog_INFO(TAG, "\tcolorTable: %p", (void*) iconInfo->colorTable);
WLog_INFO(TAG, "\tbitsMask: %p", (void*) iconInfo->bitsMask);
WLog_INFO(TAG, "\tbitsColor: %p", (void*) iconInfo->bitsColor);
WLog_INFO(TAG, "}");
}
@ -845,7 +845,7 @@ void wf_rail_register_update_callbacks(rdpUpdate* update)
static UINT wf_rail_server_execute_result(RailClientContext* context,
RAIL_EXEC_RESULT_ORDER* execResult)
{
WLog_DBG(TAG, "RailServerExecuteResult: 0x%04X", execResult->rawResult);
WLog_DBG(TAG, "RailServerExecuteResult: 0x%08X", execResult->rawResult);
return CHANNEL_RC_OK;
}

View File

@ -1416,7 +1416,7 @@ static BOOL xf_auto_reconnect(freerdp* instance)
}
/* Attempt the next reconnect */
WLog_INFO(TAG, "Attempting reconnect (%u of %u)", numRetries, maxRetries);
WLog_INFO(TAG, "Attempting reconnect (%"PRIu32" of %"PRIu32")", numRetries, maxRetries);
if (freerdp_reconnect(instance))
return TRUE;
@ -1458,7 +1458,7 @@ static void* xf_client_thread(void* param)
/* --authonly ? */
if (instance->settings->AuthenticationOnly)
{
WLog_ERR(TAG, "Authentication only, exit status %d", !status);
WLog_ERR(TAG, "Authentication only, exit status %"PRId32"", !status);
if (!status)
{
@ -1476,7 +1476,7 @@ static void* xf_client_thread(void* param)
if (!status)
{
WLog_ERR(TAG, "Freerdp connect error exit status %d", !status);
WLog_ERR(TAG, "Freerdp connect error exit status %"PRId32"", !status);
exit_code = freerdp_error_info(instance);
if (freerdp_get_last_error(instance->context) ==

View File

@ -346,7 +346,7 @@ static CLIPRDR_FORMAT* xf_cliprdr_parse_server_format_list(BYTE* data,
if (*numFormats > MAX_CLIPBOARD_FORMATS)
{
WLog_ERR(TAG, "unexpectedly large number of formats: %u", *numFormats);
WLog_ERR(TAG, "unexpectedly large number of formats: %"PRIu32"", *numFormats);
goto error;
}
@ -373,7 +373,7 @@ static CLIPRDR_FORMAT* xf_cliprdr_parse_server_format_list(BYTE* data,
if (formatNameLength == Stream_GetRemainingLength(s))
{
WLog_ERR(TAG, "missing terminating null byte, %zu bytes left to read",
WLog_ERR(TAG, "missing terminating null byte, %"PRIuz" bytes left to read",
formatNameLength);
goto error;
}
@ -428,7 +428,7 @@ static CLIPRDR_FORMAT* xf_cliprdr_get_raw_server_formats(xfClipboard* clipboard,
{
WLog_ERR(TAG,
"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);
(void*) data, length, format, (unsigned long) type, (unsigned long) clipboard->raw_format_list_atom);
}
if (data)
@ -1036,7 +1036,7 @@ UINT xf_cliprdr_send_client_format_list(xfClipboard* clipboard)
{
if (!(formats = (CLIPRDR_FORMAT*) calloc(numFormats, sizeof(CLIPRDR_FORMAT))))
{
WLog_ERR(TAG, "failed to allocate %d CLIPRDR_FORMAT structs", numFormats);
WLog_ERR(TAG, "failed to allocate %"PRIu32" CLIPRDR_FORMAT structs", numFormats);
return CHANNEL_RC_NO_MEMORY;
}
}

View File

@ -163,8 +163,8 @@ static BOOL xf_event_execute_action_script(xfContext* xfc, XEvent* event)
if (!match)
return FALSE;
sprintf_s(command, sizeof(command), "%s xevent %s %d",
xfc->actionScript, xeventName, (int) xfc->window->handle);
sprintf_s(command, sizeof(command), "%s xevent %s %lu",
xfc->actionScript, xeventName, (unsigned long) xfc->window->handle);
actionScript = popen(command, "r");
if (!actionScript)
@ -976,8 +976,8 @@ BOOL xf_event_process(freerdp* instance, XEvent* event)
xf_event_execute_action_script(xfc, event);
if (event->type != MotionNotify)
DEBUG_X11("%s Event(%d): wnd=0x%04X", X11_EVENT_STRINGS[event->type],
event->type, (UINT32) event->xany.window);
DEBUG_X11("%s Event(%d): wnd=0x%08lX", X11_EVENT_STRINGS[event->type],
event->type, (unsigned long) event->xany.window);
switch (event->type)
{

View File

@ -210,7 +210,7 @@ static BOOL xf_set_rop3(xfContext* xfc, UINT32 rop3)
if (function < 0)
{
WLog_ERR(TAG, "Unsupported ROP3: 0x%08X", rop3);
WLog_ERR(TAG, "Unsupported ROP3: 0x%08"PRIX32"", rop3);
XSetFunction(xfc->display, xfc->gc, GXclear);
return FALSE;
}
@ -391,7 +391,7 @@ static BOOL xf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
break;
default:
WLog_ERR(TAG, "unimplemented brush style:%d", brush->style);
WLog_ERR(TAG, "unimplemented brush style:%"PRIu32"", brush->style);
goto fail;
}
@ -704,7 +704,7 @@ static BOOL xf_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
break;
default:
WLog_ERR(TAG, "Mem3Blt unimplemented brush style:%d", brush->style);
WLog_ERR(TAG, "Mem3Blt unimplemented brush style:%"PRIu32"", brush->style);
goto fail;
}
@ -773,7 +773,7 @@ static BOOL xf_gdi_polygon_sc(rdpContext* context,
break;
default:
WLog_ERR(TAG, "PolygonSC unknown fillMode: %d", polygon_sc->fillMode);
WLog_ERR(TAG, "PolygonSC unknown fillMode: %"PRIu32"", polygon_sc->fillMode);
break;
}
@ -844,7 +844,7 @@ static BOOL xf_gdi_polygon_cb(rdpContext* context,
break;
default:
WLog_ERR(TAG, "PolygonCB unknown fillMode: %d", polygon_cb->fillMode);
WLog_ERR(TAG, "PolygonCB unknown fillMode: %"PRIu32"", polygon_cb->fillMode);
break;
}
@ -885,7 +885,7 @@ static BOOL xf_gdi_polygon_cb(rdpContext* context,
}
else
{
WLog_ERR(TAG, "PolygonCB unimplemented brush style:%d", brush->style);
WLog_ERR(TAG, "PolygonCB unimplemented brush style:%"PRIu32"", brush->style);
}
XSetFunction(xfc->display, xfc->gc, GXcopy);
@ -1050,7 +1050,7 @@ static BOOL xf_gdi_surface_bits(rdpContext* context,
break;
default:
WLog_ERR(TAG, "Unsupported codecID %d", cmd->codecID);
WLog_ERR(TAG, "Unsupported codecID %"PRIu32"", cmd->codecID);
ret = TRUE;
goto fail;
}

View File

@ -207,7 +207,7 @@ void xf_keyboard_send_key(xfContext* xfc, BOOL down, BYTE keycode)
if (rdp_scancode == RDP_SCANCODE_UNKNOWN)
{
WLog_ERR(TAG, "Unknown key with X keycode 0x%02x", keycode);
WLog_ERR(TAG, "Unknown key with X keycode 0x%02"PRIx8"", keycode);
}
else if (rdp_scancode == RDP_SCANCODE_PAUSE &&
!xf_keyboard_key_pressed(xfc, XK_Control_L)

View File

@ -64,7 +64,7 @@ int xf_list_monitors(xfContext* xfc)
for (i = 0; i < nmonitors; i++)
{
printf(" %s [%d] %dx%d\t+%d+%d\n",
printf(" %s [%d] %hdx%hd\t+%hd+%hd\n",
(i == 0) ? "*" : " ", i,
screen[i].width, screen[i].height,
screen[i].x_org, screen[i].y_org);
@ -87,8 +87,8 @@ int xf_list_monitors(xfContext* xfc)
}
screen = ScreenOfDisplay(display, DefaultScreen(display));
printf(" * [0] %dx%d\t+%d+%d\n", WidthOfScreen(screen),
HeightOfScreen(screen), 0, 0);
printf(" * [0] %dx%d\t+0+0\n", WidthOfScreen(screen),
HeightOfScreen(screen));
XCloseDisplay(display);
#endif
return 0;

View File

@ -186,7 +186,7 @@ int xf_tsmf_xv_video_frame_event(TsmfClientContext* tsmf, TSMF_VIDEO_FRAME_EVENT
}
else
{
WLog_DBG(TAG, "pixel format 0x%X not supported by hardware.", pixfmt);
WLog_DBG(TAG, "pixel format 0x%"PRIX32" not supported by hardware.", pixfmt);
free(xrects);
return -1003;
}
@ -359,7 +359,7 @@ int xf_tsmf_xv_init(xfContext* xfc, TsmfClientContext* tsmf)
for (i = 0; i < num_adaptors; i++)
{
WLog_DBG(TAG, "adapter port %ld-%ld (%s)", ai[i].base_id,
WLog_DBG(TAG, "adapter port %lu-%lu (%s)", ai[i].base_id,
ai[i].base_id + ai[i].num_ports - 1, ai[i].name);
if (xv->xv_port == 0 && i == num_adaptors - 1)

View File

@ -129,8 +129,7 @@ void xf_SendClientEvent(xfContext* xfc, Window window, Atom atom,
xevent.xclient.data.l[i] = va_arg(argp, int);
}
DEBUG_X11("Send ClientMessage Event: wnd=0x%04X",
(unsigned int) xevent.xclient.window);
DEBUG_X11("Send ClientMessage Event: wnd=0x%04lX", (unsigned long) xevent.xclient.window);
XSendEvent(xfc->display, RootWindowOfScreen(xfc->screen), False,
SubstructureRedirectMask | SubstructureNotifyMask, &xevent);
XSync(xfc->display, False);
@ -654,7 +653,7 @@ int xf_AppWindowInit(xfContext* xfc, xfAppWindow* appWindow)
else
{
class = malloc(sizeof("RAIL:00000000"));
sprintf_s(class, sizeof("RAIL:00000000"), "RAIL:%08X", appWindow->windowId);
sprintf_s(class, sizeof("RAIL:00000000"), "RAIL:%08"PRIX32"", appWindow->windowId);
class_hints->res_class = class;
}

View File

@ -1362,7 +1362,7 @@ int freerdp_client_settings_command_line_status_print(rdpSettings* settings,
printf("\nKeyboard Layouts\n");
for (i = 0; layouts[i].code; i++)
printf("0x%08X\t%s\n", (int) layouts[i].code, layouts[i].name);
printf("0x%08"PRIX32"\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_VARIANT);
@ -1370,7 +1370,7 @@ int freerdp_client_settings_command_line_status_print(rdpSettings* settings,
printf("\nKeyboard Layout Variants\n");
for (i = 0; layouts[i].code; i++)
printf("0x%08X\t%s\n", (int) layouts[i].code, layouts[i].name);
printf("0x%08"PRIX32"\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_IME);
@ -1378,7 +1378,7 @@ int freerdp_client_settings_command_line_status_print(rdpSettings* settings,
printf("\nKeyboard Input Method Editors (IMEs)\n");
for (i = 0; layouts[i].code; i++)
printf("0x%08X\t%s\n", (int) layouts[i].code, layouts[i].name);
printf("0x%08"PRIX32"\t%s\n", layouts[i].code, layouts[i].name);
free(layouts);
printf("\n");
@ -1497,7 +1497,7 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
settings->ServerPort = atoi(&p2[2]);
}
printf("hostname %s port %d\n", settings->ServerHostname, settings->ServerPort);
printf("hostname %s port %"PRIu32"\n", settings->ServerHostname, settings->ServerPort);
}
}
CommandLineSwitchCase(arg, "spn-class")

View File

@ -539,7 +539,7 @@ int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSe
}
free(str);
WLog_WARN(TAG, "-g %s -> /size:%s or /w:%d /h:%d", arg->Value, arg->Value,
WLog_WARN(TAG, "-g %s -> /size:%s or /w:%"PRIu32" /h:%"PRIu32"", arg->Value, arg->Value,
settings->DesktopWidth, settings->DesktopHeight);
}
CommandLineSwitchCase(arg, "k")
@ -799,7 +799,7 @@ int freerdp_client_parse_old_command_line_arguments(int argc, char** argv, rdpSe
WLog_WARN(TAG, "%s -> /v:%s", settings->ServerHostname, settings->ServerHostname);
if (settings->ServerPort != 3389)
WLog_WARN(TAG, " /port:%d", settings->ServerPort);
WLog_WARN(TAG, " /port:%"PRIu32"", settings->ServerPort);
WLog_WARN(TAG, "");
return 1;

View File

@ -280,19 +280,19 @@ int TestClientRdpFile(int argc, char* argv[])
if (file->UseMultiMon != 0)
{
printf("UseMultiMon mismatch: Actual: %d, Expected: %d\n", file->UseMultiMon, 0);
printf("UseMultiMon mismatch: Actual: %"PRIu32", Expected: 0\n", file->UseMultiMon);
return -1;
}
if (file->ScreenModeId != 2)
{
printf("ScreenModeId mismatch: Actual: %d, Expected: %d\n", file->ScreenModeId, 2);
printf("ScreenModeId mismatch: Actual: %"PRIu32", Expected: 2\n", file->ScreenModeId);
return -1;
}
if (file->GatewayProfileUsageMethod != 1)
{
printf("GatewayProfileUsageMethod mismatch: Actual: %d, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
printf("GatewayProfileUsageMethod mismatch: Actual: %"PRIu32", Expected: 1\n", file->GatewayProfileUsageMethod);
return -1;
}
@ -312,19 +312,19 @@ int TestClientRdpFile(int argc, char* argv[])
if (file->UseMultiMon != 0)
{
printf("UseMultiMon mismatch: Actual: %d, Expected: %d\n", file->UseMultiMon, 0);
printf("UseMultiMon mismatch: Actual: %"PRIu32", Expected: 0\n", file->UseMultiMon);
return -1;
}
if (file->ScreenModeId != 2)
{
printf("ScreenModeId mismatch: Actual: %d, Expected: %d\n", file->ScreenModeId, 2);
printf("ScreenModeId mismatch: Actual: %"PRIu32", Expected: 2\n", file->ScreenModeId);
return -1;
}
if (file->GatewayProfileUsageMethod != 1)
{
printf("GatewayProfileUsageMethod mismatch: Actual: %d, Expected: %d\n", file->GatewayProfileUsageMethod, 1);
printf("GatewayProfileUsageMethod mismatch: Actual: %"PRIu32", Expected: 1\n", file->GatewayProfileUsageMethod);
return -1;
}
@ -369,7 +369,7 @@ int TestClientRdpFile(int argc, char* argv[])
}
else if (line->flags & RDP_FILE_LINE_FLAG_TYPE_INTEGER)
{
printf("line %02d: name: %s value: %d, %s\n",
printf("line %02d: name: %s value: %"PRIu32", %s\n",
line->index, line->name, line->iValue,
(line->flags & RDP_FILE_LINE_FLAG_STANDARD) ? "standard" : "non-standard");
}

View File

@ -35,7 +35,7 @@ static void ios_OnChannelConnectedEventHandler(
if (!context || !e)
{
WLog_FATAL(TAG, "%s(context=%p, EventArgs=%p",
__FUNCTION__, context, e);
__FUNCTION__, (void*) context, (void*) e);
return;
}
@ -66,7 +66,7 @@ static void ios_OnChannelDisconnectedEventHandler(
if (!context || !e)
{
WLog_FATAL(TAG, "%s(context=%p, EventArgs=%p",
__FUNCTION__, context, e);
__FUNCTION__, (void*) context, (void*) e);
return;
}

View File

@ -110,6 +110,7 @@ option(WITH_DEBUG_NTLM "Print NTLM debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_TSG "Print Terminal Server Gateway debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RAIL "Print RemoteApp debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RDP "Print RDP debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RDPEI "Print input virtual channel debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_REDIR "Redirection debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RFX "Print RemoteFX debug messages." ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_SCARD "Print smartcard debug messages" ${DEFAULT_DEBUG_OPTION})

View File

@ -68,7 +68,6 @@
#cmakedefine WITH_DEBUG_NLA
#cmakedefine WITH_DEBUG_NTLM
#cmakedefine WITH_DEBUG_TSG
#cmakedefine WITH_DEBUG_ORDERS
#cmakedefine WITH_DEBUG_RAIL
#cmakedefine WITH_DEBUG_RDP
#cmakedefine WITH_DEBUG_REDIR

View File

@ -236,7 +236,7 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmapCache, UINT32 id,
if (id > bitmapCache->maxCells)
{
WLog_ERR(TAG, "get invalid bitmap cell id: %d", id);
WLog_ERR(TAG, "get invalid bitmap cell id: %"PRIu32"", id);
return NULL;
}
@ -246,7 +246,7 @@ rdpBitmap* bitmap_cache_get(rdpBitmapCache* bitmapCache, UINT32 id,
}
else if (index > bitmapCache->cells[id].number)
{
WLog_ERR(TAG, "get invalid bitmap index %d in cell id: %d", index, id);
WLog_ERR(TAG, "get invalid bitmap index %"PRIu32" in cell id: %"PRIu32"", index, id);
return NULL;
}
@ -259,7 +259,7 @@ BOOL bitmap_cache_put(rdpBitmapCache* bitmapCache, UINT32 id, UINT32 index,
{
if (id > bitmapCache->maxCells)
{
WLog_ERR(TAG, "put invalid bitmap cell id: %d", id);
WLog_ERR(TAG, "put invalid bitmap cell id: %"PRIu32"", id);
return FALSE;
}
@ -269,7 +269,7 @@ BOOL bitmap_cache_put(rdpBitmapCache* bitmapCache, UINT32 id, UINT32 index,
}
else if (index > bitmapCache->cells[id].number)
{
WLog_ERR(TAG, "put invalid bitmap index %d in cell id: %d", index, id);
WLog_ERR(TAG, "put invalid bitmap index %"PRIu32" in cell id: %"PRIu32"", index, id);
return FALSE;
}

View File

@ -116,7 +116,7 @@ void* brush_cache_get(rdpBrushCache* brushCache, UINT32 index, UINT32* bpp)
{
if (index >= brushCache->maxMonoEntries)
{
WLog_ERR(TAG, "invalid brush (%d bpp) index: 0x%04X", *bpp, index);
WLog_ERR(TAG, "invalid brush (%"PRIu32" bpp) index: 0x%08"PRIX32"", *bpp, index);
return NULL;
}
@ -127,7 +127,7 @@ void* brush_cache_get(rdpBrushCache* brushCache, UINT32 index, UINT32* bpp)
{
if (index >= brushCache->maxEntries)
{
WLog_ERR(TAG, "invalid brush (%d bpp) index: 0x%04X", *bpp, index);
WLog_ERR(TAG, "invalid brush (%"PRIu32" bpp) index: 0x%08"PRIX32"", *bpp, index);
return NULL;
}
@ -137,7 +137,7 @@ void* brush_cache_get(rdpBrushCache* brushCache, UINT32 index, UINT32* bpp)
if (entry == NULL)
{
WLog_ERR(TAG, "invalid brush (%d bpp) at index: 0x%04X", *bpp, index);
WLog_ERR(TAG, "invalid brush (%"PRIu32" bpp) at index: 0x%08"PRIX32"", *bpp, index);
return NULL;
}
@ -150,7 +150,7 @@ void brush_cache_put(rdpBrushCache* brushCache, UINT32 index, void* entry, UINT3
{
if (index >= brushCache->maxMonoEntries)
{
WLog_ERR(TAG, "invalid brush (%d bpp) index: 0x%04X", bpp, index);
WLog_ERR(TAG, "invalid brush (%"PRIu32" bpp) index: 0x%08"PRIX32"", bpp, index);
free(entry);
return;
}
@ -164,7 +164,7 @@ void brush_cache_put(rdpBrushCache* brushCache, UINT32 index, void* entry, UINT3
{
if (index >= brushCache->maxEntries)
{
WLog_ERR(TAG, "invalid brush (%d bpp) index: 0x%04X", bpp, index);
WLog_ERR(TAG, "invalid brush (%"PRIu32" bpp) index: 0x%08"PRIX32"", bpp, index);
free(entry);
return;
}

View File

@ -577,25 +577,25 @@ static BOOL update_gdi_cache_glyph_v2(rdpContext* context,
rdpGlyph* glyph_cache_get(rdpGlyphCache* glyphCache, UINT32 id, UINT32 index)
{
rdpGlyph* glyph;
WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCacheGet: id: %d index: %d", id,
WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCacheGet: id: %"PRIu32" index: %"PRIu32"", id,
index);
if (id > 9)
{
WLog_ERR(TAG, "invalid glyph cache id: %d", id);
WLog_ERR(TAG, "invalid glyph cache id: %"PRIu32"", id);
return NULL;
}
if (index > glyphCache->glyphCache[id].number)
{
WLog_ERR(TAG, "index %d out of range for cache id: %d", index, id);
WLog_ERR(TAG, "index %"PRIu32" out of range for cache id: %"PRIu32"", index, id);
return NULL;
}
glyph = glyphCache->glyphCache[id].entries[index];
if (!glyph)
WLog_ERR(TAG, "no glyph found at cache index: %d in cache id: %d", index, id);
WLog_ERR(TAG, "no glyph found at cache index: %"PRIu32" in cache id: %"PRIu32"", index, id);
return glyph;
}
@ -607,17 +607,17 @@ BOOL glyph_cache_put(rdpGlyphCache* glyphCache, UINT32 id, UINT32 index,
if (id > 9)
{
WLog_ERR(TAG, "invalid glyph cache id: %d", id);
WLog_ERR(TAG, "invalid glyph cache id: %"PRIu32"", id);
return FALSE;
}
if (index > glyphCache->glyphCache[id].number)
{
WLog_ERR(TAG, "invalid glyph cache index: %d in cache id: %d", index, id);
WLog_ERR(TAG, "invalid glyph cache index: %"PRIu32" in cache id: %"PRIu32"", index, id);
return FALSE;
}
WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCachePut: id: %d index: %d", id,
WLog_Print(glyphCache->log, WLOG_DEBUG, "GlyphCachePut: id: %"PRIu32" index: %"PRIu32"", id,
index);
prevGlyph = glyphCache->glyphCache[id].entries[index];
@ -635,17 +635,17 @@ const void* glyph_cache_fragment_get(rdpGlyphCache* glyphCache, UINT32 index,
if (index > 255)
{
WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
WLog_ERR(TAG, "invalid glyph cache fragment index: %"PRIu32"", index);
return NULL;
}
fragment = glyphCache->fragCache.entries[index].fragment;
*size = (BYTE) glyphCache->fragCache.entries[index].size;
WLog_Print(glyphCache->log, WLOG_DEBUG,
"GlyphCacheFragmentGet: index: %d size: %d", index, *size);
"GlyphCacheFragmentGet: index: %"PRIu32" size: %"PRIu32"", index, *size);
if (!fragment)
WLog_ERR(TAG, "invalid glyph fragment at index:%d", index);
WLog_ERR(TAG, "invalid glyph fragment at index:%"PRIu32"", index);
return fragment;
}
@ -658,7 +658,7 @@ BOOL glyph_cache_fragment_put(rdpGlyphCache* glyphCache, UINT32 index,
if (index > 255)
{
WLog_ERR(TAG, "invalid glyph cache fragment index: %d", index);
WLog_ERR(TAG, "invalid glyph cache fragment index: %"PRIu32"", index);
return FALSE;
}
@ -668,7 +668,7 @@ BOOL glyph_cache_fragment_put(rdpGlyphCache* glyphCache, UINT32 index,
return FALSE;
WLog_Print(glyphCache->log, WLOG_DEBUG,
"GlyphCacheFragmentPut: index: %d size: %d", index, size);
"GlyphCacheFragmentPut: index: %"PRIu32" size: %"PRIu32"", index, size);
CopyMemory(copy, fragment, size);
prevFragment = glyphCache->fragCache.entries[index].fragment;
glyphCache->fragCache.entries[index].fragment = copy;

View File

@ -70,7 +70,7 @@ void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index)
if (index >= nine_grid->maxEntries)
{
WLog_ERR(TAG, "invalid NineGrid index: 0x%04X", index);
WLog_ERR(TAG, "invalid NineGrid index: 0x%08"PRIX32"", index);
return NULL;
}
@ -78,7 +78,7 @@ void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index)
if (entry == NULL)
{
WLog_ERR(TAG, "invalid NineGrid at index: 0x%04X", index);
WLog_ERR(TAG, "invalid NineGrid at index: 0x%08"PRIX32"", index);
return NULL;
}
@ -89,7 +89,7 @@ void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry)
{
if (index >= nine_grid->maxEntries)
{
WLog_ERR(TAG, "invalid NineGrid index: 0x%04X", index);
WLog_ERR(TAG, "invalid NineGrid index: 0x%08"PRIX32"", index);
return;
}

View File

@ -101,7 +101,7 @@ rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreenCache, UINT32 index)
if (index >= offscreenCache->maxEntries)
{
WLog_ERR(TAG, "invalid offscreen bitmap index: 0x%04X", index);
WLog_ERR(TAG, "invalid offscreen bitmap index: 0x%08"PRIX32"", index);
return NULL;
}
@ -109,7 +109,7 @@ rdpBitmap* offscreen_cache_get(rdpOffscreenCache* offscreenCache, UINT32 index)
if (!bitmap)
{
WLog_ERR(TAG, "invalid offscreen bitmap at index: 0x%04X", index);
WLog_ERR(TAG, "invalid offscreen bitmap at index: 0x%08"PRIX32"", index);
return NULL;
}
@ -121,7 +121,7 @@ void offscreen_cache_put(rdpOffscreenCache* offscreenCache, UINT32 index,
{
if (index >= offscreenCache->maxEntries)
{
WLog_ERR(TAG, "invalid offscreen bitmap index: 0x%04X", index);
WLog_ERR(TAG, "invalid offscreen bitmap index: 0x%08"PRIX32"", index);
return;
}
@ -135,7 +135,7 @@ void offscreen_cache_delete(rdpOffscreenCache* offscreenCache, UINT32 index)
if (index >= offscreenCache->maxEntries)
{
WLog_ERR(TAG, "invalid offscreen bitmap index (delete): 0x%04X", index);
WLog_ERR(TAG, "invalid offscreen bitmap index (delete): 0x%08"PRIX32"", index);
return;
}

View File

@ -54,7 +54,7 @@ void* palette_cache_get(rdpPaletteCache* paletteCache, UINT32 index)
if (index >= paletteCache->maxEntries)
{
WLog_ERR(TAG, "invalid color table index: 0x%04X", index);
WLog_ERR(TAG, "invalid color table index: 0x%08"PRIX32"", index);
return NULL;
}
@ -62,7 +62,7 @@ void* palette_cache_get(rdpPaletteCache* paletteCache, UINT32 index)
if (!entry)
{
WLog_ERR(TAG, "invalid color table at index: 0x%04X", index);
WLog_ERR(TAG, "invalid color table at index: 0x%08"PRIX32"", index);
return NULL;
}
@ -73,7 +73,7 @@ void palette_cache_put(rdpPaletteCache* paletteCache, UINT32 index, void* entry)
{
if (index >= paletteCache->maxEntries)
{
WLog_ERR(TAG, "invalid color table index: 0x%04X", index);
WLog_ERR(TAG, "invalid color table index: 0x%08"PRIX32"", index);
free(entry);
return;
}

View File

@ -96,7 +96,7 @@ static BOOL update_pointer_system(rdpContext* context,
break;
default:
WLog_ERR(TAG, "Unknown system pointer type (0x%08X)", pointer_system->type);
WLog_ERR(TAG, "Unknown system pointer type (0x%08"PRIX32")", pointer_system->type);
}
return TRUE;
@ -237,7 +237,7 @@ const rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache,
if (index >= pointer_cache->cacheSize)
{
WLog_ERR(TAG, "invalid pointer index:%d", index);
WLog_ERR(TAG, "invalid pointer index:%"PRIu32"", index);
return NULL;
}
@ -252,7 +252,7 @@ BOOL pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index,
if (index >= pointer_cache->cacheSize)
{
WLog_ERR(TAG, "invalid pointer index:%d", index);
WLog_ERR(TAG, "invalid pointer index:%"PRIu32"", index);
return FALSE;
}

View File

@ -65,7 +65,7 @@ UINT32 rdpsnd_compute_audio_time_length(AUDIO_FORMAT* format, int size)
}
else
{
WLog_ERR(TAG, "rdpsnd_compute_audio_time_length: unknown format %d", format->wFormatTag);
WLog_ERR(TAG, "rdpsnd_compute_audio_time_length: unknown format %"PRIu16"", format->wFormatTag);
}
}
@ -115,8 +115,8 @@ char* rdpsnd_get_audio_tag_string(UINT16 wFormatTag)
void rdpsnd_print_audio_format(AUDIO_FORMAT* format)
{
WLog_INFO(TAG, "%s:\t wFormatTag: 0x%04X nChannels: %d nSamplesPerSec: %d nAvgBytesPerSec: %d "
"nBlockAlign: %d wBitsPerSample: %d cbSize: %d",
WLog_INFO(TAG, "%s:\t wFormatTag: 0x%04"PRIX16" nChannels: %"PRIu16" nSamplesPerSec: %"PRIu32" "
"nAvgBytesPerSec: %"PRIu32" nBlockAlign: %"PRIu16" wBitsPerSample: %"PRIu16" cbSize: %"PRIu16"",
rdpsnd_get_audio_tag_string(format->wFormatTag), format->wFormatTag,
format->nChannels, format->nSamplesPerSec, format->nAvgBytesPerSec,
format->nBlockAlign, format->wBitsPerSample, format->cbSize);
@ -129,7 +129,7 @@ void rdpsnd_print_audio_formats(AUDIO_FORMAT* formats, UINT16 count)
if (formats)
{
WLog_INFO(TAG, "AUDIO_FORMATS (%d) ={", count);
WLog_INFO(TAG, "AUDIO_FORMATS (%"PRIu16") ={", count);
for (index = 0; index < (int) count; index++)
{

View File

@ -104,7 +104,7 @@ static BOOL clear_decompress_nscodec(NSC_CONTEXT* nsc, UINT32 width,
if (Stream_GetRemainingLength(s) < bitmapDataByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
bitmapDataByteCount);
return FALSE;
}
@ -138,7 +138,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (Stream_GetRemainingLength(s) < bitmapDataByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
bitmapDataByteCount);
return FALSE;
}
@ -148,7 +148,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (paletteCount > 127)
{
WLog_ERR(TAG, "paletteCount %lu", paletteCount);
WLog_ERR(TAG, "paletteCount %"PRIu8"", paletteCount);
return FALSE;
}
@ -173,8 +173,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -189,8 +188,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
{
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -201,8 +199,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
{
if (Stream_GetRemainingLength(s) < 4)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
4);
WLog_ERR(TAG, "stream short %"PRIuz" [4 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -213,13 +210,13 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (startIndex >= paletteCount)
{
WLog_ERR(TAG, "startIndex %lu > paletteCount %lu]", startIndex, paletteCount);
WLog_ERR(TAG, "startIndex %"PRIu8" > paletteCount %"PRIu8"]", startIndex, paletteCount);
return FALSE;
}
if (stopIndex >= paletteCount)
{
WLog_ERR(TAG, "stopIndex %lu > paletteCount %lu]", stopIndex, paletteCount);
WLog_ERR(TAG, "stopIndex %"PRIu8" > paletteCount %"PRIu8"]", stopIndex, paletteCount);
return FALSE;
}
@ -227,7 +224,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (suiteIndex > 127)
{
WLog_ERR(TAG, "suiteIndex %lu > %lu]", suiteIndex, 127);
WLog_ERR(TAG, "suiteIndex %"PRIu8" > 127]", suiteIndex);
return FALSE;
}
@ -235,7 +232,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if ((pixelIndex + runLengthFactor) > pixelCount)
{
WLog_ERR(TAG, "pixelIndex %lu + runLengthFactor %lu > pixelCount %lu",
WLog_ERR(TAG, "pixelIndex %"PRIu32" + runLengthFactor %"PRIu32" > pixelCount %"PRIu32"",
pixelIndex, runLengthFactor,
pixelCount);
return FALSE;
@ -260,7 +257,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if ((pixelIndex + (suiteDepth + 1)) > pixelCount)
{
WLog_ERR(TAG, "pixelIndex %lu + suiteDepth %lu + 1 > pixelCount %lu",
WLog_ERR(TAG, "pixelIndex %"PRIu32" + suiteDepth %"PRIu8" + 1 > pixelCount %"PRIu32"",
pixelIndex, suiteDepth,
pixelCount);
return FALSE;
@ -274,7 +271,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (suiteIndex > 127)
{
WLog_ERR(TAG, "suiteIndex %lu > %lu", suiteIndex, 127);
WLog_ERR(TAG, "suiteIndex %"PRIu8" > 127", suiteIndex);
return FALSE;
}
@ -297,7 +294,7 @@ static BOOL clear_decompress_subcode_rlex(wStream* s,
if (pixelIndex != pixelCount)
{
WLog_ERR(TAG, "pixelIndex %lu != pixelCount %lu", pixelIndex, pixelCount);
WLog_ERR(TAG, "pixelIndex %"PRIu32" != pixelCount %"PRIu32"", pixelIndex, pixelCount);
return FALSE;
}
@ -322,7 +319,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
if (Stream_GetRemainingLength(s) < residualByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
residualByteCount);
return FALSE;
}
@ -340,8 +337,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
if (Stream_GetRemainingLength(s) < 4)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
4);
WLog_ERR(TAG, "stream short %"PRIuz" [4 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -356,8 +352,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
{
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -368,8 +363,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
{
if (Stream_GetRemainingLength(s) < 4)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
4);
WLog_ERR(TAG, "stream short %"PRIuz" [4 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -380,7 +374,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
if ((pixelIndex + runLengthFactor) > pixelCount)
{
WLog_ERR(TAG, "pixelIndex %lu + runLengthFactor %lu > pixelCount %lu",
WLog_ERR(TAG, "pixelIndex %"PRIu32" + runLengthFactor %"PRIu32" > pixelCount %"PRIu32"",
pixelIndex, runLengthFactor,
pixelCount);
return FALSE;
@ -399,7 +393,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear,
if (pixelIndex != pixelCount)
{
WLog_ERR(TAG, "pixelIndex %lu != pixelCount %lu", pixelIndex, pixelCount);
WLog_ERR(TAG, "pixelIndex %"PRIu32" != pixelCount %"PRIu32"", pixelIndex, pixelCount);
return FALSE;
}
@ -425,7 +419,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (Stream_GetRemainingLength(s) < subcodecByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
subcodecByteCount);
return FALSE;
}
@ -439,8 +433,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (Stream_GetRemainingLength(s) < 13)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
13);
WLog_ERR(TAG, "stream short %"PRIuz" [13 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -454,7 +447,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (Stream_GetRemainingLength(s) < bitmapDataByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
bitmapDataByteCount);
return FALSE;
}
@ -464,13 +457,13 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (width > nWidth)
{
WLog_ERR(TAG, "width %lu > nWidth %lu", width, nWidth);
WLog_ERR(TAG, "width %"PRIu16" > nWidth %"PRIu32"", width, nWidth);
return FALSE;
}
if (height > nHeight)
{
WLog_ERR(TAG, "height %lu > nHeight %lu", height, nHeight);
WLog_ERR(TAG, "height %"PRIu16" > nHeight %"PRIu32"", height, nHeight);
return FALSE;
}
@ -482,7 +475,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (!clear->TempBuffer)
{
WLog_ERR(TAG, "clear->TempBuffer realloc failed for %lu bytes",
WLog_ERR(TAG, "clear->TempBuffer realloc failed for %"PRIu32" bytes",
clear->TempSize);
return FALSE;
}
@ -497,7 +490,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
if (bitmapDataByteCount != nSrcSize)
{
WLog_ERR(TAG, "bitmapDataByteCount %lu != nSrcSize %lu", bitmapDataByteCount,
WLog_ERR(TAG, "bitmapDataByteCount %"PRIu32" != nSrcSize %"PRIu32"", bitmapDataByteCount,
nSrcSize);
return FALSE;
}
@ -534,7 +527,7 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* clear, wStream* s,
break;
default:
WLog_ERR(TAG, "Unknown subcodec ID %lu", subcodecId);
WLog_ERR(TAG, "Unknown subcodec ID %"PRIu8"", subcodecId);
return FALSE;
}
@ -558,7 +551,7 @@ static BOOL resize_vbar_entry(CLEAR_CONTEXT* clear, CLEAR_VBAR_ENTRY* vBarEntry)
if (!tmp)
{
WLog_ERR(TAG, "vBarEntry->pixels realloc %lu failed", vBarEntry->count * bpp);
WLog_ERR(TAG, "vBarEntry->pixels realloc %"PRIu32" failed", vBarEntry->count * bpp);
return FALSE;
}
@ -568,8 +561,8 @@ static BOOL resize_vbar_entry(CLEAR_CONTEXT* clear, CLEAR_VBAR_ENTRY* vBarEntry)
if (!vBarEntry->pixels && vBarEntry->size)
{
WLog_ERR(TAG, "!vBarEntry->pixels %lu && vBarEntry->size %lu",
vBarEntry->pixels, vBarEntry->size);
WLog_ERR(TAG, "vBarEntry->pixels is NULL but vBarEntry->size is %"PRIu32"",
vBarEntry->size);
return FALSE;
}
@ -590,8 +583,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (Stream_GetRemainingLength(s) < bandsByteCount)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
11);
WLog_ERR(TAG, "stream short %"PRIuz" [11 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -615,8 +607,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (Stream_GetRemainingLength(s) < 11)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
11);
WLog_ERR(TAG, "stream short %"PRIuz" [11 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -632,13 +623,13 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (xEnd < xStart)
{
WLog_ERR(TAG, "xEnd %lu < xStart %lu", xEnd, xStart);
WLog_ERR(TAG, "xEnd %"PRIu16" < xStart %"PRIu16"", xEnd, xStart);
return FALSE;
}
if (yEnd < yStart)
{
WLog_ERR(TAG, "yEnd %lu < yStart %lu", yEnd, yStart);
WLog_ERR(TAG, "yEnd %"PRIu16" < yStart %"PRIu16"", yEnd, yStart);
return FALSE;
}
@ -654,8 +645,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -665,7 +655,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (vBarHeight > 52)
{
WLog_ERR(TAG, "vBarHeight > 52", vBarHeight);
WLog_ERR(TAG, "vBarHeight (%"PRIu32") > 52", vBarHeight);
return FALSE;
}
@ -676,14 +666,13 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (!vBarShortEntry)
{
WLog_ERR(TAG, "missing vBarShortEntry %lu", vBarIndex);
WLog_ERR(TAG, "missing vBarShortEntry %"PRIu16"", vBarIndex);
return FALSE;
}
if (Stream_GetRemainingLength(s) < 1)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
1);
WLog_ERR(TAG, "stream short %"PRIuz" [1 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -699,7 +688,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (vBarYOff < vBarYOn)
{
WLog_ERR(TAG, "vBarYOff %lu < vBarYOn %lu", vBarYOff, vBarYOn);
WLog_ERR(TAG, "vBarYOff %"PRIu16" < vBarYOn %"PRIu16"", vBarYOff, vBarYOn);
return FALSE;
}
@ -707,13 +696,13 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (vBarShortPixelCount > 52)
{
WLog_ERR(TAG, "vBarShortPixelCount %lu > 52", vBarShortPixelCount);
WLog_ERR(TAG, "vBarShortPixelCount %"PRIu32" > 52", vBarShortPixelCount);
return FALSE;
}
if (Stream_GetRemainingLength(s) < (vBarShortPixelCount * 3))
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
WLog_ERR(TAG, "stream short %"PRIuz" [%"PRIu32" expected]", Stream_GetRemainingLength(s),
(vBarShortPixelCount * 3));
return FALSE;
}
@ -721,7 +710,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (clear->ShortVBarStorageCursor >= CLEARCODEC_VBAR_SHORT_SIZE)
{
WLog_ERR(TAG,
"clear->ShortVBarStorageCursor %lu >= CLEARCODEC_VBAR_SHORT_SIZE %lu",
"clear->ShortVBarStorageCursor %"PRIu32" >= CLEARCODEC_VBAR_SHORT_SIZE (%"PRIu32")",
clear->ShortVBarStorageCursor, CLEARCODEC_VBAR_SHORT_SIZE);
return FALSE;
}
@ -759,7 +748,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
}
else
{
WLog_ERR(TAG, "invalid vBarHeader %08lX", vBarHeader);
WLog_ERR(TAG, "invalid vBarHeader 0x%04"PRIX16"", vBarHeader);
return FALSE; /* invalid vBarHeader */
}
@ -771,7 +760,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (clear->VBarStorageCursor >= CLEARCODEC_VBAR_SIZE)
{
WLog_ERR(TAG, "clear->VBarStorageCursor %lu >= CLEARCODEC_VBAR_SIZE %lu",
WLog_ERR(TAG, "clear->VBarStorageCursor %"PRIu32" >= CLEARCODEC_VBAR_SIZE %"PRIu32"",
clear->VBarStorageCursor,
CLEARCODEC_VBAR_SIZE);
return FALSE;
@ -842,7 +831,7 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* clear,
if (vBarEntry->count != vBarHeight)
{
WLog_ERR(TAG, "vBarEntry->count %lu != vBarHeight %lu", vBarEntry->count,
WLog_ERR(TAG, "vBarEntry->count %"PRIu32" != vBarHeight %"PRIu32"", vBarEntry->count,
vBarHeight);
return FALSE;
}
@ -894,7 +883,7 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if ((glyphFlags & CLEARCODEC_FLAG_GLYPH_HIT) &&
!(glyphFlags & CLEARCODEC_FLAG_GLYPH_INDEX))
{
WLog_ERR(TAG, "Invalid glyph flags %08X", glyphFlags);
WLog_ERR(TAG, "Invalid glyph flags %08"PRIX32"", glyphFlags);
return FALSE;
}
@ -903,14 +892,13 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if ((nWidth * nHeight) > (1024 * 1024))
{
WLog_ERR(TAG, "glyph too large: %ux%u", nWidth, nHeight);
WLog_ERR(TAG, "glyph too large: %"PRIu32"x%"PRIu32"", nWidth, nHeight);
return FALSE;
}
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s),
2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
return FALSE;
}
@ -918,7 +906,7 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if (glyphIndex >= 4000)
{
WLog_ERR(TAG, "Invalid glyphIndex %u", glyphIndex);
WLog_ERR(TAG, "Invalid glyphIndex %"PRIu16"", glyphIndex);
return FALSE;
}
@ -930,7 +918,7 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if (!glyphEntry)
{
WLog_ERR(TAG, "clear->GlyphCache[%lu]=NULL", glyphIndex);
WLog_ERR(TAG, "clear->GlyphCache[%"PRIu16"]=NULL", glyphIndex);
return FALSE;
}
@ -938,13 +926,13 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if (!glyphData)
{
WLog_ERR(TAG, "clear->GlyphCache[%lu]->pixels=NULL", glyphIndex);
WLog_ERR(TAG, "clear->GlyphCache[%"PRIu16"]->pixels=NULL", glyphIndex);
return FALSE;
}
if ((nWidth * nHeight) > glyphEntry->count)
{
WLog_ERR(TAG, "(nWidth %lu * nHeight %lu) > glyphEntry->count %lu", nWidth, nHeight,
WLog_ERR(TAG, "(nWidth %"PRIu32" * nHeight %"PRIu32") > glyphEntry->count %"PRIu32"", nWidth, nHeight,
glyphEntry->count);
return FALSE;
}
@ -970,7 +958,7 @@ static BOOL clear_decompress_glyph_data(CLEAR_CONTEXT* clear,
if (!tmp)
{
WLog_ERR(TAG, "glyphEntry->pixels realloc %lu failed!", glyphEntry->size * bpp);
WLog_ERR(TAG, "glyphEntry->pixels realloc %"PRIu32" failed!", glyphEntry->size * bpp);
return FALSE;
}
@ -1034,7 +1022,7 @@ INT32 clear_decompress(CLEAR_CONTEXT* clear, const BYTE* pSrcData,
if (Stream_GetRemainingLength(s) < 2)
{
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s), 2);
WLog_ERR(TAG, "stream short %"PRIuz" [2 expected]", Stream_GetRemainingLength(s));
goto fail;
}
@ -1049,9 +1037,9 @@ INT32 clear_decompress(CLEAR_CONTEXT* clear, const BYTE* pSrcData,
if (seqNumber != clear->seqNumber)
{
WLog_ERR(TAG, "Sequence number unexpected %u - %u",
WLog_ERR(TAG, "Sequence number unexpected %"PRIu8" - %"PRIu32"",
seqNumber, clear->seqNumber);
WLog_ERR(TAG, "seqNumber %lu != clear->seqNumber %lu", seqNumber, clear->seqNumber);
WLog_ERR(TAG, "seqNumber %"PRIu8" != clear->seqNumber %"PRIu32"", seqNumber, clear->seqNumber);
goto fail;
}
@ -1080,7 +1068,7 @@ INT32 clear_decompress(CLEAR_CONTEXT* clear, const BYTE* pSrcData,
if ((glyphFlags & mask) == mask)
goto finish;
WLog_ERR(TAG, "stream short %lu [%lu expected]", Stream_GetRemainingLength(s), 12);
WLog_ERR(TAG, "stream short %"PRIuz" [12 expected]", Stream_GetRemainingLength(s));
goto fail;
}
@ -1139,7 +1127,7 @@ fail:
int clear_compress(CLEAR_CONTEXT* clear, BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, UINT32* pDstSize)
{
WLog_ERR(TAG, "TODO: %s not implemented!");
WLog_ERR(TAG, "TODO: %s not implemented!", __FUNCTION__);
return 1;
}
BOOL clear_context_reset(CLEAR_CONTEXT* clear)

View File

@ -269,7 +269,7 @@ BOOL freerdp_image_copy_from_pointer_data(
if (xorBpp == 8 && !palette)
{
WLog_ERR(TAG, "null palette in conversion from %d bpp to %d bpp",
WLog_ERR(TAG, "null palette in conversion from %"PRIu32" bpp to %"PRIu32" bpp",
xorBpp, dstBitsPerPixel);
return FALSE;
}
@ -378,7 +378,7 @@ BOOL freerdp_image_copy_from_pointer_data(
}
default:
WLog_ERR(TAG, "failed to convert from %d bpp to %d bpp",
WLog_ERR(TAG, "failed to convert from %"PRIu32" bpp to %"PRIu32" bpp",
xorBpp, dstBitsPerPixel);
return FALSE;
}

View File

@ -226,7 +226,7 @@ static HRESULT mf_create_output_sample(H264_CONTEXT_MF* sys)
if (FAILED(hr))
{
WLog_ERR(TAG, "MFCreateSample failure: 0x%04X", hr);
WLog_ERR(TAG, "MFCreateSample failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -235,7 +235,7 @@ static HRESULT mf_create_output_sample(H264_CONTEXT_MF* sys)
if (FAILED(hr))
{
WLog_ERR(TAG, "GetOutputStreamInfo failure: 0x%04X", hr);
WLog_ERR(TAG, "GetOutputStreamInfo failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -243,7 +243,7 @@ static HRESULT mf_create_output_sample(H264_CONTEXT_MF* sys)
if (FAILED(hr))
{
WLog_ERR(TAG, "MFCreateMemoryBuffer failure: 0x%04X", hr);
WLog_ERR(TAG, "MFCreateMemoryBuffer failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -251,7 +251,7 @@ static HRESULT mf_create_output_sample(H264_CONTEXT_MF* sys)
if (FAILED(hr))
{
WLog_ERR(TAG, "AddBuffer failure: 0x%04X", hr);
WLog_ERR(TAG, "AddBuffer failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -279,7 +279,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "MFCreateMemoryBuffer failure: 0x%04X", hr);
WLog_ERR(TAG, "MFCreateMemoryBuffer failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -288,7 +288,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "Lock failure: 0x%04X", hr);
WLog_ERR(TAG, "Lock failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -297,7 +297,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "SetCurrentLength failure: 0x%04X", hr);
WLog_ERR(TAG, "SetCurrentLength failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -305,7 +305,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "Unlock failure: 0x%04X", hr);
WLog_ERR(TAG, "Unlock failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -313,7 +313,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "MFCreateSample failure: 0x%04X", hr);
WLog_ERR(TAG, "MFCreateSample failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -321,7 +321,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "AddBuffer failure: 0x%04X", hr);
WLog_ERR(TAG, "AddBuffer failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -330,7 +330,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "ProcessInput failure: 0x%04X", hr);
WLog_ERR(TAG, "ProcessInput failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -338,7 +338,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%04X", hr);
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -367,7 +367,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "mf_find_output_type failure: 0x%04X", hr);
WLog_ERR(TAG, "mf_find_output_type failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -376,7 +376,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "SetOutputType failure: 0x%04X", hr);
WLog_ERR(TAG, "SetOutputType failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -384,7 +384,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%04X", hr);
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -393,7 +393,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "GetUINT64(MF_MT_FRAME_SIZE) failure: 0x%04X", hr);
WLog_ERR(TAG, "GetUINT64(MF_MT_FRAME_SIZE) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -404,7 +404,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "GetUINT32(MF_MT_DEFAULT_STRIDE) failure: 0x%04X", hr);
WLog_ERR(TAG, "GetUINT32(MF_MT_DEFAULT_STRIDE) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -426,7 +426,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
}
else if (FAILED(hr))
{
WLog_ERR(TAG, "ProcessOutput failure: 0x%04X", hr);
WLog_ERR(TAG, "ProcessOutput failure: 0x%08"PRIX32"", hr);
goto error;
}
else
@ -440,7 +440,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "GetBufferCount failure: 0x%04X", hr);
WLog_ERR(TAG, "GetBufferCount failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -449,7 +449,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "GetBufferByIndex failure: 0x%04X", hr);
WLog_ERR(TAG, "GetBufferByIndex failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -458,7 +458,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "Lock failure: 0x%04X", hr);
WLog_ERR(TAG, "Lock failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -472,7 +472,7 @@ static int mf_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
if (FAILED(hr))
{
WLog_ERR(TAG, "Unlock failure: 0x%04X", hr);
WLog_ERR(TAG, "Unlock failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -592,7 +592,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "MFStartup failure: 0x%04X", hr);
WLog_ERR(TAG, "MFStartup failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -601,7 +601,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "CoCreateInstance(CLSID_CMSH264DecoderMFT) failure: 0x%04X", hr);
WLog_ERR(TAG, "CoCreateInstance(CLSID_CMSH264DecoderMFT) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -610,7 +610,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "QueryInterface(IID_ICodecAPI) failure: 0x%04X", hr);
WLog_ERR(TAG, "QueryInterface(IID_ICodecAPI) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -621,7 +621,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "SetValue(CODECAPI_AVLowLatencyMode) failure: 0x%04X", hr);
WLog_ERR(TAG, "SetValue(CODECAPI_AVLowLatencyMode) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -629,7 +629,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "MFCreateMediaType failure: 0x%04X", hr);
WLog_ERR(TAG, "MFCreateMediaType failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -638,7 +638,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "SetGUID(MF_MT_MAJOR_TYPE) failure: 0x%04X", hr);
WLog_ERR(TAG, "SetGUID(MF_MT_MAJOR_TYPE) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -647,7 +647,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "SetGUID(MF_MT_SUBTYPE) failure: 0x%04X", hr);
WLog_ERR(TAG, "SetGUID(MF_MT_SUBTYPE) failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -655,7 +655,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "SetInputType failure: 0x%04X", hr);
WLog_ERR(TAG, "SetInputType failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -663,7 +663,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "mf_find_output_type failure: 0x%04X", hr);
WLog_ERR(TAG, "mf_find_output_type failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -672,7 +672,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "SetOutputType failure: 0x%04X", hr);
WLog_ERR(TAG, "SetOutputType failure: 0x%08"PRIX32"", hr);
goto error;
}
@ -680,7 +680,7 @@ static BOOL mf_init(H264_CONTEXT* h264)
if (FAILED(hr))
{
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%04X", hr);
WLog_ERR(TAG, "mf_create_output_sample failure: 0x%08"PRIX32"", hr);
goto error;
}
}
@ -886,7 +886,7 @@ static int openh264_decompress(H264_CONTEXT* h264, BYTE* pSrcData,
}
else
{
WLog_WARN(TAG, "DecodeFrame2 state: 0x%02X iBufferStatus: %d", state,
WLog_WARN(TAG, "DecodeFrame2 state: 0x%04X iBufferStatus: %d", state,
sBufferInfo.iBufferStatus);
return -2002;
}
@ -912,7 +912,7 @@ static int openh264_decompress(H264_CONTEXT* h264, BYTE* pSrcData,
#if 0
WLog_INFO(TAG,
"h264_decompress: state=%u, pYUVData=[%p,%p,%p], bufferStatus=%d, width=%d, height=%d, format=%d, stride=[%d,%d]",
state, pYUVData[0], pYUVData[1], pYUVData[2], sBufferInfo.iBufferStatus,
state, (void*) pYUVData[0], (void*) pYUVData[1], (void*) pYUVData[2], sBufferInfo.iBufferStatus,
pSystemBuffer->iWidth, pSystemBuffer->iHeight, pSystemBuffer->iFormat,
pSystemBuffer->iStride[0], pSystemBuffer->iStride[1]);
#endif
@ -1307,9 +1307,9 @@ static int libavcodec_decompress(H264_CONTEXT* h264, BYTE* pSrcData,
WLog_INFO(TAG,
"libavcodec_decompress: frame decoded (status=%d, gotFrame=%d, width=%d, height=%d, Y=[%p,%d], U=[%p,%d], V=[%p,%d])",
status, gotFrame, sys->videoFrame->width, sys->videoFrame->height,
sys->videoFrame->data[0], sys->videoFrame->linesize[0],
sys->videoFrame->data[1], sys->videoFrame->linesize[1],
sys->videoFrame->data[2], sys->videoFrame->linesize[2]);
(void*) sys->videoFrame->data[0], sys->videoFrame->linesize[0],
(void*) sys->videoFrame->data[1], sys->videoFrame->linesize[1],
(void*) sys->videoFrame->data[2], sys->videoFrame->linesize[2]);
#endif
if (gotFrame)
@ -1832,7 +1832,7 @@ INT32 avc444_decompress(H264_CONTEXT* h264, BYTE op,
}
WLog_INFO(TAG,
"luma=%llu [avg=%lf] chroma=%llu [avg=%lf] combined=%llu [avg=%lf]",
"luma=%"PRIu64" [avg=%lf] chroma=%"PRIu64" [avg=%lf] combined=%"PRIu64" [avg=%lf]",
op1, op1sum, op2, op2sum, op3, op3sum);
#endif

View File

@ -302,7 +302,7 @@ BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
break;
default:
WLog_ERR(TAG, "Invalid color depth %d", bpp);
WLog_ERR(TAG, "Invalid color depth %"PRIu32"", bpp);
return FALSE;
}
@ -367,7 +367,7 @@ BOOL interleaved_compress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
if ((nWidth > 64) || (nHeight > 64))
{
WLog_ERR(TAG,
"interleaved_compress: width (%d) or height (%d) is greater than 64", nWidth,
"interleaved_compress: width (%"PRIu32") or height (%"PRIu32") is greater than 64", nWidth,
nHeight);
return FALSE;
}

View File

@ -422,7 +422,7 @@ int mppc_decompress(MPPC_CONTEXT* mppc, BYTE* pSrcData, UINT32 SrcSize, BYTE** p
}
#ifdef DEBUG_MPPC
WLog_DBG(TAG, "<%d,%d>", (int) CopyOffset, (int) LengthOfMatch);
WLog_DBG(TAG, "<%"PRIu32",%"PRIu32">", CopyOffset, LengthOfMatch);
#endif
if ((HistoryPtr + LengthOfMatch - 1) > HistoryBufferEnd)
@ -542,7 +542,7 @@ int mppc_compress(MPPC_CONTEXT* mppc, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppD
accumulator = Sym1;
#ifdef DEBUG_MPPC
WLog_DBG(TAG, "%c", accumulator);
WLog_DBG(TAG, "%"PRIu32"", accumulator);
#endif
if (accumulator < 0x80)
@ -576,7 +576,7 @@ int mppc_compress(MPPC_CONTEXT* mppc, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppD
}
#ifdef DEBUG_MPPC
WLog_DBG(TAG, "<%d,%d>", (int) CopyOffset, (int) LengthOfMatch);
WLog_DBG(TAG, "<%"PRIu32",%"PRIu32">", CopyOffset, LengthOfMatch);
#endif
/* Encode CopyOffset */
@ -751,7 +751,7 @@ int mppc_compress(MPPC_CONTEXT* mppc, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppD
accumulator = *pSrcPtr;
#ifdef DEBUG_MPPC
WLog_DBG(TAG, "%c", accumulator);
WLog_DBG(TAG, "%"PRIu32"", accumulator);
#endif
if (accumulator < 0x80)

View File

@ -1850,8 +1850,8 @@ int ncrush_decompress(NCRUSH_CONTEXT* ncrush, BYTE* pSrcData, UINT32 SrcSize, BY
if (HistoryPtr >= HistoryBufferEnd)
{
WLog_ERR(TAG, "ncrush_decompress error: HistoryPtr (%p) >= HistoryBufferEnd (%p)",
HistoryPtr, HistoryBufferEnd);
WLog_ERR(TAG, "ncrush_decompress error: HistoryPtr (%p) >= HistoryBufferEnd (%p)",
(void*) HistoryPtr, (void*) HistoryBufferEnd);
return -1003;
}

View File

@ -332,7 +332,7 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar,
rle = (FormatHeader & PLANAR_FORMAT_HEADER_RLE) ? TRUE : FALSE;
alpha = (FormatHeader & PLANAR_FORMAT_HEADER_NA) ? FALSE : TRUE;
//WLog_INFO(TAG, "CLL: %d CS: %d RLE: %d ALPHA: %d", cll, cs, rle, alpha);
//WLog_INFO(TAG, "CLL: %"PRIu32" CS: %"PRIu8" RLE: %"PRIu8" ALPHA: %"PRIu8"", cll, cs, rle, alpha);
if (!cll && cs)
return FALSE; /* Chroma subsampling requires YCoCg */
@ -1104,7 +1104,7 @@ BYTE* freerdp_bitmap_compress_planar(BITMAP_PLANAR_CONTEXT* context,
offset += dstSizes[2];
context->rlePlanes[3] = &context->rlePlanesBuffer[offset];
offset += dstSizes[3];
//WLog_DBG(TAG, "R: [%d/%d] G: [%d/%d] B: [%d/%d]",
//WLog_DBG(TAG, "R: [%"PRIu32"/%"PRIu32"] G: [%"PRIu32"/%"PRIu32"] B: [%"PRIu32"/%"PRIu32"]",
// dstSizes[1], planeSize, dstSizes[2], planeSize, dstSizes[3], planeSize);
}
}

View File

@ -292,7 +292,7 @@ static void progressive_rfx_quant_print(RFX_COMPONENT_CODEC_QUANT* q,
const char* name)
{
fprintf(stderr,
"%s: HL1: %d LH1: %d HH1: %d HL2: %d LH2: %d HH2: %d HL3: %d LH3: %d HH3: %d LL3: %d\n",
"%s: HL1: %"PRIu8" LH1: %"PRIu8" HH1: %"PRIu8" HL2: %"PRIu8" LH2: %"PRIu8" HH2: %"PRIu8" HL3: %"PRIu8" LH3: %"PRIu8" HH3: %"PRIu8" LL3: %"PRIu8"\n",
name, q->HL1, q->LH1, q->HH1, q->HL2, q->LH2, q->HH2, q->HL3, q->LH3, q->HH3,
q->LL3);
}
@ -755,7 +755,7 @@ static int progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* progressive,
tile->pass = 1;
diff = tile->flags & RFX_TILE_DIFFERENCE;
WLog_DBG(TAG,
"ProgressiveTile%s: quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d flags: 0x%02X quality: %d yLen: %d cbLen: %d crLen: %d tailLen: %d",
"ProgressiveTile%s: quantIdx Y: %"PRIu8" Cb: %"PRIu8" Cr: %"PRIu8" xIdx: %"PRIu16" yIdx: %"PRIu16" flags: 0x%02"PRIX8" quality: %"PRIu8" yLen: %"PRIu16" cbLen: %"PRIu16" crLen: %"PRIu16" tailLen: %"PRIu16"",
(tile->blockType == PROGRESSIVE_WBT_TILE_FIRST) ? "First" : "Simple",
tile->quantIdxY, tile->quantIdxCb, tile->quantIdxCr,
tile->xIdx, tile->yIdx, tile->flags, tile->quality, tile->yLen,
@ -1115,7 +1115,7 @@ static int progressive_rfx_upgrade_component(PROGRESSIVE_CONTEXT* progressive,
if (srlLen)
pSrlLen = (int)((((float) aSrlLen) / ((float) srlLen)) * 100.0f);
WLog_INFO(TAG, "RAW: %d/%d %d%% (%d/%d:%d)\tSRL: %d/%d %d%% (%d/%d:%d)",
WLog_INFO(TAG, "RAW: %"PRIu32"/%"PRIu32" %d%% (%"PRIu32"/%"PRIu32":%"PRIu32")\tSRL: %"PRIu32"/%"PRIu32" %d%% (%"PRIu32"/%"PRIu32":%"PRIu32")",
aRawLen, rawLen, pRawLen, state.raw->position, rawLen * 8,
(rawLen * 8) - state.raw->position,
aSrlLen, srlLen, pSrlLen, state.srl->position, srlLen * 8,
@ -1161,7 +1161,7 @@ static int progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* progressive,
const primitives_t* prims = primitives_get();
tile->pass++;
WLog_DBG(TAG,
"ProgressiveTileUpgrade: pass: %d quantIdx Y: %d Cb: %d Cr: %d xIdx: %d yIdx: %d quality: %d ySrlLen: %d yRawLen: %d cbSrlLen: %d cbRawLen: %d crSrlLen: %d crRawLen: %d",
"ProgressiveTileUpgrade: pass: %"PRIu16" quantIdx Y: %"PRIu8" Cb: %"PRIu8" Cr: %"PRIu8" xIdx: %"PRIu16" yIdx: %"PRIu16" quality: %"PRIu8" ySrlLen: %"PRIu16" yRawLen: %"PRIu16" cbSrlLen: %"PRIu16" cbRawLen: %"PRIu16" crSrlLen: %"PRIu16" crRawLen: %"PRIu16"",
tile->pass, tile->quantIdxY, tile->quantIdxCb, tile->quantIdxCr, tile->xIdx,
tile->yIdx, tile->quality, tile->ySrlLen, tile->yRawLen, tile->cbSrlLen,
tile->cbRawLen, tile->crSrlLen, tile->crRawLen);
@ -1523,7 +1523,7 @@ static int progressive_process_tiles(PROGRESSIVE_CONTEXT* progressive,
if (count != region->numTiles)
{
WLog_WARN(TAG, "numTiles inconsistency: actual: %d, expected: %d\n", count,
WLog_WARN(TAG, "numTiles inconsistency: actual: %"PRIu32", expected: %"PRIu16"\n", count,
region->numTiles);
}
@ -1643,7 +1643,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
frameBegin.regionCount = (UINT32) * ((UINT16*) &block[boffset +
4]); /* regionCount (2 bytes) */
boffset += 6;
WLog_DBG(TAG, "ProgressiveFrameBegin: frameIndex: %d regionCount: %d",
WLog_DBG(TAG, "ProgressiveFrameBegin: frameIndex: %"PRIu32" regionCount: %"PRIu16"",
frameBegin.frameIndex, frameBegin.regionCount);
/**
* If the number of elements specified by the regionCount field is
@ -1677,7 +1677,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (context.tileSize != 64)
return -1010;
WLog_DBG(TAG, "ProgressiveContext: flags: 0x%02X", context.flags);
WLog_DBG(TAG, "ProgressiveContext: flags: 0x%02"PRIX8"", context.flags);
if (!(context.flags & RFX_SUBBAND_DIFFING))
{
@ -1811,7 +1811,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
return -1;
WLog_DBG(TAG,
"ProgressiveRegion: numRects: %d numTiles: %d tileDataSize: %d flags: 0x%02X numQuant: %d numProgQuant: %d",
"ProgressiveRegion: numRects: %"PRIu16" numTiles: %"PRIu16" tileDataSize: %"PRIu32" flags: 0x%02"PRIX8" numQuant: %"PRIu8" numProgQuant: %"PRIu8"",
region->numRects, region->numTiles, region->tileDataSize, region->flags,
region->numQuant, region->numProgQuant);
@ -1845,7 +1845,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (idxBottom > boxBottom)
boxBottom = idxBottom;
WLog_DBG(TAG, "rect[%d]: x: %d y: %d w: %d h: %d",
WLog_DBG(TAG, "rect[%"PRIu16"]: x: %"PRIu16" y: %"PRIu16" w: %"PRIu16" h: %"PRIu16"",
index, rect->x, rect->y, rect->width, rect->height);
}

View File

@ -236,7 +236,7 @@ void region16_print(const REGION16 *region)
int currentBandY = -1;
rects = region16_rects(region, &nbRects);
WLog_DBG(TAG, "nrects=%d", nbRects);
WLog_DBG(TAG, "nrects=%"PRIu32"", nbRects);
for (i = 0; i < nbRects; i++, rects++)
{
@ -246,7 +246,7 @@ void region16_print(const REGION16 *region)
WLog_DBG(TAG, "band %d: ", currentBandY);
}
WLog_DBG(TAG, "(%d,%d-%d,%d)", rects->left, rects->top, rects->right, rects->bottom);
WLog_DBG(TAG, "(%"PRIu16",%"PRIu16"-%"PRIu16",%"PRIu16")", rects->left, rects->top, rects->right, rects->bottom);
}
}

View File

@ -433,7 +433,7 @@ static BOOL rfx_process_message_sync(RFX_CONTEXT* context, wStream* s)
if (magic != WF_MAGIC)
{
WLog_ERR(TAG, "invalid magic number 0x%X", magic);
WLog_ERR(TAG, "invalid magic number 0x%08"PRIX32"", magic);
return FALSE;
}
@ -442,11 +442,11 @@ static BOOL rfx_process_message_sync(RFX_CONTEXT* context, wStream* s)
if (context->version != WF_VERSION_1_0)
{
WLog_ERR(TAG, "invalid version number 0x%04X", context->version);
WLog_ERR(TAG, "invalid version number 0x%08"PRIX32"", context->version);
return FALSE;
}
WLog_Print(context->priv->log, WLOG_DEBUG, "version 0x%X", context->version);
WLog_Print(context->priv->log, WLOG_DEBUG, "version 0x%08"PRIX32"", context->version);
context->decodedHeaderBlocks |= _RFX_DECODED_SYNC;
return TRUE;
}
@ -470,24 +470,24 @@ static BOOL rfx_process_message_codec_versions(RFX_CONTEXT* context, wStream* s)
if (numCodecs != 1)
{
WLog_ERR(TAG, "%s: numCodes is 0x%02X (must be 0x01)", __FUNCTION__, numCodecs);
WLog_ERR(TAG, "%s: numCodes is 0x%02"PRIX8" (must be 0x01)", __FUNCTION__, numCodecs);
return FALSE;
}
if (context->codec_id != 0x01)
{
WLog_ERR(TAG, "%s: invalid codec id (0x%02X)", __FUNCTION__, context->codec_id);
WLog_ERR(TAG, "%s: invalid codec id (0x%02"PRIX32")", __FUNCTION__, context->codec_id);
return FALSE;
}
if (context->codec_version != WF_VERSION_1_0)
{
WLog_ERR(TAG, "%s: invalid codec version (0x%04X)", __FUNCTION__,
WLog_ERR(TAG, "%s: invalid codec version (0x%08"PRIX32")", __FUNCTION__,
context->codec_version);
return FALSE;
}
WLog_Print(context->priv->log, WLOG_DEBUG, "id %d version 0x%X.",
WLog_Print(context->priv->log, WLOG_DEBUG, "id %"PRIu32" version 0x%"PRIX32".",
context->codec_id, context->codec_version);
context->decodedHeaderBlocks |= _RFX_DECODED_VERSIONS;
return TRUE;
@ -519,7 +519,7 @@ static BOOL rfx_process_message_channels(RFX_CONTEXT* context, wStream* s)
if (Stream_GetRemainingLength(s) < (size_t)(numChannels * 5))
{
WLog_ERR(TAG, "RfxMessageChannels packet too small for numChannels=%d",
WLog_ERR(TAG, "RfxMessageChannels packet too small for numChannels=%"PRIu8"",
numChannels);
return FALSE;
}
@ -529,7 +529,7 @@ static BOOL rfx_process_message_channels(RFX_CONTEXT* context, wStream* s)
if (channelId != 0x00)
{
WLog_ERR(TAG, "channelId:0x%02X, expected:0x00", channelId);
WLog_ERR(TAG, "channelId:0x%02"PRIX8", expected:0x00", channelId);
return FALSE;
}
@ -538,14 +538,14 @@ static BOOL rfx_process_message_channels(RFX_CONTEXT* context, wStream* s)
if (!context->width || !context->height)
{
WLog_ERR(TAG, "%s: invalid channel with/height: %ux%u", __FUNCTION__,
WLog_ERR(TAG, "%s: invalid channel with/height: %"PRIu16"x%"PRIu16"", __FUNCTION__,
context->width, context->height);
return FALSE;
}
/* Now, only the first monitor can be used, therefore the other channels will be ignored. */
Stream_Seek(s, 5 * (numChannels - 1));
WLog_Print(context->priv->log, WLOG_DEBUG, "numChannels %d id %d, %dx%d.",
WLog_Print(context->priv->log, WLOG_DEBUG, "numChannels %"PRIu8" id %"PRIu8", %"PRIu16"x%"PRIu16".",
numChannels, channelId, context->width, context->height);
context->decodedHeaderBlocks |= _RFX_DECODED_CHANNELS;
return TRUE;
@ -569,7 +569,7 @@ static BOOL rfx_process_message_context(RFX_CONTEXT* context, wStream* s)
tileSize); /* tileSize (2 bytes), must be set to CT_TILE_64x64 (0x0040) */
Stream_Read_UINT16(s, properties); /* properties (2 bytes) */
WLog_Print(context->priv->log, WLOG_DEBUG,
"ctxId %d tileSize %d properties 0x%X.",
"ctxId %"PRIu8" tileSize %"PRIu16" properties 0x%04"PRIX16".",
ctxId, tileSize, properties);
context->properties = properties;
context->flags = (properties & 0x0007);
@ -628,7 +628,7 @@ static BOOL rfx_process_message_frame_begin(RFX_CONTEXT* context,
frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */
Stream_Read_UINT16(s, numRegions); /* numRegions (2 bytes) */
WLog_Print(context->priv->log, WLOG_DEBUG,
"RFX_FRAME_BEGIN: frameIdx: %d numRegions: %d", frameIdx, numRegions);
"RFX_FRAME_BEGIN: frameIdx: %"PRIu32" numRegions: %"PRIu16"", frameIdx, numRegions);
return TRUE;
}
@ -691,7 +691,7 @@ static BOOL rfx_process_message_region(RFX_CONTEXT* context,
if (Stream_GetRemainingLength(s) < (size_t)(8 * message->numRects))
{
WLog_ERR(TAG, "%s: packet too small for num_rects=%d", __FUNCTION__,
WLog_ERR(TAG, "%s: packet too small for num_rects=%"PRIu16"", __FUNCTION__,
message->numRects);
return FALSE;
}
@ -708,7 +708,7 @@ static BOOL rfx_process_message_region(RFX_CONTEXT* context,
Stream_Read_UINT16(s, rect->y); /* y (2 bytes) */
Stream_Read_UINT16(s, rect->width); /* width (2 bytes) */
Stream_Read_UINT16(s, rect->height); /* height (2 bytes) */
WLog_Print(context->priv->log, WLOG_DEBUG, "rect %d (x,y=%d,%d w,h=%d %d).", i,
WLog_Print(context->priv->log, WLOG_DEBUG, "rect %d (x,y=%"PRIu16",%"PRIu16" w,h=%"PRIu16" %"PRIu16").", i,
rect->x, rect->y,
rect->width, rect->height);
}
@ -726,13 +726,13 @@ static BOOL rfx_process_message_region(RFX_CONTEXT* context,
if (regionType != CBT_REGION)
{
WLog_ERR(TAG, "%s: invalid region type 0x%04X", __FUNCTION__, regionType);
WLog_ERR(TAG, "%s: invalid region type 0x%04"PRIX16"", __FUNCTION__, regionType);
return TRUE;
}
if (numTileSets != 0x0001)
{
WLog_ERR(TAG, "%s: invalid number of tilesets (%u)", __FUNCTION__, numTileSets);
WLog_ERR(TAG, "%s: invalid number of tilesets (%"PRIu16")", __FUNCTION__, numTileSets);
return FALSE;
}
@ -824,7 +824,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
/* quantVals */
if (Stream_GetRemainingLength(s) < (size_t)(context->numQuant * 5))
{
WLog_ERR(TAG, "RfxMessageTileSet packet too small for num_quants=%d",
WLog_ERR(TAG, "RfxMessageTileSet packet too small for num_quants=%"PRIu8"",
context->numQuant);
return FALSE;
}
@ -848,7 +848,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
*quants++ = (quant & 0x0F);
*quants++ = (quant >> 4);
WLog_Print(context->priv->log, WLOG_DEBUG,
"quant %d (%d %d %d %d %d %d %d %d %d %d).",
"quant %d (%"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32").",
i, context->quants[i * 10], context->quants[i * 10 + 1],
context->quants[i * 10 + 2], context->quants[i * 10 + 3],
context->quants[i * 10 + 4], context->quants[i * 10 + 5],
@ -900,7 +900,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
/* RFX_TILE */
if (Stream_GetRemainingLength(s) < 6)
{
WLog_ERR(TAG, "RfxMessageTileSet packet too small to read tile %d/%d", i,
WLog_ERR(TAG, "RfxMessageTileSet packet too small to read tile %d/%"PRIu16"", i,
message->numTiles);
rc = FALSE;
break;
@ -913,7 +913,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
if (Stream_GetRemainingLength(s) < blockLen - 6)
{
WLog_ERR(TAG,
"RfxMessageTileSet not enough bytes to read tile %d/%d with blocklen=%d",
"RfxMessageTileSet not enough bytes to read tile %d/%"PRIu16" with blocklen=%"PRIu32"",
i, message->numTiles, blockLen);
rc = FALSE;
break;
@ -923,7 +923,7 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context,
if (blockType != CBT_TILE)
{
WLog_ERR(TAG, "unknown block type 0x%X, expected CBT_TILE (0xCAC3).",
WLog_ERR(TAG, "unknown block type 0x%"PRIX32", expected CBT_TILE (0xCAC3).",
blockType);
rc = FALSE;
break;
@ -1027,7 +1027,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
/* RFX_BLOCKT */
Stream_Read_UINT16(s, blockType); /* blockType (2 bytes) */
Stream_Read_UINT32(s, blockLen); /* blockLen (4 bytes) */
WLog_Print(context->priv->log, WLOG_DEBUG, "blockType 0x%X blockLen %d",
WLog_Print(context->priv->log, WLOG_DEBUG, "blockType 0x%"PRIX32" blockLen %"PRIu32"",
blockType, blockLen);
if (blockLen == 0)
@ -1038,7 +1038,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
if (Stream_GetRemainingLength(s) < blockLen - 6)
{
WLog_ERR(TAG, "%s: packet too small for blocklen=%d", __FUNCTION__, blockLen);
WLog_ERR(TAG, "%s: packet too small for blocklen=%"PRIu32"", __FUNCTION__, blockLen);
goto fail;
}
@ -1066,7 +1066,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
if (codecId != 0x01)
{
WLog_ERR(TAG, "%s: invalid codecId 0x%02X", __FUNCTION__, codecId);
WLog_ERR(TAG, "%s: invalid codecId 0x%02"PRIX8"", __FUNCTION__, codecId);
goto fail;
}
@ -1075,7 +1075,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
/* If the blockType is set to WBT_CONTEXT, then channelId MUST be set to 0xFF.*/
if (channelId != 0xFF)
{
WLog_ERR(TAG, "%s: invalid channelId 0x%02X for blockType 0x%04X", __FUNCTION__,
WLog_ERR(TAG, "%s: invalid channelId 0x%02"PRIX8" for blockType 0x%08"PRIX32"", __FUNCTION__,
channelId, blockType);
goto fail;
}
@ -1085,7 +1085,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
/* For all other values of blockType, channelId MUST be set to 0x00. */
if (channelId != 0x00)
{
WLog_ERR(TAG, "%s: invalid channelId 0x%02X for blockType WBT_CONTEXT",
WLog_ERR(TAG, "%s: invalid channelId 0x%02"PRIX8" for blockType WBT_CONTEXT",
__FUNCTION__, channelId);
goto fail;
}
@ -1139,7 +1139,7 @@ BOOL rfx_process_message(RFX_CONTEXT* context, const BYTE* data, UINT32 length,
break;
default:
WLog_ERR(TAG, "%s: unknown blockType 0x%X", __FUNCTION__, blockType);
WLog_ERR(TAG, "%s: unknown blockType 0x%"PRIX32"", __FUNCTION__, blockType);
goto fail;
}
@ -1780,7 +1780,7 @@ static BOOL rfx_write_message_tileset(RFX_CONTEXT* context, wStream* s,
#ifdef WITH_DEBUG_RFX
WLog_Print(context->priv->log, WLOG_DEBUG,
"numQuant: %d numTiles: %d tilesDataSize: %d",
"numQuant: %"PRIu16" numTiles: %"PRIu16" tilesDataSize: %"PRIu32"",
message->numQuant, message->numTiles, message->tilesDataSize);
#endif
return TRUE;

View File

@ -51,7 +51,7 @@ static BOOL test_ClearDecompressExample(UINT32 nr, const BYTE* pSrcData,
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", (unsigned long) nr, status);
printf("clear_decompress example %"PRIu32" status: %d\n", nr, status);
fflush(stdout);
clear_context_free(clear);
#if 0
@ -60,7 +60,7 @@ static BOOL test_ClearDecompressExample(UINT32 nr, const BYTE* pSrcData,
return FALSE;
#else
fprintf(stderr, "%s: TODO Test %lu not working!!!\n", __FUNCTION__, (unsigned long) nr);
fprintf(stderr, "%s: TODO Test %"PRIu32" not working!!!\n", __FUNCTION__, nr);
#endif
return TRUE;
}

View File

@ -755,11 +755,11 @@ int test_MppcCompressBellsRdp5()
DstSize = sizeof(OutputBuffer);
pDstData = OutputBuffer;
status = mppc_compress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, &Flags);
printf("Flags: 0x%04X DstSize: %d\n", Flags, DstSize);
printf("Flags: 0x%08"PRIX32" DstSize: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcCompressBellsRdp5: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcCompressBellsRdp5: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -795,11 +795,11 @@ int test_MppcCompressBellsRdp4()
DstSize = sizeof(OutputBuffer);
pDstData = OutputBuffer;
status = mppc_compress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, &Flags);
printf("flags: 0x%04X size: %d\n", Flags, DstSize);
printf("flags: 0x%08"PRIX32" size: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcCompressBellsRdp4: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcCompressBellsRdp4: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -833,11 +833,11 @@ int test_MppcDecompressBellsRdp5()
Flags = PACKET_AT_FRONT | PACKET_COMPRESSED | 1;
expectedSize = sizeof(TEST_MPPC_BELLS) - 1;
status = mppc_decompress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, Flags);
printf("flags: 0x%04X size: %d\n", Flags, DstSize);
printf("flags: 0x%08"PRIX32" size: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcDecompressBellsRdp5: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcDecompressBellsRdp5: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -867,11 +867,11 @@ int test_MppcDecompressBellsRdp4()
Flags = PACKET_AT_FRONT | PACKET_COMPRESSED | 0;
expectedSize = sizeof(TEST_MPPC_BELLS) - 1;
status = mppc_decompress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, Flags);
printf("flags: 0x%04X size: %d\n", Flags, DstSize);
printf("flags: 0x%08"PRIX32" size: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcDecompressBellsRdp4: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcDecompressBellsRdp4: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -903,11 +903,11 @@ int test_MppcCompressIslandRdp5()
DstSize = sizeof(OutputBuffer);
pDstData = OutputBuffer;
status = mppc_compress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, &Flags);
printf("Flags: 0x%04X DstSize: %d\n", Flags, DstSize);
printf("Flags: 0x%08"PRIX32" DstSize: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcCompressIslandRdp5: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcCompressIslandRdp5: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -943,11 +943,11 @@ int test_MppcCompressBufferRdp5()
DstSize = sizeof(OutputBuffer);
pDstData = OutputBuffer;
status = mppc_compress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, &Flags);
printf("flags: 0x%04X size: %d\n", Flags, DstSize);
printf("flags: 0x%08"PRIX32" size: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcCompressBufferRdp5: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcCompressBufferRdp5: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}
@ -977,11 +977,11 @@ int test_MppcDecompressBufferRdp5()
Flags = PACKET_AT_FRONT | PACKET_COMPRESSED | 1;
expectedSize = sizeof(TEST_RDP5_UNCOMPRESSED_DATA);
status = mppc_decompress(mppc, pSrcData, SrcSize, &pDstData, &DstSize, Flags);
printf("flags: 0x%04X size: %d\n", Flags, DstSize);
printf("flags: 0x%08"PRIX32" size: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("MppcDecompressBufferRdp5: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("MppcDecompressBufferRdp5: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}

View File

@ -29,11 +29,11 @@ int test_NCrushCompressBells()
DstSize = sizeof(OutputBuffer);
ZeroMemory(OutputBuffer, sizeof(OutputBuffer));
status = ncrush_compress(ncrush, pSrcData, SrcSize, &pDstData, &DstSize, &Flags);
printf("status: %d Flags: 0x%04X DstSize: %d\n", status, Flags, DstSize);
printf("status: %d Flags: 0x%08"PRIX32" DstSize: %"PRIu32"\n", status, Flags, DstSize);
if (DstSize != expectedSize)
{
printf("NCrushCompressBells: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("NCrushCompressBells: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
printf("Actual\n");
BitDump(__FUNCTION__, WLOG_INFO, pDstData, DstSize * 8, 0);
printf("Expected\n");
@ -71,11 +71,11 @@ int test_NCrushDecompressBells()
Flags = PACKET_COMPRESSED | 2;
expectedSize = sizeof(TEST_BELLS_DATA) - 1;
status = ncrush_decompress(ncrush, pSrcData, SrcSize, &pDstData, &DstSize, Flags);
printf("Flags: 0x%04X DstSize: %d\n", Flags, DstSize);
printf("Flags: 0x%08"PRIX32" DstSize: %"PRIu32"\n", Flags, DstSize);
if (DstSize != expectedSize)
{
printf("NCrushDecompressBells: output size mismatch: Actual: %d, Expected: %d\n", DstSize, expectedSize);
printf("NCrushDecompressBells: output size mismatch: Actual: %"PRIu32", Expected: %"PRIu32"\n", DstSize, expectedSize);
return -1;
}

Some files were not shown because too many files have changed in this diff Show More