mirror of https://github.com/FreeRDP/FreeRDP
channel/rail: add handling Server Execute Result PDU
This commit is contained in:
parent
154598288b
commit
e85caeb17d
|
@ -355,6 +355,13 @@ void rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
|
|||
RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS, (void*) &rail_order->sysparam);
|
||||
}
|
||||
|
||||
void rail_recv_exec_result_order(rdpRailOrder* rail_order, STREAM* s)
|
||||
{
|
||||
rail_read_server_exec_result_order(s, &rail_order->exec_result);
|
||||
rail_send_channel_event(rail_order->plugin,
|
||||
RDP_EVENT_TYPE_RAIL_CHANNEL_EXEC_RESULTS, (void*) &rail_order->exec_result);
|
||||
}
|
||||
|
||||
void rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
|
||||
{
|
||||
uint16 orderType;
|
||||
|
@ -372,7 +379,7 @@ void rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
|
|||
break;
|
||||
|
||||
case RDP_RAIL_ORDER_EXEC_RESULT:
|
||||
rail_read_server_exec_result_order(s, &rail_order->exec_result);
|
||||
rail_recv_exec_result_order(rail_order, s);
|
||||
break;
|
||||
|
||||
case RDP_RAIL_ORDER_SYSPARAM:
|
||||
|
|
|
@ -122,6 +122,29 @@ void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChanMan* chanman, RDP_E
|
|||
freerdp_chanman_send_event(chanman, new_event);
|
||||
}
|
||||
|
||||
void xf_process_rail_exec_result_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_EXEC_RESULT_ORDER * exec_result;
|
||||
const char* error_code_names[] =
|
||||
{
|
||||
"RAIL_EXEC_S_OK",
|
||||
"RAIL_EXEC_E_HOOK_NOT_LOADED",
|
||||
"RAIL_EXEC_E_DECODE_FAILED",
|
||||
"RAIL_EXEC_E_NOT_IN_ALLOWLIST",
|
||||
"RAIL_EXEC_E_FILE_NOT_FOUND",
|
||||
"RAIL_EXEC_E_FAIL",
|
||||
"RAIL_EXEC_E_SESSION_LOCKED"
|
||||
};
|
||||
|
||||
exec_result = (RAIL_EXEC_RESULT_ORDER *)event->user_data;
|
||||
|
||||
if (exec_result->execResult != RAIL_EXEC_S_OK)
|
||||
{
|
||||
printf("RAIL exec error: execResult=%s NtError=0x%X\n",
|
||||
error_code_names[exec_result->execResult], exec_result->rawResult);
|
||||
}
|
||||
}
|
||||
|
||||
void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
||||
{
|
||||
switch (event->event_type)
|
||||
|
@ -130,6 +153,10 @@ void xf_process_rail_event(xfInfo* xfi, rdpChanMan* chanman, RDP_EVENT* event)
|
|||
xf_process_rail_get_sysparams_event(xfi, chanman, event);
|
||||
break;
|
||||
|
||||
case RDP_EVENT_TYPE_RAIL_CHANNEL_EXEC_RESULTS:
|
||||
xf_process_rail_exec_result_event(xfi, chanman, event);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -330,7 +330,8 @@ enum RDP_RAIL_PDU_TYPE
|
|||
enum RDP_EVENT_TYPE_RAIL
|
||||
{
|
||||
RDP_EVENT_TYPE_RAIL_CHANNEL_GET_SYSPARAMS = 1,
|
||||
RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS = 2
|
||||
RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS = 2,
|
||||
RDP_EVENT_TYPE_RAIL_CHANNEL_EXEC_RESULTS = 3
|
||||
};
|
||||
|
||||
#endif /* __RAIL_GLOBAL_H */
|
||||
|
|
Loading…
Reference in New Issue