Gerrit Renker [Thu, 25 Feb 2010 16:05:44 +0000 (17:05 +0100)]
01_convert-v6-mapped-v4-addresses.diff
This updates the resolution of v4/v6 addresses to present v6-mapped-v4
addresses in dot-quad format rather than as subtype of v6 address.
The getnameinfo(3) is in use for both address classes, where potential
DNS lookups (requiring Internet connectivity) are avoided by using the
NI_NUMERICHOST flag.
The use of this flag reduces getnameinfo() to inet_ntop(3). In the 'Bugs'
section of the inet_ntop() manpage it is stated that v6-mapped-v4 addresses
are converted into an IPv6 format, which is what had been observed here.
The patch works around the issue by casting the v6-mapped-v4 address into
a genuine AF_INET IPv4 socket address.
Andre Noll [Sun, 14 Feb 2010 21:58:12 +0000 (22:58 +0100)]
oggdec: Fix a thinko in post_select().
The old code broke out of the decoding loop if btr_node_status() returned zero
which is true if no more input data is available for decoding or we already
have decoded more than 640K. However, in the first case there might still be
decoded data available to be passed to the child nodes and we should pass
that data as quick as possible to avoid buffer underruns.
So call btr_get_output_queue_size() rather than btr_node_status() to detect
the second case.
Andre Noll [Sun, 14 Feb 2010 21:37:06 +0000 (22:37 +0100)]
btr: Rename btr_bytes_pending() and make it public.
The oggvorbis decoder needs to know this info, so make it public. As we have already
btr_get_input_queue_size() it is natural to rename btr_bytes_pending() to
btr_get_output_queue_size().
Andre Noll [Sat, 13 Feb 2010 12:12:47 +0000 (13:12 +0100)]
dccp_recv: Use para_readv() instead of recv_bin_buffer().
When the end of the buffer pool area is reached, the old code ended up calling recv()
with a buffer size smaller than a full datagram. This results in data being lost
because the remaining part of the datagram will be discarded rather than returned
at the next call to recv().
By using the new btr_pool_get_buffers() we obtain two buffers in this case, a small
one pointing to the end of the area and a larger one pointing to the area start. Passing
both buffers to para_readv() instead of using recv_bin_buffer() receives the full
datagram and therefore avoids the above mentioned loss of data.
Andre Noll [Sat, 13 Feb 2010 11:57:35 +0000 (12:57 +0100)]
Introduce btr_pool_get_buffers().
This allows the users of the buffer pool API to obtain references to both parts
of the buffer pool area in case there is free space available at the end of the
area as well as at the beginning.
This is needed for reading from file descriptors where reading less than a full
datagram would discard the remaining part (DCCP and UDP).
Andre Noll [Mon, 8 Feb 2010 13:46:48 +0000 (14:46 +0100)]
alsa: Remove xrun().
This function tried to compute the duration of the underun but never
really worked. The values were more or less random (up to hundreds
of seconds) and thus of little value.
Gerrit Renker [Wed, 3 Feb 2010 14:05:33 +0000 (15:05 +0100)]
Fix make clean and make install.
Commit 77aa6680 replaced the hardcoded list of binaries in Makefile.in
by the autoconf macro @executables@. However, the "install" and the
"clean" targets still used the now undefined $(BINARIES) variable. This
caused "make clean" to not remove any executables and "make install"
to fail with
/usr/bin/install -c -s -m 755 /usr/local/bin
/usr/bin/install: missing destination file operand after `/usr/local/bin'
Try `/usr/bin/install --help' for more information.
Fix this bug by using @executables@ rather than $(BINARIES).
Andre Noll [Sat, 30 Jan 2010 13:20:19 +0000 (14:20 +0100)]
audiod: Split open_current_receiver().
We need to check whether the current receiver should be opened from both
pre_select() and post_select(). So rename this function to must_start_decoder(),
make it return bool and do not start the decoder there.
This change makes audiod start the decoder as soon as possible.
Andre Noll [Tue, 19 Jan 2010 00:21:32 +0000 (01:21 +0100)]
Don't hardcode the list of executables in Makefile.in.
Just export the list via the $all_executables variable from configure.ac. Rename it to
$ececutables while we're at it and remove two unused variables in configure.ac.
Andre Noll [Sun, 17 Jan 2010 20:30:27 +0000 (21:30 +0100)]
[btr]: Avoid a gcc warning.
Although the warning
warning: 'brs[1]' may be used uninitialized in this function
is clearly bogus, it can't hurt to assert that i == 2 which also makes the warning to away.
Andre Noll [Fri, 15 Jan 2010 05:46:03 +0000 (06:46 +0100)]
btr support for para_client.
The use of the client code in audiod requires a node to be inserted
as the _parent_ of some existing node, which was not neccessary
before. Therefore a new btrn pointer for the child node is added to
struct btr_node_description and btr_new_node() is adjusted accordingly.
The patch also adds a small helper sched_request_barrier() to
the scheduler.
Andre Noll [Thu, 14 Jan 2010 03:19:59 +0000 (04:19 +0100)]
Introduce btr_node_description.
As the number of arguments to btr_new_node() grows, the code becomes
hard to read, especially since some callers must set many of the
arguments to NULL.
Using a pointer to a struct has the additional advantage that adding
new parameters does no longer require to touch all callers.
Andre Noll [Wed, 13 Jan 2010 23:11:46 +0000 (00:11 +0100)]
[btr] Fix merge_input_pool().
This function contained the following bug: wbr, buf1 and sz1 could
be used without being initialized. This was sometimes hitting the
assertion (buf1 && buf2).
Fix this by initializing these variables at the top.