diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/Makefile.inc | 6 | ||||
-rw-r--r-- | testing/nTox.c | 14 |
2 files changed, 8 insertions, 12 deletions
diff --git a/testing/Makefile.inc b/testing/Makefile.inc index b3912033..ab452a94 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc | |||
@@ -10,10 +10,12 @@ nTox_CFLAGS = $(LIBSODIUM_CFLAGS) \ | |||
10 | $(NCURSES_CFLAGS) | 10 | $(NCURSES_CFLAGS) |
11 | 11 | ||
12 | nTox_LDADD = $(LIBSODIUM_LDFLAGS) \ | 12 | nTox_LDADD = $(LIBSODIUM_LDFLAGS) \ |
13 | $(NAC_LDFLAGS) \ | 13 | $(NAC_LDFLAGS) \ |
14 | libtoxcore.la \ | 14 | libtoxcore.la \ |
15 | $(LIBSODIUM_LIBS) \ | 15 | $(LIBSODIUM_LIBS) \ |
16 | $(NACL_OBJECTS) \ | ||
16 | $(NACL_LIBS) \ | 17 | $(NACL_LIBS) \ |
18 | $(MATH_LDFLAGS) \ | ||
17 | $(NCURSES_LIBS) \ | 19 | $(NCURSES_LIBS) \ |
18 | $(WINSOCK2_LIBS) | 20 | $(WINSOCK2_LIBS) |
19 | endif | 21 | endif |
@@ -51,6 +53,7 @@ Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ | |||
51 | $(LIBSODIUM_LIBS) \ | 53 | $(LIBSODIUM_LIBS) \ |
52 | $(NACL_OBJECTS) \ | 54 | $(NACL_OBJECTS) \ |
53 | $(NACL_LIBS) \ | 55 | $(NACL_LIBS) \ |
56 | $(MATH_LDFLAGS) \ | ||
54 | $(WINSOCK2_LIBS) | 57 | $(WINSOCK2_LIBS) |
55 | 58 | ||
56 | 59 | ||
@@ -85,6 +88,7 @@ tox_sync_LDADD = $(LIBSODIUM_LDFLAGS) \ | |||
85 | $(LIBSODIUM_LIBS) \ | 88 | $(LIBSODIUM_LIBS) \ |
86 | $(NACL_OBJECTS) \ | 89 | $(NACL_OBJECTS) \ |
87 | $(NACL_LIBS) \ | 90 | $(NACL_LIBS) \ |
91 | $(MATH_LDFLAGS) \ | ||
88 | $(WINSOCK2_LIBS) | 92 | $(WINSOCK2_LIBS) |
89 | endif | 93 | endif |
90 | 94 | ||
diff --git a/testing/nTox.c b/testing/nTox.c index 7af3124d..83561716 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -542,6 +542,7 @@ void line_eval(Tox *m, char *line) | |||
542 | } else if (inpt_command == 'q') { //exit | 542 | } else if (inpt_command == 'q') { //exit |
543 | save_data(m); | 543 | save_data(m); |
544 | endwin(); | 544 | endwin(); |
545 | tox_kill(m); | ||
545 | exit(EXIT_SUCCESS); | 546 | exit(EXIT_SUCCESS); |
546 | } else if (inpt_command == 'c') { //set conversation partner | 547 | } else if (inpt_command == 'c') { //set conversation partner |
547 | if (line[2] == 'r') { | 548 | if (line[2] == 'r') { |
@@ -1274,17 +1275,8 @@ int main(int argc, char *argv[]) | |||
1274 | } | 1275 | } |
1275 | } | 1276 | } |
1276 | 1277 | ||
1277 | if (numfilesenders > 0) | 1278 | |
1278 | // during file transfer wasting cpu cycles is almost unavoidable | 1279 | c_sleep(tox_do_run_interval(m)); |
1279 | c_sleep(1); | ||
1280 | else { | ||
1281 | if (pollok && (tox_wait_prepare(m, data) == 1)) { | ||
1282 | /* 250ms is more than fast enough in "regular" mode */ | ||
1283 | tox_wait_execute(data, 0, 100000); | ||
1284 | tox_wait_cleanup(m, data); | ||
1285 | } else | ||
1286 | c_sleep(25); | ||
1287 | } | ||
1288 | 1280 | ||
1289 | send_filesenders(m); | 1281 | send_filesenders(m); |
1290 | tox_do(m); | 1282 | tox_do(m); |