summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Mikaelsson <derfian@cendio.se>2018-01-25 17:15:22 +0100
committerGitHub <noreply@github.com>2018-01-25 17:15:22 +0100
commitda5153c578ca21fd380cfa11bed044b743e17403 (patch)
tree3241ffbe2b029c9ca0dbf057b892926ace5ddfcf
parentcf32cb497a93cd09f98f25f713b1969c8fba6e4a (diff)
parent2f6cd4df7e55b68c9c846a6db1b72bfcef3017b1 (diff)
downloadrdesktop-da5153c578ca21fd380cfa11bed044b743e17403.zip
Merge pull request #212 from derfian/rdp-rename-client-and-error-info-pdus
Rename functions that send Client Info PDU and handle Set Error Info PDU
-rw-r--r--proto.h1
-rw-r--r--rdp.c18
2 files changed, 9 insertions, 10 deletions
diff --git a/proto.h b/proto.h
index 7d54e93..f346646 100644
--- a/proto.h
+++ b/proto.h
@@ -158,7 +158,6 @@ void process_system_pointer_pdu(STREAM s);
void set_system_pointer(uint32 ptr);
void process_bitmap_updates(STREAM s);
void process_palette(STREAM s);
-void process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason);
void rdp_main_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
RD_BOOL rdp_loop(RD_BOOL * deactivated, uint32 * ext_disc_reason);
RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command,
diff --git a/rdp.c b/rdp.c
index 54e51d9..7b0fded 100644
--- a/rdp.c
+++ b/rdp.c
@@ -308,10 +308,10 @@ rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size)
}
-/* Parse a logon info packet */
+/* Send a Client Info PDU */
static void
-rdp_send_logon_info(uint32 flags, char *domain, char *user,
- char *password, char *program, char *directory)
+rdp_send_client_info_pdu(uint32 flags, char *domain, char *user,
+ char *password, char *program, char *directory)
{
char *ipaddr = tcp_get_address();
/* length of string in TS_INFO_PACKET excludes null terminator */
@@ -1512,13 +1512,13 @@ process_pdu_logon(STREAM s)
}
-/* Process a disconnect PDU */
-void
-process_disconnect_pdu(STREAM s, uint32 * ext_disc_reason)
+/* Process a Set Error Info PDU */
+static void
+process_ts_set_error_info_pdu(STREAM s, uint32 * ext_disc_reason)
{
in_uint32_le(s, *ext_disc_reason);
- logger(Protocol, Debug, "process_disconnect_pdu(), reason = %d", ext_disc_reason);
+ logger(Protocol, Debug, "process_ts_set_error_info_pdu(), error info = %d", *ext_disc_reason);
}
/* Process data PDU */
@@ -1594,7 +1594,7 @@ process_data_pdu(STREAM s, uint32 * ext_disc_reason)
break;
case RDP_DATA_PDU_DISCONNECT:
- process_disconnect_pdu(s, ext_disc_reason);
+ process_ts_set_error_info_pdu(s, ext_disc_reason);
/* We used to return true and disconnect immediately here, but
* Windows Vista sends a disconnect PDU with reason 0 when
@@ -1878,7 +1878,7 @@ rdp_connect(char *server, uint32 flags, char *domain, char *password,
if (!sec_connect(server, g_username, domain, password, reconnect))
return False;
- rdp_send_logon_info(flags, domain, g_username, password, command, directory);
+ rdp_send_client_info_pdu(flags, domain, g_username, password, command, directory);
/* run RDP loop until first licence demand active PDU */
while (!g_rdp_shareid)