diff --git a/src/samples/MQTTAsync_publish.c b/src/samples/MQTTAsync_publish.c index a524940e..c726ac30 100644 --- a/src/samples/MQTTAsync_publish.c +++ b/src/samples/MQTTAsync_publish.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 IBM Corp. + * Copyright (c) 2012, 2018 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,9 +25,11 @@ #include #endif +#if defined(_WRS_KERNEL) #include +#endif -#define ADDRESS "tcp://m2m.eclipse.org:1883" +#define ADDRESS "tcp://iot.eclipse.org:1883" #define CLIENTID "ExampleClientPub" #define TOPIC "MQTT Examples" #define PAYLOAD "Hello World!" diff --git a/src/samples/MQTTAsync_subscribe.c b/src/samples/MQTTAsync_subscribe.c index d0a01f80..e0db3746 100644 --- a/src/samples/MQTTAsync_subscribe.c +++ b/src/samples/MQTTAsync_subscribe.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2017 IBM Corp. + * Copyright (c) 2012, 2018 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -25,7 +25,9 @@ #include #endif +#if defined(_WRS_KERNEL) #include +#endif #define ADDRESS "tcp://localhost:1883" #define CLIENTID "ExampleClientSub" diff --git a/src/samples/paho_c_pub.c b/src/samples/paho_c_pub.c index 1a4040d2..0ba5f3b5 100644 --- a/src/samples/paho_c_pub.c +++ b/src/samples/paho_c_pub.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2016 IBM Corp. + * Copyright (c) 2012, 2018 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -53,7 +53,9 @@ #include #endif +#if defined(_WRS_KERNEL) #include +#endif volatile int toStop = 0; @@ -153,7 +155,7 @@ void myconnect(MQTTAsync* client) conn_opts.onFailure = onConnectFailure; conn_opts.context = client; ssl_opts.enableServerCertAuth = 0; - conn_opts.ssl = &ssl_opts; + //conn_opts.ssl = &ssl_opts; need to link with SSL library for this to work conn_opts.automaticReconnect = 1; connected = 0; if ((rc = MQTTAsync_connect(*client, &conn_opts)) != MQTTASYNC_SUCCESS) @@ -195,7 +197,7 @@ void connectionLost(void* context, char* cause) conn_opts.onFailure = onConnectFailure; conn_opts.context = client; ssl_opts.enableServerCertAuth = 0; - conn_opts.ssl = &ssl_opts; + //conn_opts.ssl = &ssl_opts; need to link with SSL library for this to work connected = 0; if ((rc = MQTTAsync_connect(client, &conn_opts)) != MQTTASYNC_SUCCESS) { diff --git a/src/samples/paho_c_sub.c b/src/samples/paho_c_sub.c index bbb5edd5..4eed246f 100644 --- a/src/samples/paho_c_sub.c +++ b/src/samples/paho_c_sub.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 IBM Corp. + * Copyright (c) 2012, 2018 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -56,7 +56,9 @@ #include #endif +#if defined(_WRS_KERNEL) #include +#endif volatile int finished = 0; char* topic = NULL;