13
13
#define ABORT_ON_LOG_ERROR true
14
14
#endif
15
15
16
+ #ifndef USE_IPV6
17
+ #define USE_IPV6 1
18
+ #endif
19
+
16
20
Run_Auto_Options default_run_auto_options (void )
17
21
{
18
22
return (Run_Auto_Options ) {
@@ -193,6 +197,7 @@ void reload(AutoTox *autotox)
193
197
194
198
struct Tox_Options * const options = tox_options_new (nullptr );
195
199
ck_assert (options != nullptr );
200
+ tox_options_set_ipv6_enabled (options , USE_IPV6 );
196
201
tox_options_set_savedata_type (options , TOX_SAVEDATA_TYPE_TOX_SAVE );
197
202
tox_options_set_savedata_data (options , autotox -> save_state , autotox -> save_size );
198
203
autotox -> tox = tox_new_log (options , nullptr , & autotox -> index );
@@ -214,6 +219,8 @@ static void initialise_autotox(struct Tox_Options *options, AutoTox *autotox, ui
214
219
struct Tox_Options * default_opts = tox_options_new (nullptr );
215
220
ck_assert (default_opts != nullptr );
216
221
222
+ tox_options_set_ipv6_enabled (default_opts , USE_IPV6 );
223
+
217
224
if (options == nullptr ) {
218
225
options = default_opts ;
219
226
}
@@ -426,6 +433,7 @@ Tox *tox_new_log_lan(struct Tox_Options *options, Tox_Err_New *err, void *log_us
426
433
427
434
assert (log_options != nullptr );
428
435
436
+ tox_options_set_ipv6_enabled (log_options , USE_IPV6 );
429
437
tox_options_set_local_discovery_enabled (log_options , lan_discovery );
430
438
// Use a higher start port for non-LAN-discovery tests so it's more likely for the LAN discovery
431
439
// test to get the default port 33445.
0 commit comments