Andre [Tue, 13 Jun 2006 09:41:28 +0000 (11:41 +0200)]
mark all fds used for select() as non-blocking
This shouldn't matter much, but there _are_ (rare) situations where
an fd is marked ready for reading, but a subsequent read will block
nevertheless. It's never wrong to use non-blocking fds, so just do it.
This patch also includes a check in para_fd_set() which spots blocking
fds as they are added to the fd sets. This check is commented out
for performance reasons but can easily be activated.
Andre [Mon, 12 Jun 2006 03:51:41 +0000 (05:51 +0200)]
Make crypo a per fd feature
The current code checked if the global pointers crypt_function_recv and
crypt_function_send are non-NULL. In this case it used the given crypt
functions unconditionally for each fd. This makes it messy to enable
crypto only for some fds.
This patch removes these global pointers in favour of an array of
crypt function pointers. Users may use this function to activate
crypto for each fd separately.
Andre [Sun, 11 Jun 2006 01:40:56 +0000 (03:40 +0200)]
unify web pages
reformat the text files to make them more friendly to grutatext
and make the headlines of the static pages look the same. Also, remove
the diffstats from NEWS.
Andre [Wed, 7 Jun 2006 18:17:11 +0000 (20:17 +0200)]
split audiod
move everything that is related to audio commands to the new file
audiod_command.c. Also, simplify the handling of the current time:
The "now" pointer is no longer a field of the sched struct but is
globally visable for read-only access.
Andre [Mon, 5 Jun 2006 20:51:43 +0000 (22:51 +0200)]
simplify writer node group
It's not neccessary to register a task for each writer in the wng.
So use only one task for the wng that calls the writer's pre_select()
and post_select().
Andre [Sun, 4 Jun 2006 20:59:38 +0000 (22:59 +0200)]
More audiod fixes
The bug-quality rises. This patch fixes
the select timeout after receiver open. As the pre_select
function of the receiver just opened will be called _after_
the upcoming select call, we might block for the time of that
call. Only afterwards, the receiver can change the timeout. Fix
this problem by changing the timeout to a minimum from within
start_receiver() (which gets called by audiod_pre_select()).
Resume on server restart. This was broken by design as it
used sleep() and also caused problems with the alsa writer
being restarted too early. We can do much better with the
new scheduler, so introduce a new field "restart_barrier" in
struct status_task and restart para_client and the receivers
not before this time.
Also, set the default timeout to a ridiculous value to detect further
timeout problems and do not kill the decoders even if the status pipe
went south.
Andre [Sun, 4 Jun 2006 19:52:00 +0000 (21:52 +0200)]
filter_chain: Don't return eof too early
The current code may miss to transform the remaining buffer if the
receiver has already deactivated its task. Check for the number of
loaded bytes in the input buffer of the filter chain and return eof
only if nothing is loaded.
Andre [Wed, 31 May 2006 02:38:56 +0000 (04:38 +0200)]
fix dccp sender/receiver
the server side broke during the afs header cleanup, the client side
had a fatal pointer bug and missed to set the return value in its
pre_select function.
Andre [Tue, 30 May 2006 00:49:10 +0000 (02:49 +0200)]
more audiod fixes
introduce output_eof in struct receiver_node to give the receivers
a chance to see if the connected consumer of the receiver data
died in case of an error.
Some eof fixes and cleanups also on the writer side.
Andre [Mon, 29 May 2006 22:56:35 +0000 (00:56 +0200)]
wng: fix two critical bugs
the open functions of the writers in a writer node group
might be interested to know which group they belong to.
Unfortunately, the old code called open before initializing
the "wng" pointer of the writer node.
The second bug triggers for example if invalid receiver options are
given. In this case wng_close() is called with a NULL-argument as
the wng has not been opened yet. The solution is to check for NULL
pointers and return immediately in this case.
Andre [Thu, 25 May 2006 21:57:48 +0000 (23:57 +0200)]
convert para_audiod to the new scheduler.
As expected, this was a bit harder. It works, but I'm sure there are
plenty of bugs left. Fortnunately, this doesn't matter much right now,
because the next step will be the integration of the writers into the
para_audiod executable. This will lead to major code simplifications,
so let's defer the bug-hunting until this integration is complete.
Andre [Wed, 24 May 2006 01:29:27 +0000 (03:29 +0200)]
Make para_recv use the new scheduler.
This was pretty straight-forward, but it broke audiod badly. The plan
is first to convert para_filter, then para_audiod. It this works out well,
para_server will be converted as well.
Andre [Tue, 23 May 2006 21:45:42 +0000 (23:45 +0200)]
simplify sched: nuke PRE_EOF_IS_ERROR
Much too simple to get it wrong. Instead, treat zero as success and
make all tasks return negative if they wish to have their error handler
called. A subsequent patch will rename error_handler to event_handler.