aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSSHTunnel.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-08 20:41:11 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-08 20:41:11 +0000
commit4a950f357fb29640b2732ca34c80f81c0b23fbe6 (patch)
tree8dab179aa98c223a9791889846032c0e960636b4 /Source/SPSSHTunnel.m
parent2baa01621f83df3c81e6b6ed2310d483962dcf48 (diff)
downloadsequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.tar.gz
sequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.tar.bz2
sequelpro-4a950f357fb29640b2732ca34c80f81c0b23fbe6.zip
Bring outline view branch up to date with trunk (r3227:r3233).
Diffstat (limited to 'Source/SPSSHTunnel.m')
-rw-r--r--Source/SPSSHTunnel.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m
index 16d0c590..d0464d59 100644
--- a/Source/SPSSHTunnel.m
+++ b/Source/SPSSHTunnel.m
@@ -245,15 +245,15 @@
// If no local port has yet been chosen, choose one
if (!localPort) {
- NSInteger tempSocket;
+ int tempSocket;
struct sockaddr_in tempSocketAddress;
- NSInteger addressLength = sizeof(tempSocketAddress);
+ size_t addressLength = sizeof(tempSocketAddress);
if((tempSocket = socket(AF_INET, SOCK_STREAM, 0)) > 0) {
memset(&tempSocketAddress, 0, sizeof(tempSocketAddress));
tempSocketAddress.sin_family = AF_INET;
tempSocketAddress.sin_addr.s_addr = htonl(INADDR_ANY);
tempSocketAddress.sin_port = 0;
- if (bind(tempSocket, (struct sockaddr *)&tempSocketAddress, addressLength) >= 0) {
+ if (bind(tempSocket, (struct sockaddr *)&tempSocketAddress, (socklen_t)addressLength) >= 0) {
if (getsockname(tempSocket, (struct sockaddr *)&tempSocketAddress, (uint32_t *)&addressLength) >= 0) {
localPort = ntohs(tempSocketAddress.sin_port);
}
@@ -267,7 +267,7 @@
tempSocketAddress.sin_family = AF_INET;
tempSocketAddress.sin_addr.s_addr = htonl(INADDR_ANY);
tempSocketAddress.sin_port = 0;
- if (bind(tempSocket, (struct sockaddr *)&tempSocketAddress, addressLength) >= 0) {
+ if (bind(tempSocket, (struct sockaddr *)&tempSocketAddress, (socklen_t)addressLength) >= 0) {
if (getsockname(tempSocket, (struct sockaddr *)&tempSocketAddress, (uint32_t *)&addressLength) >= 0) {
localPortFallback = ntohs(tempSocketAddress.sin_port);
}