Andrew Bettison
735d9a42cc
Clean up compile warnings and fix bugs
...
In monitor_process_command() for "call" command, was not handling SID "*" case
properly, nor checking validity of hex SID.
2012-07-06 10:14:39 +09:30
Jeremy Lakeman
7b8e82baea
Refactor vomp call processing to reduce latency
2012-07-05 16:09:33 +09:30
Andrew Bettison
a80da50636
Finish rewriting configuration and logging code
...
Fix endless recursion if error or debug logged while reading config file
Fix 'config del' logic
Log messages made before log file can be opened are buffered and written
once the file is open
Do not log to file in ANDROID version, just to Android's log system
2012-07-05 14:59:50 +09:30
Andrew Bettison
ab64b08ceb
Rewrite config file code
...
Gets rid of rotor in confValueGet() and duplicate config file parsing code
Currently fails three tests
2012-07-04 18:57:02 +09:30
Andrew Bettison
68ef34c119
Add 'id allpeers' command to facilitate testing
2012-07-04 12:06:15 +09:30
Andrew Bettison
a90c0156ed
New DEBUG_MDPREQUESTS debug flag
...
Use it to instrument the MDP_GETADDRS request, to investigate cause of
test 'dnaprotocol' fixture failure
2012-07-04 10:32:38 +09:30
Andrew Bettison
72769e162b
Replace overlay_render_sid_prefix() with alloca_tohex()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-04 10:30:46 +09:30
Andrew Bettison
d72e4d20ea
Fix compiler warnings
2012-07-03 18:00:52 +09:30
Andrew Bettison
2c87039307
Replace overlay_render_sid() with alloca_tohex_sid()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-03 17:59:30 +09:30
Andrew Bettison
30d51f0314
Tighten up tests and code relating to peer discovery
2012-07-03 17:38:54 +09:30
gardners
02ca21a601
CHANGED DNA REPLY PACKET FORMAT BREAKING BACKWARDS COMPATIBILITY
...
... as part of working on work on DNA helper callout facility.
(DNA replies now contain a token that can be used to match them
against DNA requests as a happy side-effect).
2012-07-03 16:45:03 +09:30
Jeremy Lakeman
3d39e92628
Setup scheduled alarm per vomp call and send keep alives
2012-07-03 15:50:05 +09:30
Andrew Bettison
78a8aaca16
Code improvements while debugging 'dnaprotocol' tests
...
Use ssize_t and size_t where required by system calls
More stringent checking of errors from system calls
Log the offset when writing to dummy interface file
Clean up many WHY/INFO/DEBUG statements
Convert many fprintf(stderr,...) to DEBUGF()
2012-07-03 15:36:51 +09:30
Andrew Bettison
8020ea3b74
Merge branch 'eventscheduler' into master
...
Conflicts:
commandline.c
monitor.c
overlay.c
overlay_interface.c
overlay_packetformats.c
rhizome_fetch.c
rhizome_http.c
rhizome_packetformats.c
serval.h
server.c
testdefs.sh
testframework.sh
tests/dnaprotocol
tests/server
2012-07-03 10:26:22 +09:30
Jeremy Lakeman
132d3a6f9b
rename profiling structure
2012-07-02 16:04:00 +09:30
Jeremy Lakeman
e705696896
separate statistics gathering from the scheduler structure
2012-07-02 15:20:30 +09:30
Jeremy Lakeman
89566e4d3d
Refactor how functions are scheduled or file handes are watched
2012-07-02 13:19:54 +09:30
Andrew Bettison
fc8df7d5d4
Config options for tick duration
2012-07-02 12:26:01 +09:30
Andrew Bettison
b368a3aab4
Add confValueGetInt64() function
2012-06-28 18:19:36 +09:30
Andrew Bettison
b9836af8a2
Fix debug logging in overlay_interface.c
...
Also fix bug that closed the logfile when forking the server process.
2012-06-28 17:34:21 +09:30
Andrew Bettison
9625190c6a
Improve debug code:
...
Debug bit mask is unsigned int everywhere.
Refactor DEBUG() macros a bit.
Add SERVALD_DEBUG_FILE env var to support test scripts.
Test defs put instance directories under $TFWVAR not $TFWTMP.
2012-06-28 15:24:43 +09:30
Jeremy Lakeman
29cba17891
Fix rhizome transfers
2012-06-27 16:54: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
gardners
b40a468276
Merge branch 'eventscheduler'
...
Conflicts:
monitor.c
serval.h
2012-06-25 16:50:23 +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
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
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
d579693f3d
added stats generation and summarisation to take place of older
...
excessively chatty timing gathering.
2012-06-25 14:35:55 +09:30
Jeremy Lakeman
5dcf274bc1
Only allow 2 duplicate audio packets
2012-06-25 11:38:07 +09:30
Daniel O'Connor
8d7b0d259f
Add a compile time knob to disable timing checks (on by default now).
2012-06-22 20:40:29 +09:30
Andrew Bettison
a6ac6a4246
Improve servald logging
...
Use 'logfile' config entry, fall back to stderr if absent or can't be opened
Replace fprintf(stderr,...) with DEBUGF() in dump() and dumpResponses()
2012-06-22 17:19:14 +09:30
gardners
91bccec71d
various fixes related to event scheduler.
...
server main loop is now just fd_poll()
2012-06-22 16:05:50 +09:30
gardners
f0ed4b2e52
debugging and related improvements for new event scheduler.
2012-06-22 16:05:50 +09:30
gardners
5dc6d122a5
significant progress towards clean callback scheduler for poll()
...
events and timed callbacks.
2012-06-22 16:05:49 +09:30
Andrew Bettison
274e5c007c
Merge branch 'master' into andrew
...
Conflicts:
log.c
2012-06-22 11:18:48 +09:30
gardners
48a1d7e20f
MDP socket name can now be changed by config option mdp.socket.
...
DNA tests now passing again.
2012-06-21 16:36:37 +09:30
gardners
01712ab67e
monitor.socket config option added to allow multiple servald
...
instances on the same machine without conflicting abstract namespace
unix domain sockets for monitor interface.
2012-06-21 16:36:37 +09:30
gardners
374e4676a7
various simplifications of DNA reply generation and related code.
2012-06-21 16:36:37 +09:30
gardners
dceeed8d35
more work on dna helper interface.
...
Also added missing dna_helper.c file from previous changes.
moved sigpipe/sigio detection code to own file.
2012-06-21 16:35:28 +09:30
gardners
e5394dd143
added stubs for DNA lookup helper app (not yet complete).
...
cleaned up some unused variables.
2012-06-21 16:35:28 +09:30
gardners
6023cd4da2
moved timing check definitions to serval.h
2012-06-21 11:33:42 +09:30
Andrew Bettison
56cb12f507
Refactor rhizome db creation and execution functions
2012-06-12 18:12:36 +09:30
Andrew Bettison
b2ffc6e72c
Merge branch 'master' into andrew
2012-06-12 11:56:50 +09:30
Andrew Bettison
7be0d9d00d
Pass author SID parameters in binary, not hex
2012-06-08 18:32:14 +09:30
Andrew Bettison
637ef02f30
Add _selfsigned column to "rhizome list" output
...
Add <pin,pin...> arg1 to "rhizome list" command, so it can open the keyring
Some tests in tests/rhizome fail
2012-06-08 18:25:43 +09:30
Daniel O'Connor
86c5e6945f
Don't force signedness for name in overlay_interface_register().
...
I can't see any point to forcing the signedness, it causes warnings on platforms with a signed-char by default.
2012-06-08 17:01:50 +09:30
Daniel O'Connor
ea9993dc91
Fix detection on OSX and make detection smarter.
...
- Fix lsif() on OSX.
- Make lsif() smarter and avoid non-broadcast and no AF_INET addresses.
- Don't run multiple interface detectors, run one at a time until one works.
- Factor out HAVE_IFADDRS_H code into a separate function into lsif.c with the other interface detection routines.
- Prefer HAVE_IFADDRS_H (random bias..)
2012-06-08 16:36:33 +09:30
Andrew Bettison
7a71a521f8
Pass author SID parameters in binary, not hex
2012-06-08 15:27:15 +09:30