mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge branch 'master' of https://github.com/stqism/ToxCore
This commit is contained in:
commit
0444ca18df
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
|
|
||||||
#define DAEMON_NAME "tox-bootstrapd"
|
#define DAEMON_NAME "tox-bootstrapd"
|
||||||
#define DAEMON_VERSION_NUMBER 2014081600UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day
|
#define DAEMON_VERSION_NUMBER 2014101000UL // yyyymmmddvv format: yyyy year, mm month, dd day, vv version change count for that day
|
||||||
|
|
||||||
#define SLEEP_TIME_MILLISECONDS 30
|
#define SLEEP_TIME_MILLISECONDS 30
|
||||||
#define sleep usleep(1000*SLEEP_TIME_MILLISECONDS)
|
#define sleep usleep(1000*SLEEP_TIME_MILLISECONDS)
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
#define DEFAULT_PID_FILE_PATH "tox-bootstrapd.pid"
|
#define DEFAULT_PID_FILE_PATH "tox-bootstrapd.pid"
|
||||||
#define DEFAULT_KEYS_FILE_PATH "tox-bootstrapd.keys"
|
#define DEFAULT_KEYS_FILE_PATH "tox-bootstrapd.keys"
|
||||||
#define DEFAULT_PORT 33445
|
#define DEFAULT_PORT 33445
|
||||||
#define DEFAULT_ENABLE_IPV6 0 // 1 - true, 0 - false
|
#define DEFAULT_ENABLE_IPV6 1 // 1 - true, 0 - false
|
||||||
#define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false
|
#define DEFAULT_ENABLE_LAN_DISCOVERY 1 // 1 - true, 0 - false
|
||||||
#define DEFAULT_ENABLE_TCP_RELAY 1 // 1 - true, 0 - false
|
#define DEFAULT_ENABLE_TCP_RELAY 1 // 1 - true, 0 - false
|
||||||
#define DEFAULT_TCP_RELAY_PORTS 443, 3389, 33445 // comma-separated list of ports. make sure to adjust DEFAULT_TCP_RELAY_PORTS_COUNT accordingly
|
#define DEFAULT_TCP_RELAY_PORTS 443, 3389, 33445 // comma-separated list of ports. make sure to adjust DEFAULT_TCP_RELAY_PORTS_COUNT accordingly
|
||||||
|
@ -210,7 +210,9 @@ void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_ports, int
|
||||||
}
|
}
|
||||||
|
|
||||||
// the loop above skips invalid ports, so we adjust the allocated memory size
|
// the loop above skips invalid ports, so we adjust the allocated memory size
|
||||||
|
if ((*tcp_relay_port_count) * sizeof(uint16_t) > 0) {
|
||||||
*tcp_relay_ports = realloc(*tcp_relay_ports, (*tcp_relay_port_count) * sizeof(uint16_t));
|
*tcp_relay_ports = realloc(*tcp_relay_ports, (*tcp_relay_port_count) * sizeof(uint16_t));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets general config options
|
// Gets general config options
|
||||||
|
@ -616,7 +618,7 @@ int main(int argc, char *argv[])
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
|
|
||||||
if (pid > 0) {
|
if (pid > 0) {
|
||||||
fprintf(pidf, "%d ", pid);
|
fprintf(pidf, "%d", pid);
|
||||||
fclose(pidf);
|
fclose(pidf);
|
||||||
syslog(LOG_DEBUG, "Forked successfully: PID: %d.\n", pid);
|
syslog(LOG_DEBUG, "Forked successfully: PID: %d.\n", pid);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user