Commit Graph

1457 Commits

Author SHA1 Message Date
Andrew Bettison
3e92eb6bb8 Improve test framework: --jobs uses terminfo for progress reporting 2012-06-28 10:54:04 +09:30
Andrew Bettison
db04f30b08 Ignore test log directory 2012-06-27 17:23:43 +09:30
Andrew Bettison
0928ade78a Fix test defs to cope with parallel execution 2012-06-27 17:23:13 +09:30
Andrew Bettison
c0c95bf6ac Improve test framework: --jobs (parallel test execution) 2012-06-27 17:22:37 +09:30
Jeremy Lakeman
29cba17891 Fix rhizome transfers 2012-06-27 16:54:42 +09:30
gardners
baf8543def added cache for positive and negative rhizome manifest signature
verifications to avoid repeating expensive lookups.
not perfect, and not tested.
2012-06-26 21:21:46 +09:30
Andrew Bettison
3822d067e7 Remove unnecessary double-fork from server start 2012-06-26 17:27:19 +09:30
gardners
aab400164f push manifest verification to as late as possible to avoid
unwarranted 400ms CPU hits for every manifest seen.
2012-06-26 16:54:40 +09:30
Andrew Bettison
d7828f9409 Improve test defs: stop_all_servald_servers
Only attempts an orderly stop if a pidfile is present
2012-06-26 16:44:34 +09:30
Andrew Bettison
c5024a0546 Improve test framework: --stop-on-error --stop-on-failure
Also an expanded usage message, provoked by the --help option as before
2012-06-26 16:34:42 +09:30
Andrew Bettison
f5a99238cb Add test case for server start while already running 2012-06-26 16:09:22 +09:30
Andrew Bettison
889f9c4628 Re-instate prior server start code
Do not use server_probe().
Use setsid() instead of setpgrp().
Still uses double-fork technique, as advised in setsid(2) man page.
Return exit status 10 if already running, instead of logging an error and exit
status 255.
2012-06-26 16:07:24 +09:30
gardners
e542b41746 instrumented various rhizome functions. 2012-06-26 16:03:34 +09:30
Andrew Bettison
4afdbe1b5e Add server start/stop tests 2012-06-26 15:52:37 +09:30
Andrew Bettison
6f7eef80f6 Improve test framework: tfw_log function 2012-06-26 15:51:38 +09:30
Andrew Bettison
19f7e32ba7 Re-instate prior server start code
Uses setsid() instead of setpgrp().
Still uses double-fork technique, as advised in setsid(2) man page.
Does not use server_probe().
2012-06-26 15:46:10 +09:30
Andrew Bettison
5b56e2b131 Add server start/stop tests 2012-06-26 15:46:10 +09:30
Andrew Bettison
ed2e095410 Improve test framework: tfw_log function 2012-06-26 15:46:10 +09:30
Jeremy Lakeman
06f724707d Use message length instead of string length for audio packets 2012-06-26 14:34:39 +09:30
Jeremy Lakeman
64559bdca9 Watch new monitor client connections 2012-06-26 12:20:49 +09:30
Jeremy Lakeman
0ca4c16f39 Refactor node info to ignore stale responses without sending another request 2012-06-26 11:20:00 +09:30
Andrew Bettison
981afb795e Overhaul rhizome HTTP server start code 2012-06-26 11:07:01 +09:30
gardners
83d1846154 suppress reporting stats for functions not called in most recent
reporting period.
2012-06-26 09:27:45 +09:30
gardners
c5d89a043d clean up debugging. 2012-06-26 09:25:42 +09:30
gardners
97cd8f5255 added code to time various servald functions and report periodic
statistics.  Handles nested calls to correctly aportion call time
among children.
2012-06-26 09:22:51 +09:30
Andrew Bettison
3d0038754b Add HTTP port number to rhizome advertise packet 2012-06-25 18:03:00 +09:30
gardners
fb7397a51b make sure we really tell monitor clients when a call has died. 2012-06-25 17:10:29 +09:30
Andrew Bettison
4764cf2ace Get rid of fprintf(stderr,...) in overlay_packetformats.c 2012-06-25 17:04:03 +09:30
gardners
b40a468276 Merge branch 'eventscheduler'
Conflicts:
	monitor.c
	serval.h
2012-06-25 16:50:23 +09:30
Andrew Bettison
5c819fce7e Get rid of fprintf(stderr,...) in overlay.c
Replace with calls to DEBUGF() etc.
2012-06-25 16:32:52 +09:30
Andrew Bettison
5cff81e0c0 Add strbuf_reset() 2012-06-25 16:32:52 +09:30
Daniel O'Connor
8e0ba3f168 Tidyup various things (signal hander, use WRITE_STR, staticise stuff) 2012-06-25 16:24:34 +09:30
Daniel O'Connor
271454aee3 Use WRITE_STR instead of writeLine.
staticise a bunch of variables & functions in monitor-cli.c
2012-06-25 16:24:33 +09:30
Daniel O'Connor
930280a17d Move signal handler setup to main so it's only done once. 2012-06-25 16:24:33 +09:30
gardners
9565f0885f adjust debug output. 2012-06-25 15:46:54 +09:30
gardners
1897aa2eef only handle one packet per call to help stats gathering and fairness. 2012-06-25 15:46:34 +09:30
Andrew Bettison
6a941cbc4d Convert two #warnings to //TODO comments 2012-06-25 15:46:22 +09:30
Andrew Bettison
c335310b45 Remove more obsolete and unused code 2012-06-25 15:40:35 +09:30
Andrew Bettison
67e2e98867 Expunge old DNA protocol code (cleans up warnings) 2012-06-25 15:37:11 +09:30
Andrew Bettison
1fbf957a9d Clean up compiler warnings in commandline.c 2012-06-25 15:06:35 +09:30
Andrew Bettison
a960ed4e8a Clean up compiler warning in monitor.c 2012-06-25 15:00:07 +09:30
Andrew Bettison
208b9c15fd Factor out rhizome_hex_to_bytes() and chartonybl() 2012-06-25 14:51:21 +09:30
gardners
0c0e5b73e9 reduced debugging output. 2012-06-25 14:46:55 +09:30
gardners
d579693f3d added stats generation and summarisation to take place of older
excessively chatty timing gathering.
2012-06-25 14:35:55 +09:30
Daniel O'Connor
05d8ac5d05 Don't treat the server already running as an error otherwise the Java code complains.
Emit a useful error if we couldn't get the PID.
2012-06-25 14:14:33 +09:30
Daniel O'Connor
8ad51554b4 Use the right variable to display the PID. 2012-06-25 14:11:16 +09:30
Daniel O'Connor
b0dad81b0c Don't call daemon as the parent can't exit in JNI otherwise bad things will happen.
Copy the code for daemon from FreeBSD 8.x instead of the flying circus that was there before.
2012-06-25 14:01:50 +09:30
Daniel O'Connor
3a606b7d91 Check the socket isn't too long before copying it to prevent a seg fault. 2012-06-25 14:01:50 +09:30
Daniel O'Connor
80b972c455 The number of clients we have is not a warning. 2012-06-25 14:01:50 +09:30
Jeremy Lakeman
5dcf274bc1 Only allow 2 duplicate audio packets 2012-06-25 11:38:07 +09:30