From trakatelis@uom.edu.gr  Thu Oct 30 07:44:18 2014
Received: (at 642) by bugs.x2go.org; 30 Oct 2014 06:44:21 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID,
	URIBL_BLOCKED autolearn=ham version=3.3.2
Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 22E345DB48
	for <642@bugs.x2go.org>; Thu, 30 Oct 2014 07:44:17 +0100 (CET)
Received: by mail-wi0-f178.google.com with SMTP id q5so6456159wiv.11
        for <642@bugs.x2go.org>; Wed, 29 Oct 2014 23:44:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=uom.edu.gr; s=google;
        h=from:to:cc:references:in-reply-to:subject:date:message-id
         :mime-version:content-type:thread-index:content-language;
        bh=yiALOdamzOjtE+ST6hr7NsVwt9JFkNNkrCnOZf+Y7aA=;
        b=Dvz9ASWSsMVejXbwMOz3jI/3/PAo/WC9FmX523hmaMnfBO4w5lan0dkC5x96krPNxd
         vkSiypfHtW/pJvLxtt9n9dbZl1zhbmcNCHsCKcUn50I5GZl4pwUOnIGcev2E/1Gwdv7w
         ucWZQlTgfQeToNLayGevF/7lXe5ItfzhqF+Ps=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date
         :message-id:mime-version:content-type:thread-index:content-language;
        bh=yiALOdamzOjtE+ST6hr7NsVwt9JFkNNkrCnOZf+Y7aA=;
        b=kHiiLXYW7yDRo363l4LPJgJUKNXZ5v7Z+qNo4TnWE+7KeTBLkLYdaHACH7nNg3J5Nx
         KYEYeRhlfQ2dCjCfj4kJsYCREo1Qbq6J9zTZ3S0Iyy/FoIBi1BzSxvO8MUMkafFIaYG/
         Sq+xHiEKpO3YL5VMQnOeJRBeFRUrj/FAe4pPJwqxT+S0y+4gm7DeiGtNbuU6Kr967WYx
         8xiBxdIdPgh8Mo29Ac/+3OZNDMbwsv9DusMZpFkyzk9I9wZrxIaSSaf+vTGkKP6OMmd1
         bAlA/RAKdsahAPUgkLG8JtVBHMCLFRxM4keIb/8obRnPWnzU0nH80eqouI/Rbkx4bo+5
         +drA==
X-Gm-Message-State: ALoCoQnQb12OM9lj3IKbiZOyPphDnK7MSAzcLqCZVVIxTLOv0OoCwR/GPTUGDGM8lBfKuIg0BKfi
X-Received: by 10.194.209.230 with SMTP id mp6mr18191965wjc.2.1414651456770;
        Wed, 29 Oct 2014 23:44:16 -0700 (PDT)
Received: from HomePC (46-198-96-210.adsl.cyta.gr. [46.198.96.210])
        by mx.google.com with ESMTPSA id j20sm7601081wjn.0.2014.10.29.23.44.15
        for <multiple recipients>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
        Wed, 29 Oct 2014 23:44:15 -0700 (PDT)
From: "George Trakatelis" <trakatelis@uom.edu.gr>
To: <642@bugs.x2go.org>
Cc: "'Mike Gabriel'" <mike.gabriel@das-netzwerkteam.de>,
	"'Mike DePaulo'" <mikedep333@gmail.com>
References: <20141015203358.Horde.KocdhaNWJNwyU7IDPf0Pug5@mail.das-netzwerkteam.de> <543F84ED.6030207@phoca-gmbh.de> <CAMKht8ggkVX2zF8wf5AFrNqGODAB+10EcX9VW0SN4K_XCaaSpg@mail.gmail.com> <20141016143029.Horde.DtEVLqASiFwRgVFw5c35nw1@mail.das-netzwerkteam.de> <000301cff26e$40b79090$c226b1b0$@edu.gr> <20141028075509.Horde.alDesymTpPfVMqGsvA6MeQ1@mail.das-netzwerkteam.de> <000301cff2d0$09ec8a90$1dc59fb0$@edu.gr> <20141028174910.Horde.If4Hris3URMROk_TY9keEA2@mail.das-netzwerkteam.de>
In-Reply-To: <20141028174910.Horde.If4Hris3URMROk_TY9keEA2@mail.das-netzwerkteam.de>
Subject: RE: [X2Go-Dev] Bug#642: Bug#642: Changes in X2GoClient for Windows to enable it conform to Visual Studio's stricter type checking
Date: Thu, 30 Oct 2014 08:44:14 +0200
Message-ID: <000601cff40c$ec4da490$c4e8edb0$@edu.gr>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0007_01CFF41D.AFD67490"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac/y13wKwrRDz+xVRiKDGaVNqQ61FABMsZGg
Content-Language: el

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01CFF41D.AFD67490
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hi Mikes,

I have just discovered an error in one of the previously provided patch =
files.
Windows sockets cleanup is handled in SshProcess::~SshProcess() (as it =
should be),
so I had to remove WSACleanup() from patched =
SshMasterConnection::finalize(int)
which caused a connection error if someone -after logging out- tried to =
login to the same server.

To avoid any ambiguity I re-attach the correct patch files.

George

PS. I wish a constructive gathering to all participants.


> -----Original Message-----
> From: Mike Gabriel [mailto:mike.gabriel@das-netzwerkteam.de]
> Sent: Tuesday, October 28, 2014 7:49 PM
> To: George Trakatelis
> Cc: 642@bugs.x2go.org; 'Mike DePaulo'
> Subject: Re: [X2Go-Dev] Bug#642: Bug#642: Changes in X2GoClient for
> Windows to enable it conform to Visual Studio's stricter type checking
>=20
> HI Mike#2
>=20
> On  Di 28 Okt 2014 17:55:52 CET, George Trakatelis wrote:
>=20
> > As this wishlist bug is actually resolved by applying the 3 patches,
> > my answer is 'Yes, you can close it, provided that at least one
> > volunteer confirms its validity'.
>    ^^^^^^^^^^^^^^^^^^^^^
>=20
> @Mike#2: I fear, this is on you...
>=20
> Mike#1
>=20
>=20
> --
>=20
> DAS-NETZWERKTEAM
> mike gabriel, herweg 7, 24357 fleckeby
> fon: +49 (1520) 1976 148
>=20
> GnuPG Key ID 0x25771B31
> mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
>=20
> freeBusy:
> https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-
> netzwerkteam.de.xfb

------=_NextPart_000_0007_01CFF41D.AFD67490
Content-Type: application/octet-stream;
	name="conform-to-stricter-type-checking-mingw482.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="conform-to-stricter-type-checking-mingw482.patch"

diff --git a/onmainwindow.cpp b/onmainwindow.cpp=0A=
index 9234a2e..bf58d4d 100644=0A=
--- a/onmainwindow.cpp=0A=
+++ b/onmainwindow.cpp=0A=
@@ -5096,7 +5096,7 @@ void ONMainWindow::slotRetResumeSess ( bool result,=0A=
 #endif //Q_OS_WIN=0A=
         if ( sshSndTunnel )=0A=
         {=0A=
-            char* okSlot=3D0;=0A=
+            const char* okSlot=3D0;=0A=
 #ifdef Q_OS_WIN=0A=
             if ( sndSystem=3D=3DPULSE )=0A=
             {=0A=

------=_NextPart_000_0007_01CFF41D.AFD67490
Content-Type: application/octet-stream;
	name="conform-to-stricter-type-checking-VS2010-close-socket.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="conform-to-stricter-type-checking-VS2010-close-socket.patch"

diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp=0A=
index c3f78d7..519548f 100755=0A=
--- a/sshmasterconnection.cpp=0A=
+++ b/sshmasterconnection.cpp=0A=
@@ -104,10 +104,10 @@ void SshMasterConnection::parseKnownHosts()=0A=
         for (int i=3D0; i<bytes.count();)=0A=
         {=0A=
             int size=3D0;=0A=
-            //first 4 bytes are for size of data fild (big-endian)=0A=
+            //first 4 bytes are for size of data field (big-endian)=0A=
             for (int j=3D0; j<4; ++j)=0A=
             {=0A=
-                size+=3D((uchar)(bytes[i])) * pow(256,3-j);=0A=
+                size+=3D((uchar)(bytes[i])) * pow((float)256,3-j);=0A=
                 i++;=0A=
             }=0A=
             QByteArray data;=0A=
@@ -1674,8 +1674,11 @@ void SshMasterConnection::finalize ( int item )=0A=
     {=0A=
 #ifndef Q_OS_WIN=0A=
         shutdown(tcpSocket, SHUT_RDWR);=0A=
-#endif=0A=
         close ( tcpSocket );=0A=
+#else=0A=
+        shutdown(tcpSocket, SD_BOTH);=0A=
+        closesocket ( tcpSocket );=0A=
+#endif=0A=
     }=0A=
     SshProcess* proc=3DchannelConnections[item].creator;=0A=
     QString uuid=3DchannelConnections[item].uuid;=0A=
diff --git a/wapi.cpp b/wapi.cpp=0A=
index f167669..f0972d7 100644=0A=
--- a/wapi.cpp=0A=
+++ b/wapi.cpp=0A=
@@ -22,6 +22,7 @@=0A=
 #endif=0A=
 #include "x2goclientconfig.h"=0A=
 #ifdef Q_OS_WIN=0A=
+#include <winsock2.h>=0A=
 #include <windows.h>=0A=
 #include <sddl.h>=0A=
 #include "wapi.h"=0A=

------=_NextPart_000_0007_01CFF41D.AFD67490
Content-Type: application/octet-stream;
	name="add-libraries-to-build-with-VS2010-command-line.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="add-libraries-to-build-with-VS2010-command-line.patch"

diff --git a/config_win_vs.bat b/config_win_vs.bat=0A=
new file mode 100644=0A=
index 0000000..49bda97=0A=
--- /dev/null=0A=
+++ b/config_win_vs.bat=0A=
@@ -0,0 +1,7 @@=0A=
+nmake distclean=0A=
+lrelease x2goclient.pro=0A=
+set X2GO_CLIENT_TARGET=3D=0A=
+qmake=0A=
+cd x2gohelper=0A=
+nmake clean=0A=
+cd ..=0A=
diff --git a/x2goclient.pro b/x2goclient.pro=0A=
index e6eee01..740d0d3 100755=0A=
--- a/x2goclient.pro=0A=
+++ b/x2goclient.pro=0A=
@@ -119,6 +119,7 @@ SOURCES +=3D sharewidget.cpp \=0A=
            folderexplorer.cpp=0A=
 =0A=
 LIBS +=3D -lssh=0A=
+win32:LIBS +=3D -lAdvAPI32 -lshell32 -lUser32=0A=
 =0A=
 plugin {=0A=
 	TARGET =3D x2goplugin=0A=
@@ -133,7 +134,7 @@ else {=0A=
 =0A=
 !isEmpty(TRANSLATIONS) {=0A=
   isEmpty(QMAKE_LRELEASE) {=0A=
-    win32:QMAKE_LRELEASE =3D $$[QT_INSTALL_BINS]\lrelease.exe=0A=
+    win32:QMAKE_LRELEASE =3D $$[QT_INSTALL_BINS]\\lrelease.exe=0A=
     else:QMAKE_LRELEASE =3D $$[QT_INSTALL_BINS]/lrelease=0A=
   }=0A=
 =0A=

------=_NextPart_000_0007_01CFF41D.AFD67490--

