mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-05 22:14:51 +02:00
Build fixes
This commit is contained in:
parent
4e731d2ac7
commit
b5c77f264f
|
|
@ -297,10 +297,13 @@ int net__try_connect_step1(struct mosquitto *mosq, const char *host)
|
|||
int s;
|
||||
void *sevp = NULL;
|
||||
struct addrinfo *hints;
|
||||
struct addrinfo *ar_request;
|
||||
|
||||
if(mosq->adns){
|
||||
gai_cancel(mosq->adns);
|
||||
mosquitto__FREE((struct addrinfo *)mosq->adns->ar_request);
|
||||
|
||||
ar_request = (struct addrinfo *)mosq->adns->ar_request;
|
||||
mosquitto__FREE(ar_request);
|
||||
mosquitto__FREE(mosq->adns);
|
||||
}
|
||||
mosq->adns = mosquitto__calloc(1, sizeof(struct gaicb));
|
||||
|
|
@ -324,7 +327,8 @@ int net__try_connect_step1(struct mosquitto *mosq, const char *host)
|
|||
if(s){
|
||||
errno = s;
|
||||
if(mosq->adns){
|
||||
mosquitto__FREE((struct addrinfo *)mosq->adns->ar_request);
|
||||
ar_request = (struct addrinfo *)mosq->adns->ar_request;
|
||||
mosquitto__FREE(ar_request);
|
||||
mosquitto__FREE(mosq->adns);
|
||||
}
|
||||
return MOSQ_ERR_EAI;
|
||||
|
|
@ -337,6 +341,7 @@ int net__try_connect_step1(struct mosquitto *mosq, const char *host)
|
|||
int net__try_connect_step2(struct mosquitto *mosq, uint16_t port, mosq_sock_t *sock)
|
||||
{
|
||||
struct addrinfo *ainfo, *rp;
|
||||
struct addrinfo *ar_request;
|
||||
int rc;
|
||||
|
||||
ainfo = mosq->adns->ar_result;
|
||||
|
|
@ -382,7 +387,8 @@ int net__try_connect_step2(struct mosquitto *mosq, uint16_t port, mosq_sock_t *s
|
|||
freeaddrinfo(mosq->adns->ar_result);
|
||||
mosq->adns->ar_result = NULL;
|
||||
|
||||
mosquitto__FREE((struct addrinfo *)mosq->adns->ar_request);
|
||||
ar_request = (struct addrinfo *)mosq->adns->ar_request;
|
||||
mosquitto__FREE(ar_request);
|
||||
mosquitto__FREE(mosq->adns);
|
||||
|
||||
if(!rp){
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ Contributors:
|
|||
#include "config.h"
|
||||
|
||||
#if defined(WITH_WEBSOCKETS) && WITH_WEBSOCKETS == WS_IS_BUILTIN
|
||||
#ifndef WITH_TLS
|
||||
# error "Builtin websockets support requires WITH_TLS=yes and openssl to be available"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
|
|
|||
|
|
@ -228,7 +228,6 @@ static int bridge__connect_step1(struct mosquitto *context)
|
|||
size_t notification_topic_len;
|
||||
uint8_t notification_payload;
|
||||
struct mosquitto__bridge_topic *cur_topic;
|
||||
int i;
|
||||
uint8_t qos;
|
||||
|
||||
if(!context || !context->bridge) return MOSQ_ERR_INVAL;
|
||||
|
|
|
|||
|
|
@ -569,7 +569,9 @@ int config__parse_args(struct mosquitto__config *config, int argc, char *argv[])
|
|||
|
||||
static void config__copy(struct mosquitto__config *src, struct mosquitto__config *dest)
|
||||
{
|
||||
#ifdef WITH_BRIDGE
|
||||
int i;
|
||||
#endif
|
||||
|
||||
mosquitto__FREE(dest->security_options.acl_file);
|
||||
dest->security_options.acl_file = src->security_options.acl_file;
|
||||
|
|
|
|||
|
|
@ -164,7 +164,8 @@ void context__cleanup(struct mosquitto *context, bool force_free)
|
|||
#if defined(WITH_BROKER) && defined(__GLIBC__) && defined(WITH_ADNS)
|
||||
if(context->adns){
|
||||
gai_cancel(context->adns);
|
||||
mosquitto__FREE((struct addrinfo *)context->adns->ar_request);
|
||||
struct addrinfo *ar_request = (struct addrinfo *)context->adns->ar_request;
|
||||
mosquitto__FREE(ar_request);
|
||||
mosquitto__FREE(context->adns);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -180,9 +180,6 @@ int mux_poll__handle(struct mosquitto__listener_sock *listensock, int listensock
|
|||
struct mosquitto *context;
|
||||
int i;
|
||||
int fdcount;
|
||||
#ifndef WIN32
|
||||
sigset_t origsig;
|
||||
#endif
|
||||
int timeout;
|
||||
|
||||
#ifdef WITH_WEBSOCKETS
|
||||
|
|
|
|||
Loading…
Reference in a new issue