summaryrefslogtreecommitdiff
path: root/app-misc/mosquitto/files/mosquitto-1.5-fix-socket_get_address.patch
blob: 7e9778e8b70f07714cc9d4bb748179543964800c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Fix missing rename of mosquitto__socket_get_address. Mosquitto bug 810.

diff --git a/src/conf.c b/src/conf.c
index f3d812d..daf2bf4 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -735,8 +735,8 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, struct
 	struct mosquitto__listener *cur_listener = &config->default_listener;
 #ifdef WITH_BRIDGE
 	char *address;
-	int i;
 #endif
+	int i;
 	int lineno_ext;
 	struct mosquitto__security_options *cur_security_options = NULL;
 
diff --git a/src/net.c b/src/net.c
index 7397de5..670b7e2 100644
--- a/src/net.c
+++ b/src/net.c
@@ -114,7 +114,7 @@ int net__socket_accept(struct mosquitto_db *db, mosq_sock_t listensock)
 	fromhost(&wrap_req);
 	if(!hosts_access(&wrap_req)){
 		/* Access is denied */
-		if(!mosquitto__socket_get_address(new_sock, address, 1024)){
+		if(!net__socket_get_address(new_sock, address, 1024)){
 			log__printf(NULL, MOSQ_LOG_NOTICE, "Client connection from %s denied access by tcpd.", address);
 		}
 		COMPAT_CLOSE(new_sock);