Andre [Mon, 3 Jul 2006 01:33:47 +0000 (03:33 +0200)]
improve and clean up audiod_status_dump()
Currently, no status is printed if audiod is off. This is suboptimal
as the _audiod_ status items should be sent in any case. This patch also
- gets rid of some static variables in audiod_status_dump()
- improves readability of audiod_status_dump()
- moves dump_empty_status() from stat.c to audiod_command.c
Andre [Wed, 28 Jun 2006 17:38:42 +0000 (19:38 +0200)]
client: do not ignore startup log messages
If an error occurs before the private_client_data struct is initialized,
the error message is silently ignored. Fix it by always printing the
log message if the struct pointer is NULL.
Andre [Thu, 22 Jun 2006 17:35:15 +0000 (19:35 +0200)]
audiod: fix receiver restart delay
The current code started a new receiver node for the current format
only if the receiver_node is NULL for each slot which streams
that format. Since that pointer is only set to NULL _after_ the
writer/filters are closed, audiod did not start the new receiver
early enough.
Fix is simple: Check also the eof field in struct receiver_node.
As we're at it, rename decoder_running() to receiver_running() and
move it straight above its single caller.
As a consequence of this change, the restart_barrier has to be set
already in rn_event_handler() as this is the place where rn->eof is
set to one.
Andre [Thu, 15 Jun 2006 12:21:02 +0000 (14:21 +0200)]
update to libortp-0.10.0
Actually, this version of libortp seems to have a bug which causes
the ortp receiver to segfault. Fix seems to be simple and is already
sent out to the linphone mailing list.
Moreover, Simon made msg_to_buf() static ;(
An easy solution to this problem is to provide an own version in
ortp_recv.c.
Andre [Thu, 15 Jun 2006 08:07:53 +0000 (10:07 +0200)]
split client.c
new file: client.h
new file: client_common.c
This completes the preparations for including para_client into para_audiod.
client_common.c contains all functions that are also useful for para_audiod.
Andre [Thu, 15 Jun 2006 06:06:44 +0000 (08:06 +0200)]
init_tcp_socket: close socket fd on errors
The current code may leak the fd if bind fails, for example. This is
a benign bug however, since all paraslash applications that call
init_tcp_socket() terminate on errors anyway.
But it is no good idea to rely on this, so close the fd on errors.
This patch also gets rid of the do_bind() one-liner which was only
called from init_tcp_socket().
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.