aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGZNGET FOSS Team <opensource@gznianguan.com>2017-11-02 13:04:49 +0100
committerGZNGET FOSS Team <opensource@gznianguan.com>2017-11-02 13:04:49 +0100
commit93181c8d8ab0a3c769964bde23d679661e40cbbe (patch)
tree48799a619fb59cff4b4b865cb4a4b5b9830f6e3e /lib
parentac56aa49957a627d77972a6019ce5738dd697f0f (diff)
downloadperl-Arctica-Telekinesis-Server-93181c8d8ab0a3c769964bde23d679661e40cbbe.tar.gz
perl-Arctica-Telekinesis-Server-93181c8d8ab0a3c769964bde23d679661e40cbbe.tar.bz2
perl-Arctica-Telekinesis-Server-93181c8d8ab0a3c769964bde23d679661e40cbbe.zip
Forward NX window ID to client
Diffstat (limited to 'lib')
-rw-r--r--lib/Arctica/Telekinesis/Server.pm32
1 files changed, 26 insertions, 6 deletions
diff --git a/lib/Arctica/Telekinesis/Server.pm b/lib/Arctica/Telekinesis/Server.pm
index 63e6839..20996b6 100644
--- a/lib/Arctica/Telekinesis/Server.pm
+++ b/lib/Arctica/Telekinesis/Server.pm
@@ -113,13 +113,24 @@ sub c2s_service_neg {
# If server side is newest, serverside must know if we are compatible.
# If client side is newest, we expect client to tell us if we have a compatible pair.
BugOUT(9,"Service Negotiation Step 1");
- $_[3]->server_send($_[2],'srvcneg',{
- step => 2,
- services => {
- multimedia => 1,
- webcontent => 1,
- },
+ warn("WAITING FOR CLIENTNXWID VIA TEKICMD!!!!!");
+ Glib::Timeout->add(100, sub {
+ if ($self->{'nx'}{'clientnxwid'} =~ /^([\da-zA-Z]{4,})$/) {
+ BugOUT(8,"Ok... Got clientnxwid!");
+ $self->tekicli_send('srvcneg',{
+ step => 2,
+ services => {
+ multimedia => 1,
+ webcontent => 1,
+ },
+ clientnxwid => $self->{'nx'}{'clientnxwid'},
+ });
+ return 0;
+ } else {
+ return 1;
+ }
});
+
} elsif ($jdata->{'step'} eq 3) {
BugOUT(9,"Service Negotiation Step 3");
# By this point we should be done negotiating...
@@ -259,6 +270,15 @@ sub _app_reg {
}
}
+sub set_client_nxwid {
+ my $self = $_[0];
+ if ($_[1] =~ /([\da-zA-Z]{4,})/) {
+ $self->{'nx'}{'clientnxwid'} = $1;
+ } else {
+ $self->{'nx'}{'clientnxwid'} = 0;
+ }
+}
+
sub tmp_socket_info {
# TMP function to inform about socket ID.
# A version of this may be done to provide this info when running TeKi outside of Arctica.