Commit Graph

2254 Commits

Author SHA1 Message Date
Jeremy Lakeman
73342a9659 Announce routes to secondary keyring entries 2013-04-08 10:03:51 +09:30
Andrew Bettison
2c379fadb1 Merge branch 'naf2-logging' into 'development'
Conflicts:
	commandline.c
	tests/rhizomeprotocol
2013-04-05 17:39:23 +10:30
Andrew Bettison
ec481e5f0f Rename config option 'log.stderr' to 'log.console'
Because Android <stdio.h> defines 'stderr' as a macro...
2013-04-05 16:55:14 +10:30
Andrew Bettison
f7fc63c452 Improve logging tests, fix failures, add 'log.file.path' config option 2013-04-05 16:23:20 +10:30
Andrew Bettison
f06613c35f Fix test failures from latest logging changes 2013-04-05 15:28:54 +10:30
Andrew Bettison
a822dca2fa Improve config schema macros and log options
Add STRUCT_ASSIGN macro to config schema

Document STRUCT_DEFAULT and STRUCT_ASSIGN in block comments

Move 'log.file_xxx' options to 'log.file.xxx'
2013-04-05 15:00:54 +10:30
Andrew Bettison
60551df890 Implement configurable log file rotation 2013-04-04 17:52:54 +10:30
Andrew Bettison
c11ec7e8bf Improve form_serval_instance_path() error message 2013-04-04 17:46:09 +10:30
Andrew Bettison
bc8c820bf3 New config schema representations: uint32_time_interval and ushort 2013-04-04 17:43:43 +10:30
Andrew Bettison
2077265b2d Add str_index(), str_rindex(), et al 2013-04-04 17:42:33 +10:30
Andrew Bettison
10e89c7438 Add strbuf_remaining()
Improve some comments in strbuf.h
2013-04-04 17:41:18 +10:30
Andrew Bettison
c6666387e8 Add strbuf_append_strftime() 2013-04-04 17:40:58 +10:30
Andrew Bettison
65f6e88e67 Add emkdirs() and emkdirsn() 2013-04-04 17:37:49 +10:30
Andrew Bettison
4be43b76d5 Remove CLIFLAG_NONOVERLAY and CLIFLAG_STANDALONE
Not used for anything
2013-04-02 17:49:56 +10:30
Andrew Bettison
21991726ae Add logging tests, add "log" command
Refactor log.c ready for log file rotation
2013-04-02 17:01:48 +10:30
Andrew Bettison
0f83b9a5fc Fix #60 - "rhizome direct" command line URL
Add test case for "rhizome push <url>" command
2013-04-02 14:54:46 +10:30
alexandrasclapari
c215b006a3 new function app_meshms_read_messagelog : read and display a messagelog file in hexa and ascii without parsing 2013-04-01 01:08:33 -07:00
alexandrasclapari
d05a3e2c45 Fixed the branch 2013-04-01 01:04:47 -07:00
Andrew Bettison
2d09ec545e Improve configuration dump to log
Refactor much of the new code in log.c

Add new functions: cf_load_strict() and cf_reload_strict() for use by the
server, which does not want to overwrite its in-memory config at all if there
is any defect in the config file.  However, commands always want to overwrite
the default in-memory config, even with a defective config file, so that
logging has a chance to succeed.

Added `log_format.dump_config` boolean config option
2013-03-29 00:22:08 +10:30
Andrew Bettison
ab162bbc99 Fix Makefile broken by recent version string changes 2013-03-28 15:37:19 +10:30
Andrew Bettison
bcfd032223 Replace logDebugFlags() with logCurrentConfig() 2013-03-27 17:23:31 +10:30
Andrew Bettison
95b0c028f2 Log to file, Android and stderr simultaneously
Indepent configuration of show_pid, show_time and log level for each
destination

Update test scripts for new config options

Include xprintf.c in MDP client source files (now used by log.c)
2013-03-27 16:17:38 +10:30
Andrew Bettison
a50594971c Fix comment in strbuf.h 2013-03-26 18:24:13 +10:30
Andrew Bettison
d3d6fa4547 Add log format config options for file and stderr
Upgrade configuration schema macros to allow optional "default label"
argument to SUB_STRUCT and VALUE_SUB_STRUCT elements.

New STRUCT_DEFAULT section declares alternative STRUCT default values
with a label.
2013-03-26 16:11:31 +10:30
Andrew Bettison
a88234ce9d Add optional filter args to 'help' command 2013-03-25 12:05:26 +10:30
Andrew Bettison
28a77abc18 Add XPRINT strbuf adapter 2013-03-25 12:02:48 +10:30
Andrew Bettison
74adb2038a Document 'config dump' command
Re-order the documentation sections and add more explanation
of how an invalid config file is handled.
2013-03-20 20:44:12 -07:00
Andrew Bettison
300ec986f1 Fix warnings from gcc 4.6.3 2013-03-18 16:48:15 +10:30
Andrew Bettison
7d312f51fb Fix broken Android build 2013-03-18 15:35:37 +10:30
Andrew Bettison
1cfedb19e4 Fix broken 'make directory_service' 2013-03-18 15:35:13 +10:30
Andrew Bettison
a5d3c16928 Move 'serverMode' flag from server.c to log.c
Because log.c and conf.c now depend on serverMode
2013-03-18 15:34:33 +10:30
Andrew Bettison
edd245fa81 Fix version_string.sh for older Git versions 2013-03-18 14:31:19 +10:30
gardners
3a0a4df216 add place-holder tests for adding channel labels to Rhizome. #58 2013-03-18 13:27:15 +10:30
Andrew Bettison
5dd6a53615 Fix 'rhizomeops' tests
Rename duplicate AddNoAuthor test to AddNoAuthorEncrypted

Fix broken AddNoAuthor test

Add new AddInvalidAuthor test
2013-03-15 15:58:17 +10:30
Andrew Bettison
da2c523bd6 Improve logging: version, date/time and debug flags
Also quieten start-up log messages for invoked commands, to reduce chatter
2013-03-12 19:18:30 +10:30
Andrew Bettison
b17f5a6f63 Servald version string from git describe 2013-03-12 14:03:33 +10:30
Andrew Bettison
1d1f7a37a4 Fix Solaris SIGBUS bug in MDP ping
Also fixed non-portable (endian dependent) code
2013-03-07 14:54:40 +10:30
Andrew Bettison
b7185a294f Fix keyring SEGV bug
Sometimes, when adding a PIN to a keyring (eg, when opening a keyring
file), a SEGV would be caused while trying to validate the MAC for an
entry which apparently had zero keypair entries.

Changed some keyring struct 'int' fields to 'unsigned int', to ensure
that comparison logic behaves as expected.

Refactored some keyring code for more clarity and code maintenance
safety.

Added TODO comment about keyring file format non-back-compatibility.
2013-03-07 14:27:33 +10:30
Andrew Bettison
4ea748c5e2 Remove unwanted DEBUG statement 2013-03-06 16:00:48 +10:30
Andrew Bettison
bc7c58ee3c Improve keyring test case 2013-03-06 15:29:27 +10:30
Andrew Bettison
1d5b57443b Some keyring refactoring and improvements 2013-03-06 15:28:57 +10:30
Andrew Bettison
91f11dc72a Improve more keyring error messages 2013-03-06 14:57:23 +10:30
Andrew Bettison
287701f128 Improve keyring error messages 2013-03-06 14:43:52 +10:30
Andrew Bettison
03f38d2031 Improve keyring debugging 2013-03-06 14:15:27 +10:30
Andrew Bettison
705f414a4d Fix SEGV bug in keyring_enter_pin()
The public and private key length fields were stored as 'int' not
'unsigned', so arithmetic for checking buffer overrun was not correct.
2013-03-06 14:02:33 +10:30
Andrew Bettison
226fcf3754 Improve test framework: fix some minor awk bugs 2013-03-06 13:08:10 +10:30
Andrew Bettison
157fe3f1d6 Fix Solaris SEGV bug: null pointer passed to sprintf() 2013-03-06 12:56:41 +10:30
Andrew Bettison
25e5acc68c Fix quoting typos 2013-03-05 17:19:23 -08:00
Andrew Bettison
6f3c2b99c9 Improve test framework: Solaris bug
The 'includeTests' function failed if /bin/bash was not available or not
the same as the Bash used to run the top test script.  This failed on
Solaris, where /usr/bin/bash is too old, and a privately-built Bash must
be used to run the test scripts.
2013-03-06 11:45:12 +10:30
Andrew Bettison
fdd3623352 Update INSTALL instructions
Instructions for Solaris

Use tests/all script to run all tests

Correct spelling of Erik's last name
2013-03-06 11:43:44 +10:30