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.
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.