libfreerdp-core: fix window altsec orders negotiation

This commit is contained in:
Marc-André Moreau 2011-08-14 17:05:34 -04:00
parent dfafea3776
commit 6f8af2515b
5 changed files with 14 additions and 24 deletions

View File

@ -36,8 +36,6 @@ static void rail_send_vchannel_data(void* rail_object, void* data, size_t length
STREAM* s = NULL;
railPlugin* plugin = (railPlugin*) rail_object;
DEBUG_RAIL("rail_send_vchannel_data\n");
s = stream_new(length);
stream_write(s, data, length);
@ -55,8 +53,6 @@ static void rail_send_vchannel_event(void* rail_object, RAIL_VCHANNEL_EVENT* eve
RAIL_VCHANNEL_EVENT* payload = NULL;
FRDP_EVENT* out_event = NULL;
DEBUG_RAIL("rail_send_vchannel_event\n");
payload = xnew(RAIL_VCHANNEL_EVENT);
memset(payload, 0, sizeof(RAIL_VCHANNEL_EVENT));
memcpy(payload, event, sizeof(RAIL_VCHANNEL_EVENT));
@ -70,8 +66,6 @@ static void rail_process_connect(rdpSvcPlugin* plugin)
{
railPlugin* rail = (railPlugin*) plugin;
DEBUG_RAIL("rail_process_connect() called.");
rail->rail_event_sender.event_sender_object = rail;
rail->rail_event_sender.send_rail_vchannel_event = rail_send_vchannel_event;
@ -86,15 +80,12 @@ static void rail_process_connect(rdpSvcPlugin* plugin)
static void rail_process_terminate(rdpSvcPlugin* plugin)
{
DEBUG_RAIL("rail_process_terminate\n");
}
static void rail_process_receive(rdpSvcPlugin* plugin, STREAM* s)
{
railPlugin* rail = (railPlugin*) plugin;
DEBUG_RAIL("rail_process_receive\n");
rail_order_recv(rail->rail_order, s);
stream_free(s);
}
@ -104,14 +95,9 @@ static void rail_process_event(rdpSvcPlugin* plugin, FRDP_EVENT* event)
RAIL_UI_EVENT* rail_ui_event = NULL;
railPlugin* rail = NULL;
DEBUG_RAIL("rail_process_event: event_type=%d\n", event->event_type);
rail = (railPlugin*)plugin;
rail_ui_event = (RAIL_UI_EVENT*)event->user_data;
//if (event->event_type == FRDP_EVENT_TYPE_RAIL_UI_2_VCHANNEL)
//rail_core_handle_ui_event(rail->session, rail_ui_event);
freerdp_event_free(event);
}

View File

@ -289,7 +289,7 @@ void rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
rail_read_handshake_order(s, &rail_order->handshake);
rail_order->handshake.buildNumber = 0x00001DB1;
rail_order->handshake.buildNumber = 0x00001DB0;
rail_send_handshake_order(rail_order);
rail_order->client_status.flags = RAIL_CLIENTSTATUS_ALLOWLOCALMOVESIZE;
@ -319,7 +319,7 @@ void rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
rail_send_client_sysparam_order(rail_order);
rail_order->sysparam.systemParam = SPI_SET_DRAG_FULL_WINDOWS;
rail_order->sysparam.value = False;
rail_order->sysparam.value = True;
rail_send_client_sysparam_order(rail_order);
rail_order->sysparam.systemParam = SPI_SET_KEYBOARD_CUES;

View File

@ -265,6 +265,8 @@ struct rdp_settings
boolean frame_acknowledge;
boolean remote_app;
uint8 num_icon_caches;
uint16 num_icon_cache_entries;
boolean mouse_motion;
};

View File

@ -1117,14 +1117,13 @@ void rdp_read_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
{
uint8* header;
uint32 railSupportLevel = 0;
uint32 railSupportLevel;
header = rdp_capability_set_start(s);
if (settings->remote_app)
railSupportLevel = RAIL_LEVEL_SUPPORTED | RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED;
railSupportLevel = RAIL_LEVEL_SUPPORTED | RAIL_LEVEL_DOCKED_LANGBAR_SUPPORTED;
stream_read_uint32(s, railSupportLevel); /* railSupportLevel (4 bytes) */
stream_write_uint32(s, railSupportLevel); /* railSupportLevel (4 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_RAIL);
}
@ -1157,11 +1156,11 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s);
wndSupportLevel = WINDOW_LEVEL_SUPPORTED | WINDOW_LEVEL_SUPPORTED_EX;
wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX;
stream_write_uint32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */
stream_write_uint8(s, 3); /* numIconCaches (1 byte) */
stream_write_uint16(s, 12); /* numIconCacheEntries (2 bytes) */
stream_write_uint8(s, settings->num_icon_caches); /* numIconCaches (1 byte) */
stream_write_uint16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */
rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW);
}

View File

@ -106,6 +106,9 @@ rdpSettings* settings_new()
settings->client_dir = xstrdup(client_dll);
settings->num_icon_caches = 3;
settings->num_icon_cache_entries = 12;
settings->uniconv = freerdp_uniconv_new();
gethostname(settings->client_hostname, sizeof(settings->client_hostname) - 1);
}