[X2Go-Commits] [x2goclient] 03/03: Apply conform-to-stricter-type-checking-VS2010-close-socket.patch from George Trakatelis (uom.edu.gr) (Fixes: #642)
git-admin at x2go.org
git-admin at x2go.org
Mon Dec 1 14:22:09 CET 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 8707629a1c89761934852e7813f1f9ce25303466
Author: Mike DePaulo <mikedep333 at gmail.com>
Date: Mon Dec 1 08:21:46 2014 -0500
Apply conform-to-stricter-type-checking-VS2010-close-socket.patch from George Trakatelis (uom.edu.gr) (Fixes: #642)
---
sshmasterconnection.cpp | 9 ++++++---
wapi.cpp | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp
index c3f78d7..519548f 100755
--- a/sshmasterconnection.cpp
+++ b/sshmasterconnection.cpp
@@ -104,10 +104,10 @@ void SshMasterConnection::parseKnownHosts()
for (int i=0; i<bytes.count();)
{
int size=0;
- //first 4 bytes are for size of data fild (big-endian)
+ //first 4 bytes are for size of data field (big-endian)
for (int j=0; j<4; ++j)
{
- size+=((uchar)(bytes[i])) * pow(256,3-j);
+ size+=((uchar)(bytes[i])) * pow((float)256,3-j);
i++;
}
QByteArray data;
@@ -1674,8 +1674,11 @@ void SshMasterConnection::finalize ( int item )
{
#ifndef Q_OS_WIN
shutdown(tcpSocket, SHUT_RDWR);
-#endif
close ( tcpSocket );
+#else
+ shutdown(tcpSocket, SD_BOTH);
+ closesocket ( tcpSocket );
+#endif
}
SshProcess* proc=channelConnections[item].creator;
QString uuid=channelConnections[item].uuid;
diff --git a/wapi.cpp b/wapi.cpp
index f167669..f0972d7 100644
--- a/wapi.cpp
+++ b/wapi.cpp
@@ -22,6 +22,7 @@
#endif
#include "x2goclientconfig.h"
#ifdef Q_OS_WIN
+#include <winsock2.h>
#include <windows.h>
#include <sddl.h>
#include "wapi.h"
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list