paraslash.git
10 years agoaudiod: Trival spelling fix for com_tasks().
Andre Noll [Sat, 1 Mar 2014 17:59:49 +0000 (18:59 +0100)]
audiod: Trival spelling fix for com_tasks().

10 years agoMerge branch 't/misc'
Andre Noll [Sun, 30 Mar 2014 16:31:57 +0000 (18:31 +0200)]
Merge branch 't/misc'

Various fixes, improvements, cleanups. Cooking since 2014-02-22.

* t/misc: (29 commits)
  build: Don't link with -lreadline if readline was not found.
  audiod: Skip NULL pointer check in compute_time_diff().
  audiod: Make compute_time_diff() return void.
  com_stat(): Remove pointless uptime variable.
  gcrypt: Fix gcc warning on Ubuntu Lucid.
  flac: Try to link also without -logg.
  version.c: Fix comment of version_single_line().
  doxygen: Expand all macros, in particular config.h.
  recv_common.c: Improve documentation of check_receiver_arg().
  audiod: get_time_string() comment fix.
  configure: Really print opus audio file handler if opus lib was found.
  Overhaul doxygen main page.
  afs.h: Don't try to list all supported audio formats.
  Change copyright year to 2014.
  Add link to sideband.h in doxygen main page.
  Doxify error2.c and add GPL header.
  Add -Wdeclaration-after-statement.
  Add some missing includes.
  Makefile.real: Add clean2 to the list of phony targets.
  mood.c: Fix a trivial whitespace issue.
  ...

10 years agoMerge branch 't/fade_improvements'
Andre Noll [Sun, 23 Mar 2014 18:21:37 +0000 (19:21 +0100)]
Merge branch 't/fade_improvements'

Cooking since 2014-02-08.

* t/fade_improvements:
  fade: Improve error diagnostics.
  fade: Switch to the fade-in mood *before* sleeping.
  fade: Allow to set more than one channel in sleep mode.
  fade: Implement new mode "set".
  fade: Log to stderr.

Conflicts:
error.h

10 years agoMerge branch 't/aes'
Andre Noll [Sun, 16 Mar 2014 16:49:59 +0000 (17:49 +0100)]
Merge branch 't/aes'

Cooking since 2014-02-02.

* t/aes:
  Implement aes_ctr128 and prefer it over RC4.
  server: Lookup user only once.

10 years agoMerge branch 't/manual_improvements'
Andre Noll [Sun, 9 Mar 2014 14:37:18 +0000 (15:37 +0100)]
Merge branch 't/manual_improvements'

Cooking since 2014-01-25.

* t/manual_improvements:
  manual: Remove outdated sentence about para_afh.
  manual: Add description of ogg/opus.
  manual: Improve troubleshooting section.
  manual: Minor filter text improvement.

10 years agoMerge branch 't/cmd_improvements'
Andre Noll [Thu, 27 Feb 2014 18:10:55 +0000 (19:10 +0100)]
Merge branch 't/cmd_improvements'

Cooking since 2014-01-16.

* t/cmd_improvements:
  afs.cmd: Strip redundant "sort" from ls help output.
  audiod.cmd: Improve grab client help text.
  afs.cmd: Improve second level indenting.
  afd.cmd: Fix a trivial whitespace issue.

10 years agoMerge branch 't/sync'
Andre Noll [Sat, 22 Feb 2014 16:29:10 +0000 (17:29 +0100)]
Merge branch 't/sync'

Cooking since 2014-01-14.

* t/sync:
  The sync filter.
  net: Let maksock() callers perform flowopt cleanup.
  net: makesock_addrinfo(): Make socketfd local to the loop.
  net: Let makesock() continue on setsockopt() failure.
  net: Reduce indentation level in makesock_addrinfo().
  net: Further simplify makesock_addrinfo().
  net: Replace the double loop of lookup_address() by a single loop.
  net: makesock(): Combine code for passive sockets.
  net: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR.
  net: Clarify code flow of makesock_addrinfo().
  net: Remove unnecessary condition in makesock_addrinfo().
  net: Remove pointless initialization in makesock_addrinfo().
  net: Kill dead code in makesock_addrinfo().
  net: Remove networking headers from para.h.
  net: Improve error handling of makesock_addrinfo().
  net: Split makesock(), part 2: Introduce makesock_addrinfo().
  net: Split makesock(), part 1: Introduce lookup_address().
  net: Simplify makesock().
  net: Fix parse_url().
  net: Correct \return text of parse_url().

10 years agobuild: Don't link with -lreadline if readline was not found.
Andre Noll [Thu, 13 Feb 2014 17:59:00 +0000 (18:59 +0100)]
build: Don't link with -lreadline if readline was not found.

Currently, if libreadline is not installed, linking fails with

ld: cannot find -lreadline

This patch makes the build succeed by linking para_client, para_audioc
and para_play without readline support in this case.

10 years agoaudiod: Skip NULL pointer check in compute_time_diff().
Andre Noll [Sun, 2 Feb 2014 19:45:08 +0000 (20:45 +0100)]
audiod: Skip NULL pointer check in compute_time_diff().

We never pass a NULL pointer to this function.

10 years agoaudiod: Make compute_time_diff() return void.
Andre Noll [Sun, 2 Feb 2014 19:43:55 +0000 (20:43 +0100)]
audiod: Make compute_time_diff() return void.

Its single caller does not care about the return value.

10 years agocom_stat(): Remove pointless uptime variable.
Andre Noll [Wed, 29 Jan 2014 00:26:28 +0000 (01:26 +0100)]
com_stat(): Remove pointless uptime variable.

This variable is set but the content is never used. Drop it.

10 years agogcrypt: Fix gcc warning on Ubuntu Lucid.
Andre Noll [Mon, 27 Jan 2014 13:35:55 +0000 (14:35 +0100)]
gcrypt: Fix gcc warning on Ubuntu Lucid.

For some reason the gcc-4.4.3 that ships with Ubuntu Lucid started
to complain recently:

gcrypt.c: In function ‘mgf1’:
gcrypt.c:101: warning: ISO C90 forbids mixed declarations and code

It turned out that a double semicolon is responsible for the
warning. This patch removes the duplicate.

10 years agoflac: Try to link also without -logg.
Andre Noll [Mon, 27 Jan 2014 12:54:49 +0000 (13:54 +0100)]
flac: Try to link also without -logg.

If libflac was compiled without ogg support, the build system should
include flac even if libogg is not installed. Currently this does
not work because the autoconf test tries to link with -logg, so it
always fails if libogg is not available.

Fix this by trying both with and without libogg.

10 years agoversion.c: Fix comment of version_single_line().
Andre Noll [Tue, 7 Jan 2014 19:13:41 +0000 (19:13 +0000)]
version.c: Fix comment of version_single_line().

Codenames are no longer used.

10 years agodoxygen: Expand all macros, in particular config.h.
Andre Noll [Mon, 20 Jan 2014 20:44:54 +0000 (21:44 +0100)]
doxygen: Expand all macros, in particular config.h.

This improves the generated documentation web pages since now all
HAVE_XXX macros of config.h are taken into account.

10 years agorecv_common.c: Improve documentation of check_receiver_arg().
Andre Noll [Wed, 8 Jan 2014 06:00:36 +0000 (06:00 +0000)]
recv_common.c: Improve documentation of check_receiver_arg().

Drop meaningless "and further are present", and note that the "real"
type of the returned pointer depends on the receiver.

10 years agoaudiod: get_time_string() comment fix.
Andre Noll [Thu, 2 Jan 2014 05:47:03 +0000 (05:47 +0000)]
audiod: get_time_string() comment fix.

10 years agoconfigure: Really print opus audio file handler if opus lib was found.
Andre Noll [Sun, 5 Jan 2014 21:59:55 +0000 (21:59 +0000)]
configure: Really print opus audio file handler if opus lib was found.

This is the second time this bug shows up. It was fixed ad0da073 but
re-introduced in the merge commit b5c6af5c. See also 40439a77.

10 years agoOverhaul doxygen main page.
Andre Noll [Fri, 3 Jan 2014 05:59:22 +0000 (05:59 +0000)]
Overhaul doxygen main page.

It got way too large, and contained quite a few links to .c files
whose doxygen page is not very interesting. For example, the doxygen
page of the .c files of filters, receivers and writers contain only
the init function since all other functions are static.

This commit limits the number of links on the main page considerably.
The new page tries to focus on important data structures and APIs
and does not strive for completeness.

10 years agoafs.h: Don't try to list all supported audio formats.
Andre Noll [Fri, 3 Jan 2014 05:52:22 +0000 (05:52 +0000)]
afs.h: Don't try to list all supported audio formats.

10 years agoChange copyright year to 2014.
Andre Noll [Wed, 1 Jan 2014 00:00:34 +0000 (00:00 +0000)]
Change copyright year to 2014.

This year, we're really on time. The changes in this patch were
created by the following silly script:

    files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll')
    sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files
    sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files

10 years agoAdd link to sideband.h in doxygen main page.
Andre Noll [Sun, 29 Dec 2013 16:38:53 +0000 (16:38 +0000)]
Add link to sideband.h in doxygen main page.

It is an essential part of the client/server communication, and is
well documented to boot.

10 years agoDoxify error2.c and add GPL header.
Andre Noll [Sun, 29 Dec 2013 16:26:24 +0000 (16:26 +0000)]
Doxify error2.c and add GPL header.

Also add a link to the file in the doxygen main page.

10 years agoAdd -Wdeclaration-after-statement.
Andre Noll [Sun, 29 Dec 2013 14:53:15 +0000 (14:53 +0000)]
Add -Wdeclaration-after-statement.

We don't have (and don't want to have) declarations after
statements. This change helps to keep it this way.

10 years agoAdd some missing includes.
Andre Noll [Sun, 29 Dec 2013 14:32:43 +0000 (14:32 +0000)]
Add some missing includes.

Letting .c files include their "own" header file guarantees that the
declaration in the header file stays in sync with the definition.

Eventually we may even enable gcc's -Wmissing-declarations, but
we're not there yet, mainly due to command handlers, init functions
and completers.

Note that including signal.h in signal.c required two other includes
since the header file defines a task structure.

10 years agoMakefile.real: Add clean2 to the list of phony targets.
Andre Noll [Sun, 29 Dec 2013 13:35:07 +0000 (13:35 +0000)]
Makefile.real: Add clean2 to the list of phony targets.

We don't want to create a file named clean2.

10 years agomood.c: Fix a trivial whitespace issue.
Andre Noll [Sun, 29 Dec 2013 13:21:07 +0000 (13:21 +0000)]
mood.c: Fix a trivial whitespace issue.

10 years agoProvide new screenshots.
Andre Noll [Sun, 29 Dec 2013 13:20:41 +0000 (13:20 +0000)]
Provide new screenshots.

The old ones were more than 4 years old. There is no huge difference though.

10 years agoRemove old changelog files.
Andre Noll [Sun, 29 Dec 2013 01:45:49 +0000 (01:45 +0000)]
Remove old changelog files.

This simplifies Makefile.real a bit, and of course it's still in the
git history in case somebody is really that interested in the ancient
history of this project.

10 years agoRemove convert_0.3-0.4.sh.
Andre Noll [Sun, 29 Dec 2013 01:41:07 +0000 (01:41 +0000)]
Remove convert_0.3-0.4.sh.

The database layout hasn't changed since 0.4.0, and nobody should
run paraslash-3.x.x anymore.

10 years agoRename command_util.sh -> command_util.bash.
Andre Noll [Sun, 29 Dec 2013 01:39:36 +0000 (01:39 +0000)]
Rename command_util.sh -> command_util.bash.

It's a bash script which wouldn't run properly under general POSIX
shells.

10 years agoRemove __malloc attribute from para_realloc().
Andre Noll [Wed, 1 Jan 2014 20:14:42 +0000 (20:14 +0000)]
Remove __malloc attribute from para_realloc().

This attribute tells the compiler that the returned pointer cannot
alias any other pointer. This is not the case for para_realloc().

10 years agoweb: Remove "/" character in <br> elements.
Andre Noll [Mon, 30 Dec 2013 01:00:40 +0000 (01:00 +0000)]
web: Remove "/" character in <br> elements.

'br' is an empty element, i.e., it can take no content and it may not
have an end tag.  Indeed, the W3C Markup Validation Service complains
about this:

Line 33, Column 42: NET-enabling start-tag requires SHORTTAG YES

This bug was introduced in commit 607d79aa (web: Unify <br>
elements. 2013-08).

10 years agoNEWS: Add download links for 0.5.1.
Andre Noll [Sun, 29 Dec 2013 02:57:56 +0000 (02:57 +0000)]
NEWS: Add download links for 0.5.1.

This should have been done in the release commit of course.

10 years agoRemove trailing dot at the end of purpose texts.
Andre Noll [Sun, 29 Dec 2013 01:31:18 +0000 (01:31 +0000)]
Remove trailing dot at the end of purpose texts.

This looks ugly in the man pages where the purpose is listed in
parentheses. Most of these texts are not even full sentences.

10 years agoInclude options for receivers/filters/writer in man pages
Andre Noll [Sun, 29 Dec 2013 01:28:41 +0000 (01:28 +0000)]
Include options for receivers/filters/writer in man pages

This broke in v0.5.0 when we started to create the man pages in a
way that works also in a cross-compile setup.

This fix introduces a new script man_util.bash which does the real
work and hides all the ugliness from the Makefiles.

10 years agoMerge branch 'refs/heads/t/clang_warning_fixes'
Andre Noll [Thu, 13 Feb 2014 07:36:03 +0000 (08:36 +0100)]
Merge branch 'refs/heads/t/clang_warning_fixes'

Was cooking since 2014-01-14.

1b9e28 command.c: Silence clang warning.
994e72 udp_recv: Fix clang warning.
c853e7 aac_afh: Fix clang warning.

10 years agofade: Improve error diagnostics.
Andre Noll [Thu, 26 Dec 2013 13:35:08 +0000 (13:35 +0000)]
fade: Improve error diagnostics.

This adds a new generic error code "invalid mixer channel", which is
returned from both ALSA and OSS in case the specified mixer channel
could not be set.

Prior to this patch, ALSA would return a bad channel error also when
the given value was out of range. This is fixed by replacing the now
unused ALSA_MIX_BAD_ELEM error code by the new ALSA_MIX_RANGE code.

Finally, para_fade is changed to no longer print the list of available
channels after it failed to set the initial mode.

10 years agofade: Switch to the fade-in mood *before* sleeping.
Andre Noll [Sun, 6 Oct 2013 09:54:55 +0000 (11:54 +0200)]
fade: Switch to the fade-in mood *before* sleeping.

This way the fade-in mood is active when para_fade is interrupted
during the sleep.

Currently sweet_dreams() calls change_afs_mode_and_play(),
which switches to a different mood and changes the mood directly
thereafter. For the new sematics we need to separate the two
actions though. Hence change_afs_mode_and_play() is renamed to
change_afs_mode(), and it now performs the mood switching part
only. Its two callers are modified to call client_cmd("play")
themselves.

This allows to call change_afs_mode() before we go to sleep and
client_cmd("play") on wake up.

10 years agofade: Allow to set more than one channel in sleep mode.
Andre Noll [Wed, 11 Sep 2013 19:48:07 +0000 (19:48 +0000)]
fade: Allow to set more than one channel in sleep mode.

This makes --ivol a string option which may be specified multiple
times, each with its own channel:value pair. The channel part is
optional, invalid channels are ignored.

This change retains backwards-compatibility, i.e. providing a single
value without "channel:" prefix still works as before.

Unfortunately the patch is a bit large since set_channel() had to be
moved to the top of fade.c. This function grew another argument to
specify the channel to set.

10 years agoImplement aes_ctr128 and prefer it over RC4.
Andre Noll [Mon, 2 Dec 2013 21:18:57 +0000 (22:18 +0100)]
Implement aes_ctr128 and prefer it over RC4.

This adds the aes_ctr128 stream cipher to para_server, para_client
and para_audiod. para_server now announces this cipher as a supported
feature and para_client requests an aes_ctr128-encrypted session
if the server supports it. If one or both sides don't understand
the new feature, the RC4 fallback applies. So this change is
backwards-compatible.

Both gcrypt and openssl support aes_ctr128, and the two implementations
are compatible to each other: a para_client linked against openssl can
talk to a para_server which was linked against libgcrypt and vice versa.

This patch also updates the documentation to talk about stream
ciphers and session keys rather than to mention RC4 explicitly. A
short section on AES is added which also explains how counter mode
turns a block cipher into a stream cipher.

10 years agomanual: Remove outdated sentence about para_afh.
Andre Noll [Sat, 28 Dec 2013 15:48:34 +0000 (15:48 +0000)]
manual: Remove outdated sentence about para_afh.

Commit 06f33ca1 (2011-08) removed the streaming mode of para_afh,
but the documentation was not updated to reflect this change.

10 years agomanual: Add description of ogg/opus.
Andre Noll [Thu, 26 Dec 2013 00:54:13 +0000 (00:54 +0000)]
manual: Add description of ogg/opus.

Also mention in the speex section that speex was obsoleted by opus.

10 years agomanual: Improve troubleshooting section.
Andre Noll [Thu, 26 Dec 2013 00:52:40 +0000 (00:52 +0000)]
manual: Improve troubleshooting section.

These days all para_* commands support --help and --detailed-help.
Also add a note how to restart para_audiod after a crash.

10 years agoafs.cmd: Strip redundant "sort" from ls help output.
Andre Noll [Fri, 20 Dec 2013 22:44:57 +0000 (23:44 +0100)]
afs.cmd: Strip redundant "sort" from ls help output.

The sentences before this table make it clear that these options
change the sort order.

10 years agoaudiod.cmd: Improve grab client help text.
Andre Noll [Fri, 20 Dec 2013 22:25:25 +0000 (23:25 +0100)]
audiod.cmd: Improve grab client help text.

The shortened text does not mention file descriptors any more, it
should be easier to understand.

Also reformat the text slightly.

10 years agoafs.cmd: Improve second level indenting.
Andre Noll [Fri, 20 Dec 2013 22:08:48 +0000 (23:08 +0100)]
afs.cmd: Improve second level indenting.

Currently we have an empty line between each item, mainly to make sure
that man pages including the html version look nice. However, indenting
by spaces and dropping the empty lines looks better in the plaintext
version (help output) while still keeping help2man and man2html happy.

10 years agoafd.cmd: Fix a trivial whitespace issue.
Andre Noll [Fri, 20 Dec 2013 22:10:31 +0000 (23:10 +0100)]
afd.cmd: Fix a trivial whitespace issue.

10 years agomanual: Minor filter text improvement.
Andre Noll [Wed, 25 Dec 2013 17:05:42 +0000 (17:05 +0000)]
manual: Minor filter text improvement.

"Being installed" is kind of redundant here.

10 years agoThe sync filter.
Andre Noll [Fri, 6 Sep 2013 23:28:35 +0000 (23:28 +0000)]
The sync filter.

This adds a new filter for synchronization between clients. It works
by sending an UDP packet to other clients ("buddies").

To reduce latency, address resolution is only performed once on
startup.  Hence lookup_address() and makesock_addrinfo() of net.c
are made public.

This commit introduces new public function sockaddr_equal() in
net.c which compares two IPv4 or IPv6 addresses. It is used in
sync_find_buddy().

10 years agonet: Let maksock() callers perform flowopt cleanup.
Andre Noll [Sun, 8 Sep 2013 07:31:37 +0000 (07:31 +0000)]
net: Let maksock() callers perform flowopt cleanup.

Currently the flowopt user allocates the flowopt structure but
cleanup is performed in makesock(). This commit makes the API
symmetric by dropping the cleanup part in makesock() and exporting
flowopt_cleanup(). Now callers have to perform both the allocation
and the cleanup.

The single user (ddcp_recv) is adjusted accordingly.

10 years agonet: makesock_addrinfo(): Make socketfd local to the loop.
Andre Noll [Sun, 8 Sep 2013 06:45:13 +0000 (06:45 +0000)]
net: makesock_addrinfo(): Make socketfd local to the loop.

And rename it to fd, as there is no other file descriptor in this
function.

10 years agonet: Let makesock() continue on setsockopt() failure.
Andre Noll [Sun, 8 Sep 2013 05:21:22 +0000 (05:21 +0000)]
net: Let makesock() continue on setsockopt() failure.

If the setsockopt() call succeeds but the following bind() fails, we
happily continue to process the address info structure. It seems wrong
to abort the loop if setsockopt() could not enable SO_REUSEADDR. Just
continue in this case.

10 years agonet: Reduce indentation level in makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 05:16:46 +0000 (05:16 +0000)]
net: Reduce indentation level in makesock_addrinfo().

Handle the active socket case of makesock_addrinfo() first, i.e.
transform

if (a)
lots_of_stuff;
else
short;
into

if (!a) {
short;
continue;
}
lots_of_stuff;

10 years agonet: Further simplify makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 05:10:29 +0000 (05:10 +0000)]
net: Further simplify makesock_addrinfo().

Instead of breaking out of the loop, we may as well return the
appropriate value directly.

10 years agonet: Replace the double loop of lookup_address() by a single loop.
Andre Noll [Sun, 8 Sep 2013 04:57:50 +0000 (04:57 +0000)]
net: Replace the double loop of lookup_address() by a single loop.

10 years agonet: makesock(): Combine code for passive sockets.
Andre Noll [Sun, 8 Sep 2013 04:37:30 +0000 (04:37 +0000)]
net: makesock(): Combine code for passive sockets.

Make use of  the fact that

if (a && b)
foo;
if (a)
bar;
else
baz;

is equivalent to

if (a) {
if (b)
foo;
bar;
} else
baz;

but the second form is easier to read, IMHO.

10 years agonet: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR.
Andre Noll [Sun, 8 Sep 2013 04:33:29 +0000 (04:33 +0000)]
net: Change makesock_addrinfo() to set given flowopts before SO_REUSEADDR.

Should not matter but allows to combine the code that follows.

10 years agonet: Clarify code flow of makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 04:27:26 +0000 (04:27 +0000)]
net: Clarify code flow of makesock_addrinfo().

src != NULL is equivalent to passive, and dst != NULL equivalent
to !passive.

10 years agonet: Remove unnecessary condition in makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 04:22:29 +0000 (04:22 +0000)]
net: Remove unnecessary condition in makesock_addrinfo().

This code is executed only if src != NULL, which implies dst == NULL.

10 years agonet: Remove pointless initialization in makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 04:18:07 +0000 (04:18 +0000)]
net: Remove pointless initialization in makesock_addrinfo().

10 years agonet: Kill dead code in makesock_addrinfo().
Andre Noll [Sun, 8 Sep 2013 04:15:31 +0000 (04:15 +0000)]
net: Kill dead code in makesock_addrinfo().

Either src or dst is NULL, hence the condition is never true.

10 years agonet: Remove networking headers from para.h.
Andre Noll [Sat, 7 Sep 2013 02:00:20 +0000 (02:00 +0000)]
net: Remove networking headers from para.h.

Most files don't need these, so include all headers related to
networking in each individual file.

10 years agonet: Improve error handling of makesock_addrinfo().
Andre Noll [Sat, 7 Sep 2013 00:13:51 +0000 (00:13 +0000)]
net: Improve error handling of makesock_addrinfo().

Rename rc to ret, and always set this variable so that an appropriate
error code will be returned in all cases.

10 years agocommand.c: Silence clang warning.
Andre Noll [Fri, 27 Dec 2013 23:54:42 +0000 (23:54 +0000)]
command.c: Silence clang warning.

command.c:562:32: warning: Null pointer passed as an argument to a 'nonnull' parameter
        return send_sb(&cc->scc, msg, strlen(msg), SBD_OUTPUT, false);

Harmless, the newly added assert() makes scan-build STFU.

10 years agofade: Implement new mode "set".
Andre Noll [Sun, 8 Sep 2013 00:37:29 +0000 (00:37 +0000)]
fade: Implement new mode "set".

While setting the value of a mixer channel has always been possible
using --fade with a zero timeout, this method is somewhat tedious. This
patch introduces the new "set" mode for this purpose.

10 years agofade: Log to stderr.
Andre Noll [Sat, 7 Sep 2013 23:23:14 +0000 (23:23 +0000)]
fade: Log to stderr.

Uunlike all other commands of the paraslash suite, the log function of
para_fade writes to stdout rather than stderr. Make it log to stderr
for the sake of consistency.

10 years agonet: Split makesock(), part 2: Introduce makesock_addrinfo().
Andre Noll [Sat, 7 Sep 2013 00:05:40 +0000 (00:05 +0000)]
net: Split makesock(), part 2: Introduce makesock_addrinfo().

This extracts the addressinfo part of makesock() into the new
makesock_addrinfo().  Hence makesock() becomes a simple function
which first calls lookup_address(), then makesock_addrinfo().

The two helper functions lookup_address() and makesock_addrinfo()
can be made public once there is a need for them.

10 years agonet: Split makesock(), part 1: Introduce lookup_address().
Andre Noll [Fri, 6 Sep 2013 23:17:42 +0000 (23:17 +0000)]
net: Split makesock(), part 1: Introduce lookup_address().

The lookup part is relatively independent and might be useful on its
own, so create lookup_address().

10 years agonet: Simplify makesock().
Andre Noll [Fri, 6 Sep 2013 23:17:17 +0000 (23:17 +0000)]
net: Simplify makesock().

l3type is always AF_UNSPEC in this function.

10 years agonet: Fix parse_url().
Andre Noll [Fri, 6 Sep 2013 22:36:36 +0000 (22:36 +0000)]
net: Fix parse_url().

Does not correctly parse host, if given array has no extra
space.

10 years agonet: Correct \return text of parse_url().
Andre Noll [Fri, 6 Sep 2013 20:21:33 +0000 (20:21 +0000)]
net: Correct \return text of parse_url().

The parameter is called port rather than portnum. Reformat
the paragraph and fix the font type of NULL while we are at
it.

10 years agoserver: Lookup user only once.
Andre Noll [Mon, 2 Dec 2013 18:52:35 +0000 (19:52 +0100)]
server: Lookup user only once.

parse_auth_request() already sets cc->u, there is no need to call it
again here.

10 years agoreset version to 'git'
Andre Noll [Fri, 20 Dec 2013 13:15:24 +0000 (14:15 +0100)]
reset version to 'git'

10 years agoparaslash 0.5.1 v0.5.1
Andre Noll [Fri, 20 Dec 2013 13:12:07 +0000 (14:12 +0100)]
paraslash 0.5.1

10 years agoMerge branch 't/build_system_overhaul'
Andre Noll [Fri, 20 Dec 2013 12:39:49 +0000 (13:39 +0100)]
Merge branch 't/build_system_overhaul'

This topic was quite some PITA to maintain since its commits heavily
conflict with the changes of all other topic branches which touch
the build system. Cooking since 2013-12-01 and tested on FreeBSD,
NetBSD and on different Linux systems.

abb080 Rebuild error2.h on Makefile changes.
71b616 manual: Move crypt library to the list of optional packages.
185c67 build: Don't insist on curses for CLI support.
474d4d build: Rewrite objlist_to_errlist().
1453e8 build: Reorder Makefile.real.
7fb39c build: Split Makefile.in.
d0ddd2 build: Reorder variables in Makefile.in.
61cc38 build: Add Make variable for clock_gettime_ldflags.
976651 build: Add Make variable for PACKAGE_TARNAME.
19b0d3 build: Introduce Make variables for objects.
fe7666 build: Combine link rules.
2440c4 build: Introduce $prefixed_executables.
2f113b build: Combine rules for object files.
761d9b build: Define Make variables for cppflags.
386572 build: Remove two unused variables from Makefile.in.
40439a build: Collect audio format handlers in afh section.
e926e8 build: Move relevant parts to filter section.
b399d6 build: Move relevant parts to gui section.
1781cc build: Move relevant parts to fade section.
0f4790 build: Move relevant parts to audiod section.
4e9788 build: Move relevant parts to client section.
0c8626 build: Move relevant parts to server section.
755904 build: Create section for para_audioc.
d952d6 build: Create section for para_write.
9734df build: Create section for para_play.
14dee3 build: Create section for para_afh.
b1abc2 build: Create section for para_recv.
bfd5b5 build: Create section for para_filter.
9139d9 build: ldflags conversion: coreaudio.
30f966 build: ldflags conversion: libcurses.
15880b build: ldflags conversion: libnsl.
516421 build: ldflags conversion: libsocket.
ce8273 build: ldflags conversion: libgcrypt.
ad3573 build: ldflags conversion: libssl.
52ac85 build: ldflags conversion: libosl.
37083e build: ldflags conversion: libsamplerate.
7de07a build: ldflags conversion: libreadline.
0e9f1c build: ldflags conversion: libao.
ecac89 build: ldflags conversion: alsa.
6c632d build: ldflags conversion: liboss.
e74262 build: ldflags conversion: libflac.
648197 build: ldflags conversion: libmad.
91ed86 build: ldflags conversion: libfaad.
8ee713 build: ldflags/cppflags conversion: libopus.
b6c705 build: cppflags/ldflags conversion: libspeex.
7aa414 build: ldflags conversion: libvorbis.
80a639 build: ldflags conversion: libogg.
c79cdc build: cppflags/ldflags conversion: libid3tag
a02396 build: Remove duplicates from $all_objs.
d2fc4d build: Remove inactive DEBUG_CPPFLAGS.
e8f310 build: Replace error2.pl by error2.c.
06e33e build: Fix filter output of configure summary.
994889 build: Convert remaining object lists to one object per line format.
782e47 build: Separate curses detection from gui configuration.
fbe4b0 build: Move down fade section.
003815 build: Add object "cmdline" suffix only once.
3097e5 INSTALL: Add an example for cross-compiling.
e8b555 build: Fix make install for cross builds.
aab667 build: Generate man pages directly from ggo files.
9a8a15 build: Remove fnmatch, malloc, realloc tests.
2dcdd9 build: Make crypto optional.
f23353 build: Make audiod optional.
98b801 build: Build para_client only if crypto lib was found.
17ed11 build: Create a separate section for para_server.
02c1e0 build: Compute $all_errlist_objs.
4ec04c build: Replace $extras by per-executable variable.
39707e build: Remove two dead recipes from Makefile.in.
9fc99c build: Remove check for buggy snprintf().

10 years agoMerge branch 't/opusdec-latency'
Andre Noll [Fri, 20 Dec 2013 12:28:15 +0000 (13:28 +0100)]
Merge branch 't/opusdec-latency'

A single patch which was cooking since 2013-11-17 with no problems.

14c16b opusdec: Latency improvements.

10 years agoRebuild error2.h on Makefile changes.
Andre Noll [Fri, 20 Dec 2013 10:29:58 +0000 (11:29 +0100)]
Rebuild error2.h on Makefile changes.

Re-running configure without a subsequent make clean currently fails if
the set of objects has changed since the last run. This happens for
example if a different cryptolib was requested with --enable-cryptolib,
or if different libraries were detected by configure.

The problem is that error2.h is not updated according to the new
set of objects. Letting error2.h depend on Makefile should fix it,
because configure creates Makefile, so error2.h will be recreated
after reconfiguring.

10 years agoMerge branch 't/aft_cleanups'
Andre Noll [Wed, 18 Dec 2013 20:15:22 +0000 (21:15 +0100)]
Merge branch 't/aft_cleanups'

Was cooking since 2013-11-10.

fb4022 aft: Make get_afsi_of_path() static.
89d124 aft: Make load_afsi() and safe_afsi() static.
5a63e0 aft: Make get_afsi_object_of_row() static.

10 years agoudp_recv: Fix clang warning.
Andre Noll [Sun, 17 Nov 2013 22:54:44 +0000 (23:54 +0100)]
udp_recv: Fix clang warning.

clang does not seem to like adding to a string literal:

udp_recv.c:51:45: warning: adding 'size_t' (aka 'unsigned long') to a string does not append to the string [-Wstring-plus-int]
if (memcmp(iov[1].iov_base, FEC_EOF_PACKET + iov[0].iov_len,
    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
udp_recv.c:51:45: note: use array indexing to silence this warning

That's kind of silly, but if this simple change makes clang happy,
so be it.

10 years agoaac_afh: Fix clang warning.
Andre Noll [Sun, 17 Nov 2013 22:52:15 +0000 (23:52 +0100)]
aac_afh: Fix clang warning.

Although gcc seems to have no problem with it, clang complains about
illegal characters in string literals of aac_afh.c:

aac_afh.c:114:25: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
if (!atom_cmp(type1, "<A9>ART"))
      ^~~~
aac_afh.c:116:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>alb"))
   ^~~~
aac_afh.c:118:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>nam"))
   ^~~~
aac_afh.c:120:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>cmt"))
   ^~~~
aac_afh.c:122:30: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
else if (!atom_cmp(type1, "<A9>day"))

This patch encodes the offending value as "\xa9" to make clang happy,

10 years agoMerge branch 't/flacdec_fixes'
Andre Noll [Thu, 12 Dec 2013 08:11:07 +0000 (09:11 +0100)]
Merge branch 't/flacdec_fixes'

Cooking since 2013-10-27.

6da1ca flacdec: Fix DECODER_ABORTED handling.
76a2c8 flacdec: Avoid busy loop.
a1beef flacdec: Fix mono output.
8633a2 flacdec: Avoid declaration after statement.
464648 flacdec: Improve documentation of unconsumed.
c2d841 fd.c: Fix bad English in comment.

10 years agomanual: Move crypt library to the list of optional packages.
Andre Noll [Sun, 1 Dec 2013 18:13:01 +0000 (19:13 +0100)]
manual: Move crypt library to the list of optional packages.

Commit 2dcdd92c made crypto an optional feature. So this item should
go to the list of optional packages.

10 years agobuild: Don't insist on curses for CLI support.
Andre Noll [Sun, 1 Dec 2013 11:11:46 +0000 (12:11 +0100)]
build: Don't insist on curses for CLI support.

On systems without curses headers/libs, support for interactive
cli tools is deactivated and a message is shown which claims that
readline depends on the curses library. This is not true: readline
uses the termcap functions, but does not link with the termcap or
curses library itself.  Applications must choose an appropriate
library that provides these functions.

This change should enable readline support on systems that have
libtermcap but no curses library.

10 years agobuild: Rewrite objlist_to_errlist().
Andre Noll [Sun, 1 Dec 2013 00:13:56 +0000 (01:13 +0100)]
build: Rewrite objlist_to_errlist().

This function of configure.ac was defined as a single line with 225
characters. Splitting it into three smaller parts makes it readable
again.

10 years agobuild: Reorder Makefile.real.
Andre Noll [Sun, 15 Sep 2013 03:08:40 +0000 (03:08 +0000)]
build: Reorder Makefile.real.

Trivial cleanup. Only code move, no actual changes.

10 years agobuild: Split Makefile.in.
Andre Noll [Sun, 15 Sep 2013 02:39:11 +0000 (02:39 +0000)]
build: Split Makefile.in.

This trims down Makefile.in to contain only the initializations of
Make variables with their autoconf counterpart. The new Makefile.real
contains the second part, including all recipes.

With this commit, Makefile.in needs to be changed only when
configure.ac introduces new variables. In this case a full
autoconf, configure, make cycle is necessary anyway. However, if
only Makefile.real changes, a simple make run should be enough to
update everything.

10 years agobuild: Reorder variables in Makefile.in.
Andre Noll [Sun, 15 Sep 2013 02:35:25 +0000 (02:35 +0000)]
build: Reorder variables in Makefile.in.

Move down derived variables so that the top of Makefile.in consists
only of definitions of Make variables from autoconf variables.

10 years agobuild: Add Make variable for clock_gettime_ldflags.
Andre Noll [Sun, 15 Sep 2013 02:24:57 +0000 (02:24 +0000)]
build: Add Make variable for clock_gettime_ldflags.

Another autoconf variable reference bites the dust.

10 years agobuild: Add Make variable for PACKAGE_TARNAME.
Andre Noll [Sun, 15 Sep 2013 02:23:10 +0000 (02:23 +0000)]
build: Add Make variable for PACKAGE_TARNAME.

This gets rid of two more references to autoconf variables.

10 years agobuild: Introduce Make variables for objects.
Andre Noll [Sun, 15 Sep 2013 02:18:44 +0000 (02:18 +0000)]
build: Introduce Make variables for objects.

The definition of the various foo_objs variables still refers to the
autoconf variables. Having a make variable for each set of object is
another step towards the separation of autoconf and make.

10 years agobuild: Combine link rules.
Andre Noll [Sat, 14 Sep 2013 06:53:59 +0000 (06:53 +0000)]
build: Combine link rules.

Due to the cleanups in the previous patches, all rules for linking
have become identical. Hence we may replace all of them by a single
one.

10 years agobuild: Introduce $prefixed_executables.
Andre Noll [Sun, 15 Sep 2013 01:30:27 +0000 (01:30 +0000)]
build: Introduce $prefixed_executables.

Currently $executables contains the full basename of all
executables (para_server, para_client, ...), while the autoconf
variable @executables@ is used for the variants without the "para_"
prefix. This is rather confusing, so introduce $prefixed_executables
and stop using the @executables@ variant in Make recipes.

10 years agobuild: Combine rules for object files.
Andre Noll [Sun, 15 Sep 2013 01:19:50 +0000 (01:19 +0000)]
build: Combine rules for object files.

Currently we have many similar recipes for compiling object files from
.c files that need non-standard CPPFLAGS. All rules are identical
except that different additional options to the $(CC) command are
required to build the object file. These additional options are
provided through various $(foo_cppflags) variables.

This commit avoids this duplication by adding the necessary flags to
CPPFLAGS instead. This way we can use the same rule for all object
files.

10 years agobuild: Define Make variables for cppflags.
Andre Noll [Sun, 15 Sep 2013 00:35:36 +0000 (00:35 +0000)]
build: Define Make variables for cppflags.

As a first step towards separating autoconf output variables and Make
recipes, this commit defines Make variables for all cppflags at the
top of Makefile.in and avoids @variable@ constructs in Make rules.

As an additional benefit, this improves readability of the generated
Makefile.

10 years agobuild: Remove two unused variables from Makefile.in.
Andre Noll [Sat, 14 Sep 2013 16:57:26 +0000 (16:57 +0000)]
build: Remove two unused variables from Makefile.in.

PKGDATADIR and PACKAGE_STRING are defined but never used. Remove them.

10 years agobuild: Collect audio format handlers in afh section.
Andre Noll [Sat, 14 Sep 2013 03:58:49 +0000 (03:58 +0000)]
build: Collect audio format handlers in afh section.

The afh section is the natural place to define this variable.

10 years agobuild: Move relevant parts to filter section.
Andre Noll [Sat, 14 Sep 2013 04:02:18 +0000 (04:02 +0000)]
build: Move relevant parts to filter section.

This code deals with variables and defines for the various filters,
so it should go to the filter section.

10 years agobuild: Move relevant parts to gui section.
Andre Noll [Sat, 14 Sep 2013 04:00:46 +0000 (04:00 +0000)]
build: Move relevant parts to gui section.

The definition of gui_objs and INIT_GUI_ERRLISTS belongs to the
gui section so move it there.

10 years agobuild: Move relevant parts to fade section.
Andre Noll [Sat, 14 Sep 2013 03:47:56 +0000 (03:47 +0000)]
build: Move relevant parts to fade section.

configure.ac already has a section for para_fade, but the construction
of $fade_errlist_objs was still spread out over the whole file. Move
everything to the existing section and remove @fade_ldflags@.

This also kills the $mixer_summary variable, which was not very useful.