Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/fixes'
Browse files Browse the repository at this point in the history
Conflicts:
	ChangeLog.txt
  • Loading branch information
ralight committed Apr 17, 2019
2 parents 56757df + a29238f commit 449103e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions lib/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,7 @@ void mosquitto_user_data_set(struct mosquitto *mosq, void *userdata)
}
}

void *mosquitto_userdata(struct mosquitto *mosq)
{
return mosq->userdata;
}
6 changes: 5 additions & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

2 comments on commit 449103e

@dorigom
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compile error then WITH_TLS=no
net.c: In function ‘net__socket_listen’:
net.c:442:2: error: ‘rc’ undeclared (first use in this function)

@ralight
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1.6.2. Is non-TLS particularly important to you?

Please sign in to comment.