Merge remote-tracking branch 'refs/remotes/origin/fixes'

Conflicts:
	ChangeLog.txt
This commit is contained in:
Roger A. Light 2019-04-17 17:51:34 +01:00
commit 449103e960
3 changed files with 14 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Broker features:
- Add support for Automotive DLT logging.
- Add TLS Engine support.
- Persistence file read/write performance improvements.
- General performance improvements.
- Add max_keepalive option, to allow a maximum keepalive value to be set for
MQTT v5 clients only.
- Add `bind_interface` option which allows a listener to be bound to a
@ -53,8 +54,12 @@ Client features:
- Drop support for TLS v1.0.
Broker fixes:
- Improve error reporting when creating listeners.
- Fix build on SmartOS due to missing IPV6_V6ONLY. Closes #1212.
Client library fixes
- Add missing `mosquitto_userdata()` function.
Client fixes:
- mosquitto_pub wouldn't always publish all messages when using `-l` and
QoS>0. This has been fixed.

View File

@ -471,3 +471,7 @@ void mosquitto_user_data_set(struct mosquitto *mosq, void *userdata)
}
}
void *mosquitto_userdata(struct mosquitto *mosq)
{
return mosq->userdata;
}

View File

@ -439,7 +439,11 @@ int net__socket_listen(struct mosquitto__listener *listener)
hints.ai_flags = AI_PASSIVE;
hints.ai_socktype = SOCK_STREAM;
if(getaddrinfo(listener->host, service, &hints, &ainfo)) return INVALID_SOCKET;
rc = getaddrinfo(listener->host, service, &hints, &ainfo);
if (rc){
log__printf(NULL, MOSQ_LOG_ERR, "Error creating listener: %s.", gai_strerror(rc));
return INVALID_SOCKET;
}
listener->sock_count = 0;
listener->socks = NULL;