aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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.