mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #690 from nurupo/dht_bootstrap_daemon
Fixed function conflict
This commit is contained in:
commit
01c3c1be72
|
@ -23,5 +23,5 @@ endif
|
|||
|
||||
EXTRA_DIST += \
|
||||
$(top_srcdir)/other/bootstrap_serverdaemon/conf \
|
||||
$(top_srcdir)/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon
|
||||
$(top_srcdir)/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.sh
|
||||
|
|
@ -2,17 +2,18 @@
|
|||
|
||||
The following commands are to be executed as root:
|
||||
|
||||
1. In `tox_dht_bootstrap_server_daemon` file change:
|
||||
1. In `tox_dht_bootstrap_server_daemon.sh` file change:
|
||||
- `CFG` to where your config file (`conf`) will be; read rights required
|
||||
- `DAEMON` to point to the executable
|
||||
- `PIDFILE` to point to a pid file daemon would have rights to create
|
||||
|
||||
2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_dht_bootstrap_server_daemon`
|
||||
2. Go over everything in `conf`. Make sure `pid_file_path` matches `PIDFILE` from `tox_dht_bootstrap_server_daemon.sh`
|
||||
|
||||
3. Execute:
|
||||
```
|
||||
mv tox_dht_bootstrap_server_daemon /etc/init.d/tox_dht_bootstrap_server_daemon
|
||||
mv tox_dht_bootstrap_server_daemon.sh /etc/init.d/tox_dht_bootstrap_server_daemon
|
||||
```
|
||||
*(note that we removed `.sh` ending)*
|
||||
|
||||
4. Give the right permissions to this file:
|
||||
```
|
||||
|
|
|
@ -273,7 +273,7 @@ next:
|
|||
// returns 1 on success
|
||||
// 0 on failure
|
||||
|
||||
int is_connected(DHT *dht, int port, int enable_lan_discovery)
|
||||
int try_connect(DHT *dht, int port, int enable_lan_discovery)
|
||||
{
|
||||
uint16_t htons_port = htons(port);
|
||||
|
||||
|
@ -382,7 +382,7 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (is_connected(dht, port, enable_lan_discovery)) {
|
||||
if (try_connect(dht, port, enable_lan_discovery)) {
|
||||
syslog(LOG_INFO, "Successfully connected to DHT\n");
|
||||
} else {
|
||||
syslog(LOG_ERR, "Couldn't connect to the DHT. Check settings and network connections. Exiting.\n");
|
||||
|
|
Loading…
Reference in New Issue
Block a user