summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2016-12-04 15:39:10 -0800
committerJay Sorg <jay.sorg@gmail.com>2016-12-04 15:39:10 -0800
commit9a517b34f0f4eb546c46ad4185260f4b66773a8c (patch)
treeacba9d4d05b0b495cfe628fb585001837407e371 /sesman
parent57905d71ada103ae397e441e2c14b6f64c365a69 (diff)
downloadxrdp-proprietary-9a517b34f0f4eb546c46ad4185260f4b66773a8c.tar.gz
xrdp-proprietary-9a517b34f0f4eb546c46ad4185260f4b66773a8c.zip
vnc: code cleanup
Diffstat (limited to 'sesman')
-rw-r--r--sesman/session.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sesman/session.c b/sesman/session.c
index 778e8b4c..de3b9f70 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -697,20 +697,9 @@ session_start_fork(tbus data, tui8 type, struct SCP_SESSION *s)
}
else if (type == SESMAN_SESSION_TYPE_XVNC)
{
- if (s->guid != 0)
- {
- char guid_str[64];
- char *pguid_str;
- int index;
- pguid_str = guid_str;
- for (index = 0; index < 16; index++)
- {
- g_snprintf(pguid_str, 4, "%2.2x", s->guid[index]);
- pguid_str += 2;
- }
- guid_str[32] = 0;
- env_check_password_file(passwd_file, guid_str);
- }
+ char guid_str[64];
+ g_bytes_to_hexstr(s->guid, 16, guid_str, 64);
+ env_check_password_file(passwd_file, guid_str);
xserver_params = list_create();
xserver_params->auto_free = 1;