paraslash.git
13 years agoMerge branch 't/doc'
Andre Noll [Thu, 13 May 2010 11:02:15 +0000 (13:02 +0200)]
Merge branch 't/doc'

13 years agoMerge branch 'maint'
Andre Noll [Wed, 12 May 2010 22:37:37 +0000 (00:37 +0200)]
Merge branch 'maint'

13 years agooss: Fix double free bug on open failure.
Andre Noll [Wed, 12 May 2010 21:22:37 +0000 (23:22 +0200)]
oss: Fix double free bug on open failure.

If setting the oss parameters (sample format, sample rate, channel
count) fails, we end up freeing the private_oss_data struct twice.

13 years agomanual.m4: Fix a typo.
Andre Noll [Thu, 6 May 2010 07:03:19 +0000 (09:03 +0200)]
manual.m4: Fix a typo.

13 years agoNEWS update.
Andre Noll [Thu, 6 May 2010 05:49:11 +0000 (07:49 +0200)]
NEWS update.

13 years agoThe new comprehensive paraslash user manual.
Andre Noll [Mon, 3 May 2010 13:07:09 +0000 (15:07 +0200)]
The new comprehensive paraslash user manual.

13 years agoAvoid the word "filter chain".
Andre Noll [Mon, 3 May 2010 00:05:11 +0000 (02:05 +0200)]
Avoid the word "filter chain".

"Filter configuration" is more to the point.

13 years agomood: make reload_current_mood() static.
Andre Noll [Mon, 3 May 2010 00:03:43 +0000 (02:03 +0200)]
mood: make reload_current_mood() static.

13 years agofilter: Clarify help text of --no-default-filters.
Andre Noll [Mon, 3 May 2010 00:03:00 +0000 (02:03 +0200)]
filter: Clarify help text of --no-default-filters.

13 years agobtr: Remove unused btr_exec().
Andre Noll [Mon, 3 May 2010 00:01:08 +0000 (02:01 +0200)]
btr: Remove unused btr_exec().

13 years agoRemove man page of para_fsck from web pages.
Andre Noll [Sun, 2 May 2010 20:18:30 +0000 (22:18 +0200)]
Remove man page of para_fsck from web pages.

para_fsck has long been replaced by oslfsck.

13 years agooggdec: Fix end-of-file detection.
Andre Noll [Sun, 25 Apr 2010 12:36:15 +0000 (14:36 +0200)]
oggdec: Fix end-of-file detection.

This bug causes the end of the decoded output not being written to the child nodes
of the buffer tree under certain circumstances. Even if the buffer tree detects EOF
we must not just bail out because there might still be data available for ov_read().

So remember the node status and return negative only if the node status is negative
_and_ ov_read() returns zero.

13 years agonew codename, reset version to git
Andre Noll [Fri, 23 Apr 2010 11:09:44 +0000 (13:09 +0200)]
new codename, reset version to git

13 years agothe paraslash-0.4.2 release tarball
Andre Noll [Fri, 23 Apr 2010 10:44:42 +0000 (12:44 +0200)]
the paraslash-0.4.2 release tarball

13 years agoparaslash 0.4.2 v0.4.2
Andre Noll [Fri, 23 Apr 2010 09:36:02 +0000 (11:36 +0200)]
paraslash 0.4.2

13 years agoaudiod: Avoid busy loop if switched off.
Andre Noll [Thu, 22 Apr 2010 21:12:46 +0000 (23:12 +0200)]
audiod: Avoid busy loop if switched off.

Also, request a minimal delay if the status task has to be shut down.

13 years agoaudiod: Make the time display more smooth.
Andre Noll [Thu, 22 Apr 2010 21:11:17 +0000 (23:11 +0200)]
audiod: Make the time display more smooth.

If playing, request a timeout that expires at the next second.

13 years agoaudiod: Dump audiod status after command execution.
Andre Noll [Thu, 22 Apr 2010 21:07:49 +0000 (23:07 +0200)]
audiod: Dump audiod status after command execution.

Commands like on/off/cycle change the audiod status. Without this change,
the status is only updated after the next select timeout.

13 years agoaudiod: Avoid busy loop in standby/off mode.
Andre Noll [Thu, 22 Apr 2010 21:05:26 +0000 (23:05 +0200)]
audiod: Avoid busy loop in standby/off mode.

Without this patch, must_start_decoder() incorrectly returned true if para_server
is announcing a stream but the audiod status is not on. This results in
status_pre_select() requesting a minimal delay.

13 years agoFix a gcc warning on ubuntu lucid lynx.
Andre Noll [Thu, 22 Apr 2010 16:03:36 +0000 (18:03 +0200)]
Fix a gcc warning on ubuntu lucid lynx.

Apparently the Ubuntu guys know better than the programmer which
system calls require argument checking. Sad, sad, sad.

13 years agoosx_write fixes.
Andre Noll [Thu, 22 Apr 2010 16:01:34 +0000 (18:01 +0200)]
osx_write fixes.

Boy, that was broken since the switch to the buffer tree API
and hasn't obviously seen any testing since then.

That code is rather strange and full of braindead crap. It
should be rewritten eventually. For now, this patch beats it
a little bit into the direction of sanitity.

13 years agogui: Avoid bogus "key is not bound" message.
Andre Noll [Thu, 22 Apr 2010 07:27:24 +0000 (09:27 +0200)]
gui: Avoid bogus "key is not bound" message.

Commit 0e4306dd5162a2850e623bf3082b3f7291aaad45 introduced a
bug causing para_gui to print a "key not found" message after
each command. Fix it by inserting a missing return statement.

13 years agoNEWS update.
Andre Noll [Wed, 21 Apr 2010 12:26:30 +0000 (14:26 +0200)]
NEWS update.

14 years agoFEC: Change the default slice size from 1490 to 1472.
Andre Noll [Tue, 20 Apr 2010 09:51:31 +0000 (11:51 +0200)]
FEC: Change the default slice size from 1490 to 1472.

1472 is the maximal possible size that does not result in fragmentation
on networks with 1500 MTU size (1500 = 1472 payload + 8 UDP header +
20 IP header).

This can be verified using

tcpdump -nv -i eth0 udp

The output must contain a zero offset value, and the "Don't Fragment"
IP flag (DF) should be set.

Thanks to Gerrit Renker for pointing this out.

14 years agoaudiod: Fix status item parsing for long status items.
Andre Noll [Mon, 19 Apr 2010 21:50:51 +0000 (23:50 +0200)]
audiod: Fix status item parsing for long status items.

This was broken since audiod started to use the buffer tree API. Actually there are
two bugs which are both fixed by this patch:

- for_each_stat_item() copies the remaining part of the buffer containing
the incomplete part of the last status item to the beginning of the buffer.
This is necessary if the buffer tree API is not used but messes up the buffer
contents if it _is_ used. Move this memmove()  call from for_each_status_item(),
which is called from audiod.c and gui.c,  to gui.c, as only gui.c needs it.

- Secondly, audiod.c called btr_node_status() with an minimum input queue
size of zero, which is does not work if a status item crosses a buffer
boundary. In this case for_each_status_item() will only ever see the first buffer
containing the incomplete status item, hence it can never make progress.
Fix this by introducing  the min_iqs field of struct status_task. Set  this field
to non-zero if the full buffer size was returned by for_each_status_item(),
indicating that the next status item is spread out over two or more buffers.

14 years agoMerge branch 't/udp_robustness'
Andre Noll [Mon, 12 Apr 2010 16:21:23 +0000 (18:21 +0200)]
Merge branch 't/udp_robustness'

14 years agoMerge branch 'maint'
Andre Noll [Mon, 12 Apr 2010 16:12:31 +0000 (18:12 +0200)]
Merge branch 'maint'

14 years agochunk queue: Fix chunk dequeuing.
Andre Noll [Mon, 12 Apr 2010 16:04:31 +0000 (18:04 +0200)]
chunk queue: Fix chunk dequeuing.

We missed to update the number of pending bytes when removing
a chunk from the queue.

This patch also clarifies the description of the cq parameter of
cq_dequeue().

Thanks to Gerrit Renker who pointed out this bug.

14 years agoMerge branch 'maint'
Andre Noll [Thu, 8 Apr 2010 18:23:27 +0000 (20:23 +0200)]
Merge branch 'maint'

14 years agoudp_send: Fix com_off.
Andre Noll [Thu, 8 Apr 2010 18:23:15 +0000 (20:23 +0200)]
udp_send: Fix com_off.

When the off command is executed, the udp sender sends an eof packet
to all configured targets. However, it then continues to send data.

Fix this by returning early in udp_send_fec() if the sender has been
switched off.

14 years agoudp_send: Force chunk queuing.
Andre Noll [Tue, 6 Apr 2010 17:51:17 +0000 (19:51 +0200)]
udp_send: Force chunk queuing.

This adds the public cq_force_enqueue() function to chunk_queue.c.
Unlike cq_enqueue() the new function does not return an error if the
queue is full, but drops old chunks from the queue in order to make
space for the new chunk.

The upd sender uses the new function to avoid kicking targets.

14 years agoudp_send_fec(): Treat ECONNREFUSED like EAGAIN.
Andre Noll [Tue, 6 Apr 2010 17:32:32 +0000 (19:32 +0200)]
udp_send_fec(): Treat ECONNREFUSED like EAGAIN.

Writes to udp sockets may return ECONNREFUSED. As this is often only
a temporary condition, there is no need to kick the target.

This patch makes the udp sender ignore such errors rather than kicking
the client from the udp target list on the first error.

Thanks to Gerrit Renker for suggesting this change.

14 years agoChange year in COPYRIGHT to 2010.
Andre Noll [Mon, 5 Apr 2010 01:48:04 +0000 (03:48 +0200)]
Change year in COPYRIGHT to 2010.

Hey, this is earlier than last year :)

14 years agoMerge remote branch 'albrecht/master'
Andre Noll [Sun, 4 Apr 2010 23:27:23 +0000 (01:27 +0200)]
Merge remote branch 'albrecht/master'

14 years agopara_client: Fix --user.
Andre Noll [Sun, 4 Apr 2010 22:57:47 +0000 (00:57 +0200)]
para_client: Fix --user.

In case the user was given in the config file but not at the
command line, the logname was used. --key_file had a similar
problem.

Fix this by moving the initialization of these two variables
down, after the config file has been read.

14 years agogui: Simplify handle_command() and avoid a buffer overflow.
Andre Noll [Sun, 4 Apr 2010 22:08:34 +0000 (00:08 +0200)]
gui: Simplify handle_command() and avoid a buffer overflow.

It's not save to use strcpy() here.

14 years agoSimplify com_sender().
Andre Noll [Sun, 4 Apr 2010 21:21:52 +0000 (23:21 +0200)]
Simplify com_sender().

The list of senders is always the same, no need to compute and print
it.

14 years agoRevert "udp_recv: Close receiver after 5 seconds of inactivitly."
Andre Noll [Thu, 25 Mar 2010 20:36:27 +0000 (21:36 +0100)]
Revert "udp_recv: Close receiver after 5 seconds of inactivitly."

This reverts commit 4d4379901a0a01859728d56795a7ab6ada9c876b.

This was not really a good idea as it only papers over the real bug.
A better fix is to check whether the currently active buffer tree
matches the status information obtained from para_server. This will
be implemented in a subsequent patch.

14 years agopara_recv: handle EAGAIN on non-blocking socket
Gerrit Renker [Thu, 25 Mar 2010 16:43:22 +0000 (17:43 +0100)]
para_recv: handle EAGAIN on non-blocking socket

Checking whether the non-blocking socket is readable is not sufficient
to guarantee that EAGAIN is not encountered on the non-blocking socket,
the following was observed in the middle of a UDP/FEC stream:

Mar 24 17:12:44:0533 audi (0) decode_group: writing group 2784 (4232/4374 decoded data bytes)
Mar 24 17:12:44:0710 audi (0) get_time_string: slot 0: 32:42 [94:49] (26%/127:31)
Mar 24 17:12:44:0710 audi (2) btr_remove_node: removing btr node udp from buffer tree
Mar 24 17:12:44:0710 audi (1) unregister_task: unregistering udp receiver node (Resource temporarily unavailable)

The patch fixes the problem by not interpreting the case "data not
yet ready" as an error, but as a temporary condition.

14 years agoMerge commit 'meins/master'
Andre Noll [Mon, 22 Mar 2010 08:32:32 +0000 (09:32 +0100)]
Merge commit 'meins/master'

14 years agopara_server: Print a log message containing the path of the next audio file.
Andre Noll [Sun, 21 Mar 2010 23:02:48 +0000 (00:02 +0100)]
para_server: Print a log message containing the path of the next audio file.

14 years agoaudiod: Revamp the decoder starting logic.
Andre Noll [Sun, 21 Mar 2010 18:16:20 +0000 (19:16 +0100)]
audiod: Revamp the decoder starting logic.

Use an approach that is based on the server start time of the stream. This value
changes whenever para_server announces a new stream.

This makes para_audiod restart the receiver much earlier and should get of timing
problems that cause the UDP sender to remove the UDP target because there
is no listener on the receiving side.

14 years agoudp_recv: Close receiver after 5 seconds of inactivitly.
Andre Noll [Sun, 21 Mar 2010 13:13:18 +0000 (14:13 +0100)]
udp_recv: Close receiver after 5 seconds of inactivitly.

There is no way  for the UDP receiver to tell that para_server won't send any more
data, e.g. because the UDP target has been deleted. Currently,  in this case the UDP
receiver listens on its socket indefinitely and the buffer tree stays active as well. This
can be fatal if para_server starts sending data for another audio format much later.

So close the UDP socket if no data has been received for 5 seconds.

14 years agoudp_recv: Fix a memory leak in case mcast_receiver_setup() failed.
Andre Noll [Sun, 21 Mar 2010 12:06:32 +0000 (13:06 +0100)]
udp_recv: Fix a memory leak in case mcast_receiver_setup() failed.

We have to free the private_data structure.

14 years agoaudiod: Kill unused initial_delay_barrier.
Andre Noll [Sun, 21 Mar 2010 10:40:10 +0000 (11:40 +0100)]
audiod: Kill unused initial_delay_barrier.

14 years agoMerge commit 'meins/master'
Andre Noll [Thu, 18 Mar 2010 08:43:19 +0000 (09:43 +0100)]
Merge commit 'meins/master'

14 years agoudp_recv: Replace recv_bin_buffer() by Use para_readv().
Andre Noll [Tue, 16 Mar 2010 21:14:31 +0000 (22:14 +0100)]
udp_recv: Replace recv_bin_buffer() by Use para_readv().

As pointed out by Gerrit Renker, the UDP receiver suffers from the
same problem that was fixed in commit 9e44ee8 for the DCCP receiver:
recv() might lose data if less than a full datagram is available in
the receiving buffer.

This patch solves the problem for udp_recv in the same way as 9e44ee8
does for dccp_recv.

14 years agofd.c: Fix compilation on OS X.
Andre Noll [Tue, 16 Mar 2010 12:20:25 +0000 (13:20 +0100)]
fd.c: Fix compilation on OS X.

readv() needs sys/uio.h on OS X.

14 years agodccp: sort out help text
Gerrit Renker [Sat, 13 Mar 2010 12:09:35 +0000 (13:09 +0100)]
dccp: sort out help text

This improves the formatting of the dccp help for para_recv: help2man
interprets words starting with '--...' as new options, not as examples.

14 years agonet: fix broken dccp_available_ccids()
Gerrit Renker [Sat, 13 Mar 2010 12:08:32 +0000 (13:08 +0100)]
net: fix broken dccp_available_ccids()

This fixes a dumb programming error in dccp_available_ccids(), where a
pointer to 1-byte address was type cast to a socklent_t (typically 4 byte)
pointer. Changed the interface to not expose internals of call.

In addition, this patch adds a missing close() in the error path of makesock().

14 years agoaudiod: Don't init slot info unless opening the receiver succeeds.
Andre Noll [Wed, 10 Mar 2010 07:56:55 +0000 (08:56 +0100)]
audiod: Don't init slot info unless opening the receiver succeeds.

Currently we set the slot's audio format number even if the receiver could not
be opened. This confuses the slot clearing code as no writer is active in
this case which triggers the assertion

para_audiod: audiod.c:384: close_writers: Assertion `s->wns'

Fix it by not touching the slot info structure unless we have successfully started
the receiver. Also perform some minor cleanups while we're at it.

Thanks to Gerrit Renker for pointing out this bug.

14 years agoMerge branch 'maint'
Andre Noll [Sun, 7 Mar 2010 15:34:40 +0000 (16:34 +0100)]
Merge branch 'maint'

14 years agosetup_next_fec_group(): Return early on eof.
Andre Noll [Sun, 7 Mar 2010 15:34:25 +0000 (16:34 +0100)]
setup_next_fec_group(): Return early on eof.

The old code updated the group start via set_group_timing() even if the
end of the file was reached. This could confuse the logic in vss_send()
as it uses the goup start timestamp to find out whether all FEC clients
have sent all remaining slices.

Fix this by moving the check for the eof condition before the call to
set_group_timing() that updates the group start.

14 years agoMinor doxygen fixes.
Andre Noll [Fri, 5 Mar 2010 08:18:49 +0000 (09:18 +0100)]
Minor doxygen fixes.

Fixes

net.c:279: Warning: Found unknown command `\opt'
net.h:104: Warning: argument 'l3type' of command @param is not found in the argument list of makesock...

14 years agoNEWS update.
Andre Noll [Fri, 5 Mar 2010 07:47:37 +0000 (08:47 +0100)]
NEWS update.

14 years agoaudiod: Make default filters work also for udp streams.
Andre Noll [Fri, 5 Mar 2010 07:42:13 +0000 (08:42 +0100)]
audiod: Make default filters work also for udp streams.

Currently one has to use --no_default_filters and must specify fecdec as the
first filter for UDP streams, a fact that is not documented anywhere. Make decoding
of udp streams work if no filters were given by changing init_default_filters() to
add fecdec automatically if the udp receiver is used.

14 years agonet: revert restricting SO_REUSEADDR
Gerrit Renker [Wed, 3 Mar 2010 16:57:14 +0000 (17:57 +0100)]
net: revert restricting SO_REUSEADDR

This reverts part of commit a5927501e41fa3fca2975452617474e78ffecc48
(08_refactor-makesock.diff, 25 Feb 2010), which restricted by default
SO_REUSEADDR to connection-oriented protocols only - it used to be
set on all passive sockets.

However, the same problem exists also for UDP, whenever connecting
more than one listener on the same host, hence revert it.

14 years agobtr: Fix a nasty thinko in merge_input_pool().
Andre Noll [Tue, 2 Mar 2010 06:10:00 +0000 (07:10 +0100)]
btr: Fix a nasty thinko in merge_input_pool().

We must take into account the number of bytes already consumed from the wrap buffer.
Otherwise, we might end up not merging as much as we must,  which may cause errors
in the child nodes.

This bug was quite hard to hit, but it did bite the aac decoder reliably when used in audiod
with UDP + FEC.

14 years agobtr: Kill an unused variable.
Andre Noll [Tue, 2 Mar 2010 05:54:18 +0000 (06:54 +0100)]
btr: Kill an unused variable.

14 years agonet.h: Fic compilation on systems with partial DCCP support.
Andre Noll [Thu, 25 Feb 2010 16:33:54 +0000 (17:33 +0100)]
net.h: Fic compilation on systems with partial DCCP support.

There exists at least one system that defines IPPROTO_DCCP but not
DCCP_SOCKOPT_CCID and friends. On such systems compilation fails due
to to undefined symbols.

Fix this problem by checking each value separately.

14 years ago11_recv-segfault.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:46 +0000 (17:05 +0100)]
11_recv-segfault.diff

This fixes a segmentation fault when trying to access a NULL rn.conf:

vongole> para_recv -r 'dccp -i localhost -c 253'
dccp_recv_ccid_support_check: 'CCID-253' not supported on this host.
main: parse failed
Segmentation fault

14 years ago10_set-client-ccid.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:46 +0000 (17:05 +0100)]
10_set-client-ccid.diff

This adds a commandline option to either
 * select the CCID in use for the sender-receiver half-connection or
 * advertise the (para_)client's priorities for the CCID;
 * the feature is optional and can be used to fine-tune a connection.

The arguments are both range-checked by gengetopt, and against the CCIDs
available on the host. Currently known CCIDs are 2-4, 248-254. Trying a
CCID which is not supported by the host exits via the following route:

 dccp_recv_ccid_support_check: 'CCID-253' not supported on this host.
 main: parse failed
 main: recv syntax error

The CCID negotiation can be watched in wireshark, between the 'Request'
packet sent by the para_client and the corresponding 'Response' packet of
the para_server. Here are some example negotiations:

     +-------------+---------------+----------------+
     | client-list |  server-list  | resulting CCID |
     +-------------+---------------+----------------+
     |  3, 2       |   2, 3, 4     |       2        |
     |  4, 3, 2, 4 |   3, 2, 4     |       3        |
     |  2, 4       |   2, 3, 4     |       2        |
     |  4, 3, 2, 4 |   2, 3, 4     |       2        |
     |  2          |   2, 3, 4     |       2        |
     |  3          |   2, 3, 4     |       3        |
     |  4          |   2, 3, 4     |       4        |
     +-------------+---------------+----------------+

The server list of (2, 3, 4) is the unaltered default, it can be changed on
the server using the same mechanism.

As shown, the easiest way is to use just a single '--ccid <n>' argument;
when passing multiple values, the outcome is determined by the algorithm
described in RFC 4340, 6.3.1:
 * 'server-priority' means that the server overrids the result;
 * the server traverses its list of preferences in order of priority and
 * uses the first entry which also appears in the client-list;
 * resets connection with negotiation failure when there is no common value.

Applying this algorithm on the above lists can be used to verify the
table. This also illustrates that repetition of CCID values has no effect
on the outcome: if the repeated value is first in the server list, it will
be chosen; otherwise all instances of that value are ignored.

14 years ago09_fix-errno-usage.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
09_fix-errno-usage.diff

This fixes a bug in the use of errno which corresponds to the 'common mistake'
in the use of errno(3): to not save it before making new system calls. Thanks.

14 years ago08_refactor-makesock.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
08_refactor-makesock.diff

This is a refactoring of makesock():
 * the ubiquitous AF_UNSPEC is promoted as the default;
 * a wrapper for active sockets, para_connect_simple();
 * para_listen() now supports flowopts;
 * a wrapper for passive sockets, para_listen_simple();
 * for consistency, port numbers (which are 2 byte in
   UDP, TCP, and DCCP) have all been set to 'uint16_t'.

14 years ago07_flow-opt-support.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
07_flow-opt-support.diff

In order to support a class of socket options which have to be set
before commiting a socket to a connection, this patch adds an API
for "pre-connection" socket options, called "flowopts" here.

The API is used as follows:
 * to provide queue storage, a new head is allocated using flowopt_new();
 * this queue is then populated with pre-connection socket options via
   - generic 'add' method flowopt_add(),
   - a specific variant for adding Boolean options - flowopt_add_bool(),
   - convenience macros - OPT_ADD(), OPT_ENABLE(), OPT_DISABLE();
 * the rest is then dealt with automatically by makesock():
   - any provided flowopts are set before making the connection,
   - due to using a queue, the order of invocation is preserved,
   - after making the connection, makesock() frees storage that has been
     previously allocated by flowopt_new() and flowopt_add.*().

14 years ago06_get-tx-ccid.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:45 +0000 (17:05 +0100)]
06_get-tx-ccid.diff

This patch adds support for querying the TX half-connection CCID
in use to from sender to client.

On more recent kernels (> 2.6.30) supporting this functionality,
connected clients are now displayed in the manner
          <IP-address>"#"<port>"~"<CCID-number>

14 years ago05_dccp-supported-ccid-lookup.diff
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.

14 years ago04_per-connection-ccid-constants.diff
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.

14 years ago03_resolve-port-names.diff
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.

14 years ago02_udp-sender-info.diff
Gerrit Renker [Thu, 25 Feb 2010 16:05:44 +0000 (17:05 +0100)]
02_udp-sender-info.diff

udp sender: simplify port information of 'si' command

The 'udp' information is already in the transport protocol name,
hence removed by this patch.

http sender:
status: on
port: 8000
...
dccp sender:
status: on
port: 8000
...
udp sender:
status: on
port: udp 8000

For DCCP, the case is similar, http relies on TCP.

14 years ago01_convert-v6-mapped-v4-addresses.diff
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.

14 years agoAdd some missing documentation of public functions.
Andre Noll [Sun, 21 Feb 2010 20:32:06 +0000 (21:32 +0100)]
Add some missing documentation of public functions.

14 years agoREADME.afs: Update the Troubles section.
Andre Noll [Wed, 17 Feb 2010 07:01:51 +0000 (08:01 +0100)]
README.afs: Update the Troubles section.

It still talked about para_fsck which was replaced by oslfsck in paraslash-0.4.0.

14 years agoREQUIREMENTS update.
Andre Noll [Wed, 17 Feb 2010 06:40:41 +0000 (07:40 +0100)]
REQUIREMENTS update.

14 years agoNEWS update.
Andre Noll [Wed, 17 Feb 2010 06:06:34 +0000 (07:06 +0100)]
NEWS update.

14 years agoFix doxygen reference to struct writer.
Andre Noll [Wed, 17 Feb 2010 05:28:36 +0000 (06:28 +0100)]
Fix doxygen reference to struct writer.

Fixes
Warning: unable to resolve reference to `struct' for \ref command

14 years agoRemove doxygen reference to private struct mood.
Andre Noll [Wed, 17 Feb 2010 05:27:32 +0000 (06:27 +0100)]
Remove doxygen reference to private struct mood.

This fixes the doxygen warning

Warning: unable to resolve reference to `mood' for \ref command

14 years agoclient_open(): Add documentation of missing parameters.
Andre Noll [Wed, 17 Feb 2010 05:23:41 +0000 (06:23 +0100)]
client_open(): Add documentation of missing parameters.

14 years agosched: Add missing documentation for timeout-request functions.
Andre Noll [Wed, 17 Feb 2010 05:16:10 +0000 (06:16 +0100)]
sched: Add missing documentation for timeout-request functions.

14 years agooggdec: Kill unused ->stream_start of struct private_oggdec_data().
Andre Noll [Sun, 14 Feb 2010 22:00:00 +0000 (23:00 +0100)]
oggdec: Kill unused ->stream_start of struct private_oggdec_data().

14 years agooggdec: Fix a thinko in post_select().
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.

14 years agobtr: Rename btr_bytes_pending() and make it public.
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().

14 years agodccp_recv: Use para_readv() instead of recv_bin_buffer().
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.

14 years agoAdd para_readv(), a simple wrapper for readv().
Andre Noll [Sat, 13 Feb 2010 11:58:40 +0000 (12:58 +0100)]
Add para_readv(), a simple wrapper for readv().

This new function will be used by the dccp receiver in a subsequent patch.

14 years agoIntroduce btr_pool_get_buffers().
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).

14 years agoconfigure: Check for broken snprintf().
Andre Noll [Thu, 11 Feb 2010 21:56:35 +0000 (22:56 +0100)]
configure: Check for broken snprintf().

We rely on a working snprintf implementation at several places, so abort early
of the system has no fully C99 compliant version.

14 years agoalsa: Remove xrun().
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.

14 years agoFix a couple of memory leaks.
Andre Noll [Sat, 6 Feb 2010 23:23:47 +0000 (00:23 +0100)]
Fix a couple of memory leaks.

Found by valgrinds memory checker.

14 years agoFix make clean and make install.
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).

14 years agoMerge branch 'maint'
Andre Noll [Sun, 31 Jan 2010 22:25:16 +0000 (23:25 +0100)]
Merge branch 'maint'

Conflicts:
recv_common.c

14 years agorecv: Don't set argv to NULL when parsing receiver args.
Andre Noll [Sun, 31 Jan 2010 22:16:15 +0000 (23:16 +0100)]
recv: Don't set argv to NULL when parsing receiver args.

This leads to error messages like

(null): unrecognized option '--foo'

in case an invalid option was given. Fix it by setting argv[0] to
the receiver name instead.

Thanks to Gerrit Renker for pointing out this bug.

14 years agoMerge remote branch 'fml/next'
Andre Noll [Sat, 30 Jan 2010 21:57:09 +0000 (22:57 +0100)]
Merge remote branch 'fml/next'

14 years agoclient: Remove the buffer tree node on errors.
Andre Noll [Sat, 30 Jan 2010 13:24:17 +0000 (14:24 +0100)]
client: Remove the buffer tree node on errors.

This fixes restarting of the status client task in case para_server is being restarted.

14 years agosched: Add sched_request_barrier_or_min_delay().
Andre Noll [Sat, 30 Jan 2010 13:22:32 +0000 (14:22 +0100)]
sched: Add sched_request_barrier_or_min_delay().

This is what some tasks need, so add this public function to the scheduler.

14 years agoaudiod: Split open_current_receiver().
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.

14 years agoaudiod: Fix time diff log message.
Andre Noll [Sat, 30 Jan 2010 13:15:10 +0000 (14:15 +0100)]
audiod: Fix time diff log message.

The average time diff was always displayed as "+".

14 years agotime.c: tv_convex_combination() fixes.
Andre Noll [Sat, 30 Jan 2010 13:13:35 +0000 (14:13 +0100)]
time.c: tv_convex_combination() fixes.

Fix some typos, make it return zero if both coefficients are zero.

14 years agowma: Defer decoding until two data blocks are available.
Andre Noll [Sat, 30 Jan 2010 13:07:03 +0000 (14:07 +0100)]
wma: Defer decoding until two data blocks are available.

This avoids buffer underruns caused by frames that span two blocks.

14 years agoAdd buffer tree support for the osx writer.
Andre Noll [Wed, 27 Jan 2010 11:56:06 +0000 (12:56 +0100)]
Add buffer tree support for the osx writer.

Fix makes paraslash build again on Max OS.

14 years agoaudiod: Request a minimal delay if the status buffer tree node is in error state.
Andre Noll [Sat, 23 Jan 2010 13:29:57 +0000 (14:29 +0100)]
audiod: Request a minimal delay if the status buffer tree node is in error state.

This happens during startup and causes a large delay.