summaryrefslogtreecommitdiff
path: root/tests/src/xdmcp-client.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2015-11-20 12:50:22 +1300
committerRobert Ancell <robert.ancell@canonical.com>2015-11-20 12:50:22 +1300
commit3d160784fd90f82be10ba2cb7d5e15521fff96c4 (patch)
treee7a9e3e5fab4b87abbdb062c03dd957c7c2a7fac /tests/src/xdmcp-client.c
parent2178138278219b3b97930bd28295408c570135e6 (diff)
downloadlightdm-3d160784fd90f82be10ba2cb7d5e15521fff96c4.tar.gz
Test authentication data coming back from the XDMCP server
Diffstat (limited to 'tests/src/xdmcp-client.c')
-rw-r--r--tests/src/xdmcp-client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/src/xdmcp-client.c b/tests/src/xdmcp-client.c
index 75e01c34..e81bfad3 100644
--- a/tests/src/xdmcp-client.c
+++ b/tests/src/xdmcp-client.c
@@ -123,8 +123,8 @@ decode_accept (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
message->session_id = read_card32 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
message->authentication_name = read_string (buffer, buffer_length, length, &offset);
- length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
- read_string8 (buffer, buffer_length, length, &offset);
+ message->authentication_data_length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
+ message->authentication_data = read_string8 (buffer, buffer_length, message->authentication_data_length, &offset);
length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
message->authorization_name = read_string (buffer, buffer_length, length, &offset);
message->authorization_data_length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
@@ -151,8 +151,8 @@ decode_decline (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
message->status = read_string (buffer, buffer_length, length, &offset);
length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
message->authentication_name = read_string (buffer, buffer_length, length, &offset);
- length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
- read_string8 (buffer, buffer_length, length, &offset);
+ message->authentication_data_length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
+ message->authentication_data = read_string8 (buffer, buffer_length, message->authentication_data_length, &offset);
g_signal_emit (client, xdmcp_client_signals[XDMCP_CLIENT_DECLINE], 0, message);