Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
05_dccp-supported-ccid-lookup.diff
This adds a self-contained function to return the space-separated list of
CCIDs available on the para_server. Visible via 'para_client si'.
Since feature negotiation for CCIDs is supported only from v2.6.30-rc1
(released 7th April 2009), a more recent kernel (>= 2.6.30) is needed to
support this feature, as well as subsequent per-connection use of CCIDs.
Note: This patch still uses a hardcoded upper bound (DCCP_MAX_HOST_CCIDS),
support dynamically detecting the number of CCIDs will be in 2.6.33.
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
04_per-connection-ccid-constants.diff
This adds symbolic constants for per-connection CCID support; these are used
by subsequent patches.
Per-connection CCID support is available in the Linux kernel from v2.6.30-rc1
(7th April 2009) onwards, further information is available at:
* symbolic names are taken from include/linux/dccp.h,
* API documentation is in Documentation/networking/dccp.txt.
The patch also corrects the manner of using doxygen comments in the #defines.
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
03_resolve-port-names.diff
This patch allows to resolve port numbers into names defined
in the services(5) /etc/services database:
(a) it provides a standalone function which will fall back to
stringifying a port number;
(b) it resets the 'numeric service' flag of getnameinfo(3) to
analogously consider a lookup in /etc/services.
Assuming the following had been added to /etc/services:
para_server_control 2990/tcp # para_server control
paraslash_http_service 8000/tcp # paraslash http sender
paraslash_dccp_service 8000/dccp # paraslash dccp sender
paraslash_udp_service 8000/udp # paraslash udp sender,
then the output of 'para_client si' would look like:
http sender:
status: on
port: paraslash_http_service
...
dccp sender:
status: on
port: paraslash_dccp_service
...
udp sender:
status: on
port: paraslash_udp_service
...
Note: On some systems the service lookup may involve LDAP or NIS lookups,
depending on the 'services' configuration in /etc/nsswitch.conf. This does
not seem to cause a problem, as it implies a working network connection.
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.