Objective is to avoid having to call system("servald rhizome import ...") to
handle a Rhizome direct POST /rhizome/bundle request. Antiquated code in and
around rhizome_import_bundle() needs much cleaning up, as indicated by some
TODO comments. Invocations must unnecessarily write the manifest into a file,
when they already have it in memory, ready to pass to the function.
All the 'rhizomeops' tests pass, but two 'rhizomeprotocol' tests are broken
by the changes in this commit.
Handle failure cases properly. The HttpImport test now fails because the
"servald" executable is not found by the system(3) call -- need to give the
full path name, or avoid the use of system(3) altogether.
Replace "..." quoting with `...` quoting in output, to avoid slosh-escaping the
common double-quote character (") in log output.
Introduce alloca_str_toprint() function that produces an entire null-terminated
string in printable form.
Change various toprint strbuf helper functions to take two optional quote chars
instead of one mandatory.
If we receive a large buffer of audio, we want to stuff the packet with multiple frames and send them together.
And we want to send redundant copies of the audio to help recover from packet loss.
But if all our redundant copies end up in the same packet, we're screwed anyway.
This is a temporary hack until the network layer implements NACK / retry for resilient multi-hop delivery
Explicitly create identities in 'dnaprotocol' fixtures because
start_servald_instances() no longer does it.
The create_single_identity() function was not setting NAMEA, NAMEB, etc. when
they contained a space, because of shell misquoting.
(cherry picked from commit 9d8707a0ad)
Cherry picked from commit 87133cb2de, conflicts
in tests/rhizomeprotocol resolved by hand: bundle_received_by() now takes two
args before list of instances.
The 'rhizomeprotocol' tests now use create_single_identity() in fixtures (which
tests the 'keyring list' command).
Use foreach_instance() function in various places, and replace functions that
used to loop over instances with functions that work on the current instance.
Cherry picked from commit e994626429, conflicts
in testdefs.sh resolved manually (start_servald_instances() sets DUMMYx
variable).
Move create_rhizome_identities() from testdefs_rhizome.sh to
create_identities() in testdefs.sh
Rename create_identity() in testdefs.sh to create_single_identity(), uses
create_identities() to do its work.
All test cases pass on Solaris (see issue #16) except the 'jni' tests because
there is no Java compiler available on Solaris, and the new 'rhizomeprotocol'
tests from the rhizomedirect branch, which have always failed.
Replace explicit inline binary data from HttpImport test, so that Git stops
thinking the shell script is a binary file.
Put curl(1) detection into common fixture function.