9 Commits

Author SHA1 Message Date
Andrew Bettison
c8bf8a7733 Refactor JNI out of CLI and server main loop
The CLI and server main loop now have no conditional JNI code.  All JNI
code has been moved into separate source files, which #include the new
"jni_common.h" instead of <jni.h>.  The "cli.h" header no longer
includes <jni.h>, so the rest of the Serval source code is now
unaffected by JNI definitions.

The 'cf_limbo' global variable is now thread-local, so that each thread
has its own independent copy of the loaded configuration.  The JNI
server entry point now calls cf_init() once.  The new 'cf_initialised'
flag prevents clobbering the config state by redundant calls to
cf_init().

The CLI "stop" command now sends SIGHUP to the specific thread in which
the server is running.  This is achieved by writing the PID and TID
(Linux Thread ID) into the pidfile, separated by a space, on systems
that support the Linux gettid() and tgkill() system calls.  The server's
signal handler has been overhauled, and its logging improved.
2016-10-13 16:23:18 +10:30
Jeremy Lakeman
30b2c1ea3f Add helper class for formatting multipart mime 2016-10-10 15:55:27 +10:30
Jeremy Lakeman
baa50aaadb Get byte values from abstract id 2016-07-25 16:54:11 +09:30
Jeremy Lakeman
f6f1752437 Shortcut equals test when objects are the same instance 2014-03-27 13:32:15 +10:30
Jeremy Lakeman
f0ce85bd8d Throw an explicit error instead of a NullPointerException 2014-03-12 14:32:59 +10:30
Jeremy Lakeman
86e01cb87d Allow creation of unbound MDP socket for future command use 2014-02-24 17:16:21 +10:30
Jeremy Lakeman
46ef40cf23 Migrate and refactor more interfaces from batphone 2014-02-19 15:35:08 +10:30
Jeremy Lakeman
348fc5f23b Fix meshms conversations parsing when looking for a single SID 2014-02-12 15:08:24 +10:30
Jeremy Lakeman
99fb8b6108 Move jni interface classes from batphone repo 2014-02-12 13:09:17 +10:30