Commit d5070d79 authored by Ian Craggs's avatar Ian Craggs

Fix ant build & test plus some compiler warnings

Squashed commit of the following:

commit 42ff91b70ebc9719048c1676548683cdabfaa433
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Thu Jun 29 10:38:20 2017 +0100

    Proxy ports

commit c7cb7c1372796d26fd09cc9d8a098fd96e0d00d2
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Jun 28 19:46:19 2017 +0100

    Fix build.xml syntax

commit 371565969967a2bbad9965ec87019c57f63beb5f
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Jun 28 19:45:05 2017 +0100

    Fix mqttsas2 invocation

commit ec2d18d37c533d4df3a56cc5d28feb3334259d62
Author: Ian Craggs <icraggs@uk.ibm.com>
Date:   Wed Jun 28 19:34:10 2017 +0100

    Change broker port to allow proxy to start on Hudson
parent 6b0502d1
<!--****************************************************************************
Copyright (c) 2012, 2016 IBM Corp.
Copyright (c) 2012, 2017 IBM Corp.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
......@@ -24,7 +24,7 @@
</taskdef>
<property name="output.folder" value="build/output" />
<property name="release.version" value="1.1.0" />
<property name="release.version" value="1.2.0" />
<property name="libname" value="mqttv3c" />
<property name="libname.ssl" value="mqttv3cs" />
......@@ -33,7 +33,8 @@
<property name="ssl" value="yes" />
<property name="windows.openssl.folder" value="c:\openssl\bin" />
<property name="test.hostname" value="iot.eclipse.org"/>
<property name="test.port" value="18883"/>
<property name="test.port" value="1883"/>
<property name="proxy.port" value="18883"/>
<if>
<os family="windows"/>
<then>
......@@ -89,6 +90,8 @@
<exec executable="python" dir="test" spawn="true">
<arg value="mqttsas2.py" />
<arg value="${test.hostname}" />
<arg value="${test.port}" />
<arg value="${proxy.port}" />
</exec>
<if>
<os family="windows"/>
......@@ -111,13 +114,17 @@
<arg value="${aTest}.exe" />
<arg value="--connection" />
<arg value="tcp://${test.hostname}:${test.port}" />
<arg value="--proxy_connection" />
<arg value="tcp://localhost:${proxy.port}" />
<env key="PATH" path="${output.folder}" />
</exec>
</then>
<else>
<exec executable="./${aTest}" failonerror="true" dir="${output.folder}/test" >
<arg value="--connection" />
<arg value="tcp://${test.hostname}:1883" />
<arg value="tcp://${test.hostname}:${test.port}" />
<arg value="--proxy_connection" />
<arg value="tcp://localhost:${proxy.port}" />
<env key="LD_LIBRARY_PATH" path="${output.folder}" />
<env key="DYLD_LIBRARY_PATH" path="${output.folder}" />
</exec>
......@@ -307,4 +314,3 @@
<target name="full" depends="init, version, build, test, doc, package, copy" />
</project>
......@@ -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)
......
......@@ -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;
......
......@@ -106,6 +106,9 @@ def run():
else:
brokerport = 1883
if len(sys.argv) > 3:
myport = int(sys.argv[3])
else:
if brokerhost == myhost:
myport = brokerport + 1
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment