}
}
-/// constrains device scale to a range, per spec
+/// constrains device scale to a set of valid values, per spec
/// rdp-spec, section 2.2.1.3.2 Client Core Data
fn device_scale_to_opt(x: u32) -> Option<u32> {
if x == 100 || x == 140 || x == 180 {
return result;
}
-#define OUTPUT_BUFFER_SIZE 65535
-
static TmEcode JsonRdpLogThreadInit(ThreadVars *t, const void *initdata, void **data)
{
- LogRdpLogThread *thread = SCCalloc(1, sizeof(*thread));
- if (unlikely(thread == NULL)) {
+ if (initdata == NULL) {
+ SCLogDebug("Error getting context for EveLogRdp. \"initdata\" is NULL.");
return TM_ECODE_FAILED;
}
- if (initdata == NULL) {
- SCLogDebug("Error getting context for EveLogRdp. \"initdata\" is NULL.");
- SCFree(thread);
+ LogRdpLogThread *thread = SCCalloc(1, sizeof(*thread));
+ if (unlikely(thread == NULL)) {
return TM_ECODE_FAILED;
}
- thread->buffer = MemBufferCreateNew(OUTPUT_BUFFER_SIZE);
+ thread->buffer = MemBufferCreateNew(JSON_OUTPUT_BUFFER_SIZE);
if (unlikely(thread->buffer == NULL)) {
SCFree(thread);
return TM_ECODE_FAILED;