summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/tox_bootstrap_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/bootstrap_daemon/tox_bootstrap_daemon.c')
-rw-r--r--other/bootstrap_daemon/tox_bootstrap_daemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/other/bootstrap_daemon/tox_bootstrap_daemon.c b/other/bootstrap_daemon/tox_bootstrap_daemon.c
index 0d18d411..afe2b2ac 100644
--- a/other/bootstrap_daemon/tox_bootstrap_daemon.c
+++ b/other/bootstrap_daemon/tox_bootstrap_daemon.c
@@ -164,8 +164,8 @@ void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_ports, int
164 } 164 }
165 165
166 (*tcp_relay_ports)[*tcp_relay_port_count] = config_setting_get_int(elem); 166 (*tcp_relay_ports)[*tcp_relay_port_count] = config_setting_get_int(elem);
167 if ((*tcp_relay_ports)[i] < MIN_ALLOWED_PORT || (*tcp_relay_ports)[i] > MAX_ALLOWED_PORT) { 167 if ((*tcp_relay_ports)[*tcp_relay_port_count] < MIN_ALLOWED_PORT || (*tcp_relay_ports)[*tcp_relay_port_count] > MAX_ALLOWED_PORT) {
168 syslog(LOG_WARNING, "Port #%d: Invalid port: %u, should be in [%d, %d]. Skipping.\n", i, (*tcp_relay_ports)[i], MIN_ALLOWED_PORT, MAX_ALLOWED_PORT); 168 syslog(LOG_WARNING, "Port #%d: Invalid port: %u, should be in [%d, %d]. Skipping.\n", i, (*tcp_relay_ports)[*tcp_relay_port_count], MIN_ALLOWED_PORT, MAX_ALLOWED_PORT);
169 continue; 169 continue;
170 } 170 }
171 171
@@ -173,7 +173,7 @@ void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_ports, int
173 } 173 }
174 174
175 // the loop above skips invalid ports, so we adjust the allocated memory size 175 // the loop above skips invalid ports, so we adjust the allocated memory size
176 *tcp_relay_ports = realloc(*tcp_relay_ports, *tcp_relay_port_count * sizeof(uint16_t)); 176 *tcp_relay_ports = realloc(*tcp_relay_ports, (*tcp_relay_port_count) * sizeof(uint16_t));
177} 177}
178 178
179// Gets general config options 179// Gets general config options