Skip to content

Commit

Permalink
Merge pull request #1949 from matt335672/issue1934_fixes
Browse files Browse the repository at this point in the history
Move erroneous parameter processing section (part of #1934)
  • Loading branch information
matt335672 authored Jul 20, 2021
2 parents 5442b62 + fd4f19e commit 7e95576
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions neutrinordp/xrdp-neutrinordp.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,27 @@ lxrdp_set_param(struct mod *mod, const char *name, const char *value)
{
mod->allow_client_kbd_settings = g_text2bool(value);
}
else if (g_strcmp(name, "neutrinordp.override_keyboardLayout_mask") == 0)
{
/* Keyboard values are stored for later processing */
mod->kbd_overrides.layout_mask = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_type") == 0)
{
mod->kbd_overrides.type = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_subtype") == 0)
{
mod->kbd_overrides.subtype = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_fn_keys") == 0)
{
mod->kbd_overrides.fn_keys = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_layout") == 0)
{
mod->kbd_overrides.layout = g_atoix(value);
}
else
{
LOG(LOG_LEVEL_WARNING, "lxrdp_set_param: unknown name [%s] value [%s]", name, value);
Expand Down Expand Up @@ -2275,31 +2296,6 @@ lfreerdp_receive_channel_data(freerdp *instance, int channelId, uint8 *data,
LOG(LOG_LEVEL_ERROR, "lfreerdp_receive_channel_data: error %d", error);
}
}
else if (g_strcmp(name, "neutrinordp.allow_client_keyboardLayout") == 0)
{
mod->allow_client_kbd_settings = g_text2bool(value);
}
else if (g_strcmp(name, "neutrinordp.override_keyboardLayout_mask") == 0)
{
/* Keyboard values are stored for later processing */
mod->kbd_overrides.layout_mask = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_type") == 0)
{
mod->kbd_overrides.type = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_subtype") == 0)
{
mod->kbd_overrides.subtype = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_fn_keys") == 0)
{
mod->kbd_overrides.fn_keys = g_atoix(value);
}
else if (g_strcmp(name, "neutrinordp.override_kbd_layout") == 0)
{
mod->kbd_overrides.layout = g_atoix(value);
}
else
{
LOG(LOG_LEVEL_ERROR, "lfreerdp_receive_channel_data: bad lchid");
Expand Down

0 comments on commit 7e95576

Please sign in to comment.