Replace with WHY() or WHYF() everywhere
Improve logMessage() to handle file/line/function printing internally
Mainly so that log messages from manifest alloc/free in rhizome_bundle.c
can make it into the Android log
Was calling exit() instead of returning -1 on error, which was causing
the serval app to exit in the JNI "start" command if rhizome could not
create its db file.
Use DEBUGF() instead of fprintf(stderr) in many places.
confValueGet() was not stripping \r\n off end of returned string.
rhizome_set_datastore_path() was keeping the pointer it was given (from
conValueGet()'s rotor) instead of making a strdup() copy.
Config debug flags are now represented as individual items, eg:
servald config set debug.verbose yes
servald config set debug.rhizome yes
instead of aggregated, eg:
servald config set debug verbose,rhizome <-- no longer works
Added a debug flag "debug.all" that can be set and cleared, over which
individual flag sets/clears take priority.
Slimmed down dna.c by moving some globals and functions to the files where they
are used.
Default command line (help message) is now the new style, not the deprecated
style.
Create datastore directory and all parent dirs if it does not exist
More robust error checking and buffer overflow protection
New mkdirs() and mkdirsn() functions
Replace 'WHYRETNULL();' statements with 'return WHYNULL();'
Introduce DEBUG(), DEBUGF(), DEBUG_perror() and D macros
Add logMessage() and vlogMessage() functions
Implement setReason() using vlogMessage()
Rename pidfile 'serval.pid' to 'servald.pid'
Rename stopfile 'doshutdown' to 'servald.stop'
Reinstate checking of stopfile on signals and in main loops
Correct delay loops in 'start' and 'stop' commands
Move some code from commandline.c to server.c
Now correctly probes for server process existence using kill(pid, 0)
Status command does not dump config (use "config get" instead)
Output uses JNI cli output fields
Stop command uses 5 Hz wakeup, not busy wait while server exits
- argv is (const char *const *) everywhere, to avoid having to strdup() all the
Java arg strings
- changed (char*) to (const char*) in lots of places to fix cascading compiler
warnings as a result of argv constness
- fixed a bug in "config get" command when used without 'variable' arg
- adding a bundle using an existing manifest with an incorrect payload should
fail with an error
- adding a bundle using an existing manifest to update the payload to a new
version should succeed
- improve format of "dna rhizome list" output to one bundle per line
delete server socket if you are a client). Also added main MDP
ping loop of sending packets. Reading returned packets not yet
implemented. Server handling of MDP_TX packets also not yet
implemented.
Wrote function to store file to db iff it is not stored already,
and update the priority flag on the stored file.
Uses blobio to progressively load large blobs to make it friendly
on small memory systems.