1
0
mirror of https://github.com/eclipse/mosquitto.git synced 2025-05-08 16:52:13 +08:00

Fix errors from big code import.

This commit is contained in:
Roger A. Light 2014-11-12 20:47:16 +00:00
parent fb72bf9c14
commit 36f88d902d
9 changed files with 17 additions and 5 deletions

View File

@ -664,11 +664,15 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg)
char err[1024];
int rc;
#ifdef WITH_SRV
if(cfg->use_srv){
rc = mosquitto_connect_srv(mosq, cfg->host, cfg->keepalive, cfg->bind_address);
}else{
rc = mosquitto_connect_bind(mosq, cfg->host, cfg->port, cfg->keepalive, cfg->bind_address);
}
#else
rc = mosquitto_connect_bind(mosq, cfg->host, cfg->port, cfg->keepalive, cfg->bind_address);
#endif
if(rc){
if(!cfg->quiet){
if(rc == MOSQ_ERR_ERRNO){

View File

@ -44,7 +44,9 @@ struct mosq_config {
long msglen; /* pub */
char *topic; /* pub */
char *bind_address;
#ifdef WITH_SRV
bool use_srv;
#endif
bool debug;
bool quiet;
unsigned int max_inflight;

View File

@ -20,7 +20,7 @@ Contributors:
#include <stdio.h>
#include <sys/types.h>
#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && !defined(WIN32) && !defined(__SYMBIAN32__)
#if defined(WITH_MEMORY_TRACKING) && defined(WITH_BROKER) && !defined(WIN32) && !defined(__SYMBIAN32__) && !defined(__ANDROID__)
#define REAL_WITH_MEMORY_TRACKING
#endif

View File

@ -28,7 +28,7 @@ Contributors:
#include <ws2tcpip.h>
#endif
#ifdef ANDROID
#ifdef __ANDROID__
#include <linux/in.h>
#include <linux/in6.h>
#include <sys/endian.h>

View File

@ -1,3 +1,5 @@
include ../config.mk
.PHONY: all install uninstall clean reallyclean
ifeq ($(WITH_TLS),yes)

1
src/linker-macosx.syms Normal file
View File

@ -0,0 +1 @@
mosquitto_log_printf

3
src/linker.syms Normal file
View File

@ -0,0 +1,3 @@
{
mosquitto_log_printf;
};

View File

@ -654,7 +654,7 @@ static int _retain_search(struct mosquitto_db *db, struct _mosquitto_subhier *su
if(branch->children){
_retain_search(db, branch, tokens, context, sub, sub_qos, level+1);
}
}else if(strcmp(branch->topic, "+") && (!strcmp(branch->topic, tokens->topic) || !strcmp(branch->topic, "+"))){
}else if(strcmp(branch->topic, "+") && (!strcmp(branch->topic, tokens->topic) || !strcmp(tokens->topic, "+"))){
if(tokens->next){
if(_retain_search(db, branch, tokens->next, context, sub, sub_qos, level+1) == -1
|| (!branch->next && tokens->next && !strcmp(tokens->next->topic, "#") && level>0)){

View File

@ -84,7 +84,7 @@ static void _sys_update_clients(struct mosquitto_db *db, char *buf)
}
}
#ifdef WITH_MEMORY_TRACKING
#ifdef REAL_WITH_MEMORY_TRACKING
static void _sys_update_memory(struct mosquitto_db *db, char *buf)
{
static unsigned long current_heap = -1;
@ -268,7 +268,7 @@ void mqtt3_db_sys_update(struct mosquitto_db *db, int interval, time_t start_tim
mqtt3_db_messages_easy_queue(db, NULL, "$SYS/broker/retained messages/count", 2, strlen(buf), buf, 1);
}
#ifdef WITH_MEMORY_TRACKING
#ifdef REAL_WITH_MEMORY_TRACKING
_sys_update_memory(db, buf);
#endif