Paul Gardner-Stephen
bba6839656
Initial stab at porting to Solaris.
...
It compiles without warning (with CC=gcc) but doesn't link
because NaCL doesn't build yet.
2012-09-05 20:42:50 +09:30
Andrew Bettison
00c9c540f5
DNA helper treat poll(2) POLLNVAL like POLLERR
...
Fixes #5 , test cases failing on Mac OS X
2012-08-27 13:03:13 +09:30
Andrew Bettison
30e21810e4
Improve dnahelper diagnostics to investigate issue #5
2012-08-27 11:19:59 +09:30
Daniel O'Connor
e98ec36391
Set MYSID to my SID before starting the dna helper so it can return it in a SID URI.
2012-08-24 11:43:30 +09:30
Andrew Bettison
ec4384ae7d
Fix failing 'dnahelper' test case
2012-08-09 12:21:40 +09:30
Andrew Bettison
fd1da2df93
Fix bug that failed dnaprotocol multi-lookup test
2012-08-06 16:44:36 +09:30
Andrew Bettison
240be25793
Replace overlay_gettime_ms() with gettime_ms()
2012-07-30 17:22:38 +09:30
Daniel O'Connor
6d83fddbe5
Rename strnstr as it already exists in FreeBSD & OSX (with different argument ordering).
...
Arguably we could detect it but I couldn't be bothered dealing with auto*
2012-07-27 16:47:05 +09:30
Andrew Bettison
04b95d2590
Merge branch 'andrew' into 'master'
2012-07-25 18:04:16 +09:30
Andrew Bettison
54da59bc56
Fix DNA helper so all tests pass
...
Added a couple more 'dnahelper' tests for timeout conditions
and spurious output
2012-07-24 11:29:07 +09:30
Andrew Bettison
f472ac9a8d
Lots of 'dnahelper' tests, all pass but one
...
Test fails because DNA helper logic does not yet impose a timeout on receiving
the "DONE" ACK after a request.
2012-07-23 18:29:57 +09:30
Andrew Bettison
0e5c5e0e98
More work on dnahelper, almost done
...
Servald starts DNA helper, receives startup ACK, sends requests, receives
responses, handles malformed helper responses, echoes dnahelper stderr lines to
log, sends MDP reply packet, waits for dead helper process, all asynchronously.
Shuts down helper process during servald shutdown.
Remaining issues:
- Does not impose a timeout on helper responses.
- Only the first URI is reported by the "dna lookup" command.
2012-07-20 18:17:43 +09:30
Andrew Bettison
3b44bb6e58
More progress on dnahelper
2012-07-19 17:59:45 +09:30
Andrew Bettison
5aac5a3854
Unfinished dnahelper implementation
2012-07-18 19:16:30 +09:30
gardners
636574d1cf
towards DNA helper application.
2012-07-16 17:05:13 +09:30
gardners
71eb3de446
minor work towards DNA helper working.
2012-07-16 12:47:04 +09:30
gardners
47dbb8cee5
fixed bug when fork()ing to start DNA helper.
...
added some debugging.
2012-07-16 12:47:04 +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
2c87039307
Replace overlay_render_sid() with alloca_tohex_sid()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-03 17:59:30 +09:30
gardners
02ca21a601
CHANGED DNA REPLY PACKET FORMAT BREAKING BACKWARDS COMPATIBILITY
...
... as part of working on work on DNA helper callout facility.
(DNA replies now contain a token that can be used to match them
against DNA requests as a happy side-effect).
2012-07-03 16:45:03 +09:30
Daniel O'Connor
8e0ba3f168
Tidyup various things (signal hander, use WRITE_STR, staticise stuff)
2012-06-25 16:24:34 +09:30
gardners
2cb84bb8db
various fixes to new DNA URI response relating to parsing replies
...
that lacked DID and/or name field.
2012-06-21 16:36:37 +09:30
gardners
89d036822b
added code to start dna helper, and detect when it has failed
...
and restart it.
2012-06-21 16:35:53 +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