Create shared GUID module to simplify session guid handling
This commit is contained in:
@@ -1717,10 +1717,10 @@ lib_mod_connect(struct vnc *v)
|
||||
if (error == 0)
|
||||
{
|
||||
init_stream(s, 8192);
|
||||
if (v->got_guid)
|
||||
if (guid_is_set(&v->guid))
|
||||
{
|
||||
char guid_str[64];
|
||||
g_bytes_to_hexstr(v->guid, 16, guid_str, 64);
|
||||
char guid_str[GUID_STR_SIZE];
|
||||
guid_to_str(&v->guid, guid_str);
|
||||
rfbHashEncryptBytes(s->data, guid_str);
|
||||
}
|
||||
else
|
||||
@@ -2091,8 +2091,7 @@ lib_mod_set_param(struct vnc *v, const char *name, const char *value)
|
||||
}
|
||||
else if (g_strcasecmp(name, "guid") == 0)
|
||||
{
|
||||
v->got_guid = 1;
|
||||
g_memcpy(v->guid, value, 16);
|
||||
v->guid = *(struct guid *)value;
|
||||
}
|
||||
else if (g_strcasecmp(name, "disabled_encodings_mask") == 0)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "parse.h"
|
||||
#include "os_calls.h"
|
||||
#include "defines.h"
|
||||
#include "guid.h"
|
||||
|
||||
#define CURRENT_MOD_VER 4
|
||||
|
||||
@@ -159,8 +160,7 @@ struct vnc
|
||||
struct vnc_clipboard_data *vc;
|
||||
int delay_ms;
|
||||
struct trans *trans;
|
||||
int got_guid;
|
||||
tui8 guid[16];
|
||||
struct guid guid;
|
||||
int suppress_output;
|
||||
unsigned int enabled_encodings_mask;
|
||||
/* Resizeable support */
|
||||
|
||||
Reference in New Issue
Block a user