diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2014-01-19 13:55:15 -0500 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2014-01-19 14:14:25 -0500 |
commit | bffc3d96e5a9c08d8457737cfd2cb2cb54c35670 (patch) | |
tree | 5df58f2b305392ec23b0a60897287de8da4b3134 /other/bootstrap_serverdaemon | |
parent | 885e5898c56fd73d8800ec44373a57e23e3da5bb (diff) |
Spellchecked everything
Diffstat (limited to 'other/bootstrap_serverdaemon')
-rw-r--r-- | other/bootstrap_serverdaemon/README.md | 4 | ||||
-rw-r--r-- | other/bootstrap_serverdaemon/conf | 2 | ||||
-rw-r--r-- | other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c | 10 |
3 files changed, 9 insertions, 7 deletions
diff --git a/other/bootstrap_serverdaemon/README.md b/other/bootstrap_serverdaemon/README.md index 1075fe10..0c423675 100644 --- a/other/bootstrap_serverdaemon/README.md +++ b/other/bootstrap_serverdaemon/README.md | |||
@@ -56,6 +56,6 @@ grep "tox_dht_bootstrap_server_daemon" /var/log/syslog | |||
56 | 56 | ||
57 | 3. Make sure that `PIDFILE` from `/etc/init.d/tox_dht_bootstrap_server_daemon` matches with the `pid_file_path` from `conf` | 57 | 3. Make sure that `PIDFILE` from `/etc/init.d/tox_dht_bootstrap_server_daemon` matches with the `pid_file_path` from `conf` |
58 | 58 | ||
59 | 4. Make sure you have write premmision to keys and pid files | 59 | 4. Make sure you have write permission to keys and pid files |
60 | 60 | ||
61 | 5. Make sure you have read premission to config file \ No newline at end of file | 61 | 5. Make sure you have read permission for config file \ No newline at end of file |
diff --git a/other/bootstrap_serverdaemon/conf b/other/bootstrap_serverdaemon/conf index a98f1a5c..70dbdb14 100644 --- a/other/bootstrap_serverdaemon/conf +++ b/other/bootstrap_serverdaemon/conf | |||
@@ -4,7 +4,7 @@ | |||
4 | port = 33445 | 4 | port = 33445 |
5 | 5 | ||
6 | // The key file is like a password, so keep it where no one can read it | 6 | // The key file is like a password, so keep it where no one can read it |
7 | // The daemon should have premission to read/write to it | 7 | // The daemon should have permission to read/write to it |
8 | // Remember to replace the provided example with | 8 | // Remember to replace the provided example with |
9 | // your own path | 9 | // your own path |
10 | keys_file_path = "/home/tom/.tox_dht_bootstrap_server_daemon/keys" | 10 | keys_file_path = "/home/tom/.tox_dht_bootstrap_server_daemon/keys" |
diff --git a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c b/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c index 48ecbcfb..134346a1 100644 --- a/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c +++ b/other/bootstrap_serverdaemon/tox_dht_bootstrap_server_daemon.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* tox_dht_bootstrap_server_daemon | 1 | /* tox_dht_bootstrap_server_daemon |
2 | * | 2 | * |
3 | * A simple DHT boostrap server for tox - daemon edition. | 3 | * A simple DHT bootstrap server for tox - daemon edition. |
4 | * | 4 | * |
5 | * Copyright (C) 2014 Tox project All Rights Reserved. | 5 | * Copyright (C) 2014 Tox project All Rights Reserved. |
6 | * | 6 | * |
@@ -83,7 +83,9 @@ int manage_keys(DHT *dht, char *keys_file_path) | |||
83 | 83 | ||
84 | keys_file = fopen(keys_file_path, "w"); | 84 | keys_file = fopen(keys_file_path, "w"); |
85 | 85 | ||
86 | if (fwrite(keys, sizeof(uint8_t), KEYS_SIZE, keys_file) != KEYS_SIZE) { | 86 | size_t write_size = fwrite(keys, sizeof(uint8_t), KEYS_SIZE, keys_file); |
87 | |||
88 | if (write_size != KEYS_SIZE) { | ||
87 | return 0; | 89 | return 0; |
88 | } | 90 | } |
89 | } | 91 | } |
@@ -95,7 +97,7 @@ int manage_keys(DHT *dht, char *keys_file_path) | |||
95 | 97 | ||
96 | // Gets general config options | 98 | // Gets general config options |
97 | // | 99 | // |
98 | // Important: you are responsibl for freeing `pid_file_path` and `keys_file_path` | 100 | // Important: you are responsible for freeing `pid_file_path` and `keys_file_path` |
99 | // | 101 | // |
100 | // returns 1 on success | 102 | // returns 1 on success |
101 | // 0 on failure, doesn't modify any data pointed by arguments | 103 | // 0 on failure, doesn't modify any data pointed by arguments |
@@ -181,7 +183,7 @@ int get_general_config(char *cfg_file_path, char **pid_file_path, char **keys_fi | |||
181 | // Bootstraps servers listed in the config file | 183 | // Bootstraps servers listed in the config file |
182 | // | 184 | // |
183 | // returns 1 on success | 185 | // returns 1 on success |
184 | // 0 on failure, either no or only some servers were bootstraped | 186 | // 0 on failure, either no or only some servers were bootstrapped |
185 | 187 | ||
186 | int bootstrap_from_config(char *cfg_file_path, DHT *dht, int enable_ipv6) | 188 | int bootstrap_from_config(char *cfg_file_path, DHT *dht, int enable_ipv6) |
187 | { | 189 | { |