Move message handlers to appropriate location.

This commit is contained in:
Michael Jumper 2013-06-19 16:26:30 -07:00
parent f295b09987
commit 48c27d74ce
3 changed files with 19 additions and 15 deletions

View File

@ -50,5 +50,16 @@
#include "rdpdr_messages.h"
#include "client.h"
/* STUB - message handlers */
void guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr,
STREAM* input_stream) {
int major, minor, client_id;
stream_read_uint16(input_stream, major);
stream_read_uint16(input_stream, minor);
stream_read_uint32(input_stream, client_id);
guac_client_log_info(rdpdr->client, "Connected to RDPDR %i.%i as client %i", major, minor, client_id);
}

View File

@ -68,5 +68,11 @@
#define PAKID_CORE_USER_LOGGEDON 0x554C
#define PAKID_PRN_USING_XPS 0x5543
/*
* Message handlers.
*/
void guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr, STREAM* input_stream);
#endif

View File

@ -85,19 +85,6 @@ void guac_rdpdr_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event) {
freerdp_event_free(event);
}
static void _guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr,
STREAM* input_stream) {
int major, minor, client_id;
stream_read_uint16(input_stream, major);
stream_read_uint16(input_stream, minor);
stream_read_uint32(input_stream, client_id);
guac_client_log_info(rdpdr->client, "Connected to RDPDR %i.%i as client %i", major, minor, client_id);
}
void guac_rdpdr_process_receive(rdpSvcPlugin* plugin,
STREAM* input_stream) {
@ -117,7 +104,7 @@ void guac_rdpdr_process_receive(rdpSvcPlugin* plugin,
switch (packet_id) {
case PAKID_CORE_SERVER_ANNOUNCE:
_guac_rdpdr_process_server_announce(rdpdr, input_stream);
guac_rdpdr_process_server_announce(rdpdr, input_stream);
break;
case PAKID_CORE_CLIENTID_CONFIRM: