mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-422: Add timezone instruction to handshake, remove kludge from JDBC module.
This commit is contained in:
@@ -476,15 +476,6 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
|
|||||||
activeConnections.put(connection.getIdentifier(), activeConnection);
|
activeConnections.put(connection.getIdentifier(), activeConnection);
|
||||||
activeConnectionGroups.put(connection.getParentIdentifier(), activeConnection);
|
activeConnectionGroups.put(connection.getParentIdentifier(), activeConnection);
|
||||||
config = getGuacamoleConfiguration(activeConnection.getUser(), connection);
|
config = getGuacamoleConfiguration(activeConnection.getUser(), connection);
|
||||||
|
|
||||||
// If timezone is provided by tunnel parameter, and not
|
|
||||||
// overriden by connection parameter, set it.
|
|
||||||
String tzTunnel = info.getTimezone();
|
|
||||||
String tzParam = config.getParameter("timezone");
|
|
||||||
if ((tzParam == null || tzParam.isEmpty())
|
|
||||||
&& tzTunnel != null && !tzTunnel.isEmpty())
|
|
||||||
config.setParameter("timezone", tzTunnel);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we ARE joining an active connection, generate a configuration
|
// If we ARE joining an active connection, generate a configuration
|
||||||
|
@@ -185,6 +185,13 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
|
|||||||
info.getImageMimetypes().toArray(new String[0])
|
info.getImageMimetypes().toArray(new String[0])
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Send client timezone
|
||||||
|
writer.writeInstruction(
|
||||||
|
new GuacamoleInstruction(
|
||||||
|
"timezone",
|
||||||
|
info.getTimezone()
|
||||||
|
));
|
||||||
|
|
||||||
// Send args
|
// Send args
|
||||||
writer.writeInstruction(new GuacamoleInstruction("connect", arg_values));
|
writer.writeInstruction(new GuacamoleInstruction("connect", arg_values));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user