Commit Graph

75 Commits

Author SHA1 Message Date
Jeremy Lakeman
545c05fddb Relay broadcast payloads via olsr plugin 2012-09-01 12:41:50 +09:30
Jeremy Lakeman
e05806f25e Separate routing calculation from resulting rules, refactor more code to use subscriber structure 2012-08-31 15:11:18 +09:30
Jeremy Lakeman
f6c899e107 Refactor overlay buffer interface to support simple parsing 2012-08-31 15:03:07 +09:30
Jeremy Lakeman
90cbf8df7e Add new subscriber storage 2012-08-31 15:03:06 +09:30
gardners
bae2e2e4c2 Updated non-Android build process to work again (sqlite3 include path fixed,
also improved so that sqlite3.c doesn't need to exist as a symlink to the
real file).
2012-08-27 17:03:50 +09:30
Andrew Bettison
27a0a6eeb5 Introduce struct __sourceloc
Replaces (const char *file, unsigned int line, const char *function) arguments
to all logging functions, simplifies malloc/free tracking code in
overlay_buffer.c and Rhizome manifest alloc/free tracking in rhizome_bundle.c.

Use __HERE__ macro instead of (__FILE__, __LINE__, __FUNCTION__) everywhere.

Special __NOWHERE__ macro is equivalent to (NULL, 0, NULL).

Declare net.c functions in new "net.h" header, so log.c doesn't have to pull
in the entire "serval.h" just to use write_str().

Facilitates progress on issue #2.
2012-08-23 12:31:07 +09:30
Daniel O'Connor
d77e5b7c62 Add strlcpy as it appears some systems (Ubuntu and probably Debian) don't have it.
This is a public domain version from http://cantrip.org/strlcpy.c
2012-08-13 18:24:19 +09:30
Daniel O'Connor
75889355fa Build static library version of libmonitorclient. 2012-08-10 14:36:46 +09:30
Jeremy Lakeman
7705676a9e Move str functions to c file to enable reuse 2012-08-09 13:30:52 +09:30
Daniel O'Connor
e3bef80965 Fix compilation of shared library on 64 bit ELF platforms (only tested on Linux so far) by using -fPIC. 2012-08-06 17:03:00 +09:30
Andrew Bettison
03da89225d Add xprintf() extensible stream formatter
Use it to replace open_memstream(3) in logServalPacket() -- not available on
Mac OS X
2012-08-03 16:44:05 +09:30
Andrew Bettison
2bd7c38483 Remove unused trans_cache.c 2012-07-31 18:12:20 +09:30
Daniel O'Connor
c241d3630c Move debug options to Makefile.dbg so we don't have to re-run configure.
Remove DO_TIMING_CHECK since it's no longer used
2012-07-29 14:55:10 +09:30
Daniel O'Connor
5e43c81214 Sort source files 2012-07-29 13:09:13 +09:30
Daniel O'Connor
3907eb3842 Use variables for source/object files. 2012-07-29 13:04:03 +09:30
gardners
93449d380e various fixes for libmonitorclient and commits made by others
inbetween. Hopefully I have captured all the changes.
2012-07-29 12:35:53 +09:30
Andrew Bettison
0dee99dec2 Remove old command-line support 2012-07-27 11:44:20 +09:30
Andrew Bettison
c7488de510 Add strbuf_helpers.[ch]
Functions to help assemble strbuf contents.
2012-07-11 14:11:59 +09:30
Andrew Bettison
86eb482ed9 Replace macros with functions
SET_NONBLOCKING(), SET_BLOCKING(), WRITE_STR() are now set_nonblock(),
set_block() and write_str() respectively, all of which log an error before
returning -1.  There are other useful methods: write_all() treats anything less
than all bytes written as an error; write_nonblock() treats EAGAIN and EINTR as
zero bytes written, and a combination: write_all_nonblock().
2012-07-10 16:33:39 +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
Jeremy Lakeman
89566e4d3d Refactor how functions are scheduled or file handes are watched 2012-07-02 13:19:54 +09:30
gardners
b40a468276 Merge branch 'eventscheduler'
Conflicts:
	monitor.c
	serval.h
2012-06-25 16:50:23 +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
gardners
5dc6d122a5 significant progress towards clean callback scheduler for poll()
events and timed callbacks.
2012-06-22 16:05:49 +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
Daniel O'Connor
8d30acedc8 Don't build libservald.so as it doesn't compile on 64 bit elf platforms and isn't used (it is only needed for JNI stuff on a phone)
While I'm here split out CFLAGS generation to make compiling without optimisation easier (for debugging)
2012-06-15 15:09:20 +09:30
Daniel O'Connor
b5581c9861 Remove generation of serval.c. It was only used (AFAIK) for the Asterisk plugin which can't/won't work at this stage. 2012-06-04 13:08:30 +09:30
Daniel O'Connor
bf2d1ca669 Supress unused-value warnings because WHY*() return -1 but this is commonly not used and clang warns about it. 2012-05-29 09:40:29 +09:30
Daniel O'Connor
dab549a22d Add clean target. 2012-05-21 13:53:34 +09:30
Andrew Bettison
345b2c1c4c Fix SEGV bug using new strbuf operations 2012-05-20 13:02:41 +09:30
Andrew Bettison
2f4d1eb720 "strbuf.h" API for assembling fixed-sized string buffers 2012-05-19 14:02:03 +09:30
Andrew Bettison
7087afc404 Refactor main() into main.c
Now dna.c only contains code for the old command line
2012-05-15 11:09:21 +09:30
Andrew Bettison
d11258cefc Overhaul debug flags
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.
2012-05-14 18:37:32 +09:30
gardners
7b82ccbd7b work on bypass-audio.
CALLSTATUS monitor message has gained a field, thus changing
API for java side.
2012-05-11 08:14:00 +09:30
Andrew Bettison
fe25f06129 Conditionally compile new ALSA sound code 2012-05-10 18:29:27 +09:30
Andrew Bettison
4f68a945ed Less verbosity from Makefile 2012-05-10 18:02:59 +09:30
gardners
8d2792ce74 substantial work towards playing audio on IDEOS/G1 type MSM chipset
android phones directly from C to dramatically reduce latency.
2012-05-10 03:47:18 +09:30
gardners
596b20b5e8 interactive servald monitor cli command implemented. 2012-05-08 14:41:21 +09:30
gardners
d637f31ab7 work towards stream unix domain socket to allow Android/Java
monitoring of call status and rhizome bundle arrivals.
2012-05-03 02:31:12 +09:30
gardners
2ab32197a7 Put new linux-specific interface listing routine in that is needed
for android, where the portable method isn't easily available.
2012-04-28 12:25:19 +09:30
Daniel O'Connor
4cb677b737 Fix codec2 detection & compilation now I tried compiling it.. 2012-04-23 20:40:34 +09:30
Daniel O'Connor
9a06c1c4bd Add configure fu to allow pa_phone.c to not be compiled. 2012-04-23 20:17:11 +09:30
Daniel O'Connor
258f2b98f0 Sort source & header files and make them one per line (tidy tidy!) 2012-04-23 17:03:07 +09:30
Daniel O'Connor
1d10ee7ba8 Merge branch 'master' of github.com:servalproject/serval-dna 2012-04-23 16:33:44 +09:30
Daniel O'Connor
ee72e69e29 Add PA setup and FIFO code (still not plumbed into the main program) 2012-04-23 16:32:47 +09:30
Andrew Bettison
87e072f172 Fix <jni.h> detection on Mac OS X 2012-04-23 15:29:26 +09:30
gardners
44e9449988 added beginnings of portaudio based phone interface for testing
VoMP.
2012-04-23 08:24:39 +09:30
gardners
788cef0201 sqlite3.o no longer depends on serval.h for faster recompiles
when changing serval.h
2012-04-20 17:14:04 +09:30
Andrew Bettison
36c7e492e8 Native build now supports JNI code on GNU/Linux
- ./configure detects if javac and JDK are present
- Makefile default target builds libservald.so
- probably doesn't work on Mac OS X (yet)
2012-04-20 16:57:36 +09:30