2985 Commits

Author SHA1 Message Date
Andrew Bettison
6a941cbc4d Convert two #warnings to //TODO comments 2012-06-25 15:46:22 +09:30
Andrew Bettison
c335310b45 Remove more obsolete and unused code 2012-06-25 15:40:35 +09:30
Andrew Bettison
67e2e98867 Expunge old DNA protocol code (cleans up warnings) 2012-06-25 15:37:11 +09:30
Andrew Bettison
1fbf957a9d Clean up compiler warnings in commandline.c 2012-06-25 15:06:35 +09:30
Andrew Bettison
a960ed4e8a Clean up compiler warning in monitor.c 2012-06-25 15:00:07 +09:30
Andrew Bettison
208b9c15fd Factor out rhizome_hex_to_bytes() and chartonybl() 2012-06-25 14:51:21 +09:30
gardners
0c0e5b73e9 reduced debugging output. 2012-06-25 14:46:55 +09:30
gardners
d579693f3d added stats generation and summarisation to take place of older
excessively chatty timing gathering.
2012-06-25 14:35:55 +09:30
Daniel O'Connor
05d8ac5d05 Don't treat the server already running as an error otherwise the Java code complains.
Emit a useful error if we couldn't get the PID.
2012-06-25 14:14:33 +09:30
Daniel O'Connor
8ad51554b4 Use the right variable to display the PID. 2012-06-25 14:11:16 +09:30
Daniel O'Connor
b0dad81b0c Don't call daemon as the parent can't exit in JNI otherwise bad things will happen.
Copy the code for daemon from FreeBSD 8.x instead of the flying circus that was there before.
2012-06-25 14:01:50 +09:30
Daniel O'Connor
3a606b7d91 Check the socket isn't too long before copying it to prevent a seg fault. 2012-06-25 14:01:50 +09:30
Daniel O'Connor
80b972c455 The number of clients we have is not a warning. 2012-06-25 14:01:50 +09:30
Jeremy Lakeman
5dcf274bc1 Only allow 2 duplicate audio packets 2012-06-25 11:38:07 +09:30
Daniel O'Connor
15eb6c5705 Convert printf/fprintf to INFOF/WHYF 2012-06-24 17:32:47 +09:30
Daniel O'Connor
04986bf493 Comment out & convert a printf to INFOF. 2012-06-24 17:27:50 +09:30
Daniel O'Connor
fbc0a9b0b0 Whitespace 2012-06-24 17:22:26 +09:30
Daniel O'Connor
79d5563344 Fix 719d1fe72cc25ecbd73f00189595d5d1936141a4 (SOCK_DGRAM vs SOCK_STREAM) 2012-06-24 14:44:43 +09:30
Daniel O'Connor
4f94f8701a Add socket.h to HDRS 2012-06-24 14:41:42 +09:30
Daniel O'Connor
38bf7c3a67 Don't hand roll socket name generation. Don't check if it's abstract (since the paths start with nul it was a NOP previously anyway). 2012-06-24 14:32:26 +09:30
Daniel O'Connor
626ddee8da Change monitor.socket and mdp.socket prefs to be a suffix which is applied to the instance directory (normal) or org.servalproject.servald (abstract) 2012-06-24 14:26:43 +09:30
Daniel O'Connor
719d1fe72c Add option to set SO_REUSEADDR to socket_bind() and use it. 2012-06-24 14:25:58 +09:30
Daniel O'Connor
4861ff9252 Call a function to cleanup various sockets properly. 2012-06-24 14:24:58 +09:30
Daniel O'Connor
aac5a4c275 Set c-basic-offset to 2 for all files. 2012-06-24 13:41:49 +09:30
Daniel O'Connor
523c9ad49f Push debug knobs into a separate makefile so I don't have to run configure when I change them. 2012-06-24 00:40:54 +09:30
Daniel O'Connor
c4f19f8a82 Factor out code to fill in a sockaddr_un to a single function and remove overlay_mdp.c's duplicate socket handling (which was incomplete).
All platforms except Android use normal sockets (although this is easy to change and the choice is keyed off a single define).
This gives consistent handling to unix domain sockets which were previously a mishmash where some were always normal, some always abstract and some chose (but in different ways). It also gives consistent error checking.

Doesn't pass tests yet though.
2012-06-24 00:38:47 +09:30
Daniel O'Connor
510711586f Check the socket isn't too long before copying it to prevent a seg fault. 2012-06-22 21:47:30 +09:30
Daniel O'Connor
00f66063d4 The number of clients we have is not a warning. 2012-06-22 20:42:05 +09:30
Daniel O'Connor
2fe520f7a2 Fix peer credential checking on BSD, replace write(s, m, strlen(m)) with a macro, factor out new monitor socke code.
Note this code has issues with signed/unsigned chars. They should become uint8_t's if they hold binary data, otherwise just char. If they ARE binary then it is broken because it calls strlen() on them.
2012-06-22 20:40:30 +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
Daniel O'Connor
59ff806081 Don't pass the configuration value as the format string. 2012-06-22 20:40:29 +09:30
Daniel O'Connor
41a7588a7f Fix creation of socket name for !linux. Depressingly bind() doesn't fail when you pass it the name of a directory. 2012-06-22 20:40:29 +09:30
Andrew Bettison
c041048958 Fix servald server test assertion messages 2012-06-22 17:32:42 +09:30
gardners
3b6a004cc9 new event scheduler almost working, but after a while can stop
calling overlay_check_ticks alarm for some reason, which causes
queues to congest and bad things to generally happen.
2012-06-22 17:30:21 +09:30
Andrew Bettison
dfc8136b11 Merge branch 'andrew' 2012-06-22 17:26:52 +09:30
Andrew Bettison
a6ac6a4246 Improve servald logging
Use 'logfile' config entry, fall back to stderr if absent or can't be opened
Replace fprintf(stderr,...) with DEBUGF() in dump() and dumpResponses()
2012-06-22 17:19:14 +09:30
Andrew Bettison
de4a9a1318 Improve server tests: server log file assertions 2012-06-22 17:18:14 +09:30
Andrew Bettison
cf03033429 Improve test framework: assertGrep error on bad file 2012-06-22 17:16:43 +09:30
Daniel O'Connor
60512ad3e8 Fix build breakage. 2012-06-22 16:46:30 +09:30
gardners
3e88400e16 cleaned up some debugging. 2012-06-22 16:06:47 +09:30
gardners
895b5873f0 fixed bug cpu time wasting bug for dummynets. 2012-06-22 16:06:46 +09:30
gardners
b675e8eefd removed debugging 2012-06-22 16:06:46 +09:30
gardners
6472ff29c1 fixed monitor interface problem with new event scheduler. 2012-06-22 16:06:46 +09:30
gardners
05da8be34b cleaned up some debug output. 2012-06-22 16:05:50 +09:30
gardners
91bccec71d various fixes related to event scheduler.
server main loop is now just fd_poll()
2012-06-22 16:05:50 +09:30
gardners
f0ed4b2e52 debugging and related improvements for new event scheduler. 2012-06-22 16:05:50 +09:30
gardners
7ea0c2f3bf fixed bug in dummynet interface handling with new event scheduler. 2012-06-22 16:05:49 +09:30
gardners
ae9e80fdce added missing file from previous commit.
formatting in overlay.c
2012-06-22 16:05:49 +09:30
gardners
5dc6d122a5 significant progress towards clean callback scheduler for poll()
events and timed callbacks.
2012-06-22 16:05:49 +09:30
Daniel O'Connor
5103176d39 Remove server_probe() and use daemon() instead of a hand rolled version.
- server_probe() assumes abstract name space sockets.
- The hand rolled daemon doesn't work properly on BSD.
2012-06-22 16:05:43 +09:30