diff --git a/build.xml b/build.xml
index ca0a550f..2d5b78d2 100644
--- a/build.xml
+++ b/build.xml
@@ -1,15 +1,15 @@
@@ -23,8 +23,8 @@
-
-
+
+
@@ -33,7 +33,8 @@
-
+
+
@@ -52,7 +53,7 @@
-
+
@@ -73,22 +74,24 @@
-
+
-
+
-
+
-
+
-
+
+
+
@@ -105,19 +108,23 @@
-
-
+
+
+
+
-
-
+
+
-
+
+
+
@@ -128,8 +135,8 @@
-
-
+
+
@@ -137,8 +144,8 @@
-
-
+
+
@@ -161,10 +168,10 @@
-
+
-
+
@@ -176,11 +183,11 @@
-
+
-
+
@@ -192,7 +199,7 @@
-
+
@@ -209,7 +216,7 @@
-
+
@@ -224,7 +231,7 @@
-
+
@@ -263,7 +270,7 @@
-
+
@@ -284,7 +291,7 @@
-
+
@@ -299,7 +306,7 @@
-
+
@@ -307,4 +314,3 @@
-
diff --git a/src/MQTTClient.c b/src/MQTTClient.c
index 5068989c..6f15f1ca 100644
--- a/src/MQTTClient.c
+++ b/src/MQTTClient.c
@@ -286,7 +286,7 @@ static int MQTTClient_disconnect_internal(MQTTClient handle, int timeout);
static void MQTTClient_retry(void);
static MQTTPacket* MQTTClient_cycle(int* sock, unsigned long timeout, int* rc);
static MQTTPacket* MQTTClient_waitfor(MQTTClient handle, int packet_type, int* rc, long timeout);
-static int pubCompare(void* a, void* b);
+/*static int pubCompare(void* a, void* b); */
static void MQTTProtocol_checkPendingWrites(void);
static void MQTTClient_writeComplete(int socket);
@@ -1922,12 +1922,12 @@ exit:
FUNC_EXIT;
}
-
+/*
static int pubCompare(void* a, void* b)
{
Messages* msg = (Messages*)a;
return msg->publish == (Publications*)b;
-}
+}*/
int MQTTClient_waitForCompletion(MQTTClient handle, MQTTClient_deliveryToken mdt, unsigned long timeout)
diff --git a/src/Thread.c b/src/Thread.c
index 4d96d89e..8af5d593 100644
--- a/src/Thread.c
+++ b/src/Thread.c
@@ -219,7 +219,7 @@ int Thread_wait_sem(sem_type sem, int timeout)
* so I've used trywait in a loop instead. Ian Craggs 23/7/2010
*/
int rc = -1;
-#if !defined(WIN32) && !defined(WIN64)
+#if !defined(WIN32) && !defined(WIN64) && !defined(OSX)
#define USE_TRYWAIT
#if defined(USE_TRYWAIT)
int i = 0;
diff --git a/test/mqttsas2.py b/test/mqttsas2.py
index cbb7abfc..cdcb6b63 100755
--- a/test/mqttsas2.py
+++ b/test/mqttsas2.py
@@ -106,10 +106,13 @@ def run():
else:
brokerport = 1883
- if brokerhost == myhost:
- myport = brokerport + 1
+ if len(sys.argv) > 3:
+ myport = int(sys.argv[3])
else:
- myport = 1883
+ if brokerhost == myhost:
+ myport = brokerport + 1
+ else:
+ myport = 1883
print("Listening on port", str(myport)+", broker on port", brokerport)
s = ThreadingTCPServer(("127.0.0.1", myport), MyHandler)