mirror of https://github.com/eclipse/paho.mqtt.c
Tidy up test3 and CMake config
This commit is contained in:
parent
34360f6ac6
commit
50f0501eb6
|
|
@ -17,7 +17,7 @@
|
|||
# Note: on OS X you should install XCode and the associated command-line tools
|
||||
|
||||
PROJECT("paho" C)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
MESSAGE(STATUS "CMake version: " ${CMAKE_VERSION})
|
||||
MESSAGE(STATUS "CMake system name: " ${CMAKE_SYSTEM_NAME})
|
||||
|
||||
|
|
|
|||
23
test/test3.c
23
test/test3.c
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2014 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
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
* Allan Stockdill-Mander - initial API and implementation and/or initial documentation
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
* SSL tests for the MQ Telemetry MQTT C client
|
||||
|
|
@ -24,17 +23,17 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if !defined(_WINDOWS)
|
||||
#if defined(_WINDOWS)
|
||||
#include <windows.h>
|
||||
#include <openssl/applink.c>
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#define snprintf _snprintf
|
||||
#define setenv(a, b, c) _putenv_s(a, b)
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#include <openssl/applink.c>
|
||||
#define MAXHOSTNAMELEN 256
|
||||
#define snprintf _snprintf
|
||||
#define setenv(a, b, c) _putenv_s(a, b)
|
||||
#endif
|
||||
|
||||
#if defined(IOS)
|
||||
|
|
@ -45,10 +44,6 @@ char persistenceStore[1024];
|
|||
char* persistenceStore = NULL;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#include <logaX.h> /* For general log messages */
|
||||
#define MyLog logaLine
|
||||
#else
|
||||
#define LOGA_DEBUG 0
|
||||
#define LOGA_INFO 1
|
||||
#include <stdarg.h>
|
||||
|
|
@ -1090,7 +1085,7 @@ int test3b(struct Options options)
|
|||
MyLog(LOGA_DEBUG, "Connecting");
|
||||
|
||||
rc = MQTTClient_connect(c, &opts);
|
||||
if (!(assert("Good rc from connect", rc == MQTTCLIENT_FAILURE, "rc was %d", rc)))
|
||||
if (!(assert("Bad rc from connect", rc == MQTTCLIENT_FAILURE, "rc was %d", rc)))
|
||||
goto exit;
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Reference in New Issue