paraslash.git
9 years agomanual: Shorten Installation section.
Andre Noll [Sat, 3 Jan 2015 04:27:21 +0000 (04:27 +0000)]
manual: Shorten Installation section.

This section contains some information which is already mentioned in
the previous section on required and optional packages. This patch
gets rid of the redundant parts.

9 years agomanual: Simplify keygen command.
Andre Noll [Mon, 5 Jan 2015 03:07:49 +0000 (03:07 +0000)]
manual: Simplify keygen command.

Specifying an empty passphrase with -N '' is simpler than asking
the user to press enter twice. This commit also improves the note on
short keys slightly.

9 years agomanual: Shorten section on generating RSA keys.
Andre Noll [Sat, 3 Jan 2015 04:31:47 +0000 (04:31 +0000)]
manual: Shorten section on generating RSA keys.

Remove the text about keys generated with "openssl genrsa". Such keys
are deprecated and support for them will eventually be removed.

This also removes the sentence about 0.3.x keys.

9 years agosync_filter: Document sync_parse_config().
Andre Noll [Sat, 3 Jan 2015 05:46:42 +0000 (05:46 +0000)]
sync_filter: Document sync_parse_config().

This should help to understand the lifetime of the various structures
of the sync filter.

9 years agofilter.c: Add documentation of stat_item_values[].
Andre Noll [Fri, 2 Jan 2015 01:38:06 +0000 (01:38 +0000)]
filter.c: Add documentation of stat_item_values[].

9 years agoafs.c: Improve documentation of send_option_arg_callback_request().
Andre Noll [Sun, 11 Jan 2015 13:24:14 +0000 (14:24 +0100)]
afs.c: Improve documentation of send_option_arg_callback_request().

The new text tries to emphasize that arbitrary structures may be
passed from the command handler to the callback (*not* the parent
process).

9 years agomood.c: Improve documentation of struct admissible_file_info.
Andre Noll [Fri, 2 Jan 2015 01:27:15 +0000 (01:27 +0000)]
mood.c: Improve documentation of struct admissible_file_info.

9 years agoaft.c: Improve documentation of struct ls_widths.
Andre Noll [Sun, 21 Dec 2014 17:42:00 +0000 (17:42 +0000)]
aft.c: Improve documentation of struct ls_widths.

9 years agotime.c: Remove unused d2tv().
Andre Noll [Thu, 1 Jan 2015 18:12:25 +0000 (18:12 +0000)]
time.c: Remove unused d2tv().

Found by cppcheck.

9 years agoversion.c: Remove unused version_git().
Andre Noll [Thu, 1 Jan 2015 18:21:55 +0000 (18:21 +0000)]
version.c: Remove unused version_git().

Found by cppcheck.

9 years agosched.c: Remove unused timeout_is_zero().
Andre Noll [Thu, 1 Jan 2015 18:20:39 +0000 (18:20 +0000)]
sched.c: Remove unused timeout_is_zero().

Found by cppcheck.

9 years agonet.c: Remove unused local_name().
Andre Noll [Thu, 1 Jan 2015 18:19:13 +0000 (18:19 +0000)]
net.c: Remove unused local_name().

Found by cppcheck.

9 years agodaemon.c: Remove unused daemon_clear_flag().
Andre Noll [Thu, 1 Jan 2015 18:15:21 +0000 (18:15 +0000)]
daemon.c: Remove unused daemon_clear_flag().

Found by cppcheck.

9 years agoscore.c: Remove unused admissible_file_loop_reverse().
Andre Noll [Thu, 1 Jan 2015 18:09:46 +0000 (18:09 +0000)]
score.c: Remove unused admissible_file_loop_reverse().

Found by cppcheck.

9 years agodaemon.c: Avoid setlinebuf().
Andre Noll [Fri, 2 Jan 2015 19:52:52 +0000 (19:52 +0000)]
daemon.c: Avoid setlinebuf().

Using setvbuf() is equivalent, and more portable. See setbuf(3)
for details.

9 years agofade.c: Don't use asctime().
Andre Noll [Thu, 1 Jan 2015 17:49:06 +0000 (17:49 +0000)]
fade.c: Don't use asctime().

POSIX.1-2008 marks asctime() as obsolete.

Found by cppcheck.

9 years agomm.c: Kill pointless initialization.
Andre Noll [Thu, 1 Jan 2015 18:00:07 +0000 (18:00 +0000)]
mm.c: Kill pointless initialization.

"ret" is set in the first statement after the declarations.

Found by cppcheck.

9 years agoRemove some unused error codes.
Andre Noll [Thu, 1 Jan 2015 22:30:30 +0000 (22:30 +0000)]
Remove some unused error codes.

Although E_AMP_SYNTAX and E_PREBUFFER_SYNTAX are assigned to a
variable, in both cases the variable is set to a different value
later without being used in between (detected by cppcheck).

9 years agoRemove unnecessary system header includes.
Andre Noll [Fri, 2 Jan 2015 02:05:40 +0000 (02:05 +0000)]
Remove unnecessary system header includes.

All these headers get included from para.h.

9 years agoRemove some duplicate #include statements.
Andre Noll [Thu, 1 Jan 2015 23:07:45 +0000 (23:07 +0000)]
Remove some duplicate #include statements.

9 years agoaudiod.h: Remove stale declaration of clean_exit().
Andre Noll [Thu, 1 Jan 2015 23:21:24 +0000 (23:21 +0000)]
audiod.h: Remove stale declaration of clean_exit().

The function was removed last year in commit 751fface.

9 years agoAssorted typo fixes in comments.
Andre Noll [Sun, 21 Dec 2014 13:16:14 +0000 (13:16 +0000)]
Assorted typo fixes in comments.

Quite a few..

9 years agoaft.c: Trivial whitespace fixes.
Andre Noll [Sun, 21 Dec 2014 13:24:41 +0000 (13:24 +0000)]
aft.c: Trivial whitespace fixes.

9 years agoafh.h: Trivial whitespace fix.
Andre Noll [Sun, 21 Dec 2014 13:12:08 +0000 (13:12 +0000)]
afh.h: Trivial whitespace fix.

9 years agoerror.h: Trivial typo and whitespace cleanups.
Andre Noll [Mon, 22 Dec 2014 00:56:46 +0000 (00:56 +0000)]
error.h: Trivial typo and whitespace cleanups.

9 years agoFix typo in manual.m4.
Andre Noll [Fri, 2 Jan 2015 15:24:37 +0000 (15:24 +0000)]
Fix typo in manual.m4.

9 years agoFix typo in --sample-format and --sample-rate documentation.
Andre Noll [Fri, 2 Jan 2015 00:18:47 +0000 (00:18 +0000)]
Fix typo in --sample-format and --sample-rate documentation.

9 years agoNEWS: Add link name in target.
Andre Noll [Sun, 4 Jan 2015 02:47:01 +0000 (02:47 +0000)]
NEWS: Add link name in target.

Without this, the link is shown as

 releases/paraslash-git.tar.bz2

9 years agonet.c: Fix format string in stringify_port().
Andre Noll [Thu, 1 Jan 2015 18:02:04 +0000 (18:02 +0000)]
net.c: Fix format string in stringify_port().

"port" is int, rather than unsigned. No biggy since at this point we
already know that port > 0.

Found by cppcheck.

9 years agogcrypt: Fix format string in debug output.
Andre Noll [Thu, 1 Jan 2015 17:57:50 +0000 (17:57 +0000)]
gcrypt: Fix format string in debug output.

"len" is of type int, not unsigned.

Found by cppcheck.

9 years agosync filter: Fix memory leak.
Andre Noll [Sun, 4 Jan 2015 02:45:38 +0000 (02:45 +0000)]
sync filter: Fix memory leak.

We leaked a struct sync_buddy for every audio file. Freeing the
structure in sync_close_buddy() should close this leak.

9 years agoaft: Generate a remove event when adding duplicate files.
Andre Noll [Wed, 24 Dec 2014 15:10:43 +0000 (15:10 +0000)]
aft: Generate a remove event when adding duplicate files.

Consider the following scenario:

add /foo.mp3
add /bar.mp3 # assume foo and bar differ
cp /foo.mp3 /bar.mp3
add /bar.mp3

In the last add command, the path being added (/bar.mp3) already exists
in the audio file table, and its hash also exists for a different path
(/foo.mp3).

The code in aft.c is smart enough to detect this. It first removes
the existing entry for /bar.mp3 and then considers the addition of
/bar.mp3 as a file rename /foo.mp3 -> /bar.mp3.

Unfortunately, we miss to generate the remove event in this case. This
patch should fix it. It also improves the message a bit.

9 years agocommand.c: Add missing items to EMPTY_STATUS_ITEMS.
Andre Noll [Tue, 23 Dec 2014 01:13:25 +0000 (01:13 +0000)]
command.c: Add missing items to EMPTY_STATUS_ITEMS.

Without this, para_gui shows stale information when no audio file
is open.

Add a doxygen comment to the macro while at it.

9 years agoaft.c: Don't call osl_close_disk_object() on failure.
Andre Noll [Sun, 21 Dec 2014 14:35:19 +0000 (14:35 +0000)]
aft.c: Don't call osl_close_disk_object() on failure.

If osl_open_disk_object() fails, we branch to the "err" label where
osl_close_disk_object() is called although no disk object exists. Fix
this by simply returning the osl error code in this case.

9 years agoAdd missing osl() wrapper calls.
Andre Noll [Sun, 21 Dec 2014 14:28:34 +0000 (14:28 +0000)]
Add missing osl() wrapper calls.

Some calls to osl library functions were missing the osl() wrapper
which transforms the osl error code into a paraslash error code.
This results in an incorrect error message on failure or worse.

print_chunk_table() and open_and_update_audio_file() of aft.c are
affected as well as the xxx_create() functions of blob.c.

9 years agofd.c: Add missing va_end().
Andre Noll [Thu, 1 Jan 2015 17:32:36 +0000 (17:32 +0000)]
fd.c: Add missing va_end().

This bug was introduced three years ago in commit 3e6bba77.

Found by cppcheck.

9 years agoMerge branch 'refs/heads/t/com_tasks'
Andre Noll [Sun, 14 Dec 2014 20:48:06 +0000 (21:48 +0100)]
Merge branch 'refs/heads/t/com_tasks'

cooking for almost a month.

9 years agoMerge branch 'refs/heads/t/kill_usleep'
Andre Noll [Sun, 14 Dec 2014 20:47:37 +0000 (21:47 +0100)]
Merge branch 'refs/heads/t/kill_usleep'

9 years agobuild: Add missing cpp flags.
Andre Noll [Sun, 7 Dec 2014 19:33:57 +0000 (20:33 +0100)]
build: Add missing cpp flags.

The directories passed as arguments to --with-flac-headers,
--with-samplerate-headers and --with-readline-headers are searched
for header files at configure time, but we ignore these directories
when compiling the source tree. This commit should fix this.

9 years agoMerge branch 'refs/heads/t/build_system'
Andre Noll [Sun, 7 Dec 2014 14:29:17 +0000 (15:29 +0100)]
Merge branch 'refs/heads/t/build_system'

Cooking for more than a month.

* t/build_system:
  Add message to target maintainer-clean.
  Use git version for tarball and AC_INIT().
  Run autom4te instead of autoconf.
  Remove depend.sh.
  Simplify make clean.
  Do not create .d files for gengetopt source files.
  Introduce cmdlist_dir.
  Remove pointless autoconf checks.
  Avoid excessive dep generation on Makefile changes.
  Add -Wformat to STRICT_CFLAGS.
  Compile with -Wall -Wunused only on linux.
  Separate CPPFLAGS and CFLAGS.
  Rename DEBUG_CPPFLAGS to STRICT_CFLAGS.
  Only compile with osl_cppflags where necessary.
  Remove pointless -r option to cp for target tarball.
  Make tarball commands quiet.
  Do not opencode $(tarball).
  Run tr only once in configure.ac.
  Silence ggo_descriptions_declared command.
  Call AC_CONFIG_HEADERS rather than AM_CONFIG_HEADER.
  Remove duplicate -Wno-unused-function.
  Honor --with-xxx-headers also for dependencies.

9 years agoMerge branch 't/sound_device_lock'
Andre Noll [Sun, 23 Nov 2014 16:06:04 +0000 (17:06 +0100)]
Merge branch 't/sound_device_lock'

Cooking since 2014-09-22.

* t/sound_device_lock:
  oss: Avoid sound artefacts on some setups.
  oss: Introduce sound device lock.
  audiod: Invalidate current audio format on close.

9 years agoserver: Add com_tasks().
Andre Noll [Sun, 28 Sep 2014 17:02:46 +0000 (17:02 +0000)]
server: Add com_tasks().

It is sometimes useful to see the task list of para_server. The
infrastructure for obtaining this information is already in sched.c,
so this is a rather simple matter.

9 years agocommand.c: Trivial whitespace fixes.
Andre Noll [Sun, 28 Sep 2014 16:55:58 +0000 (16:55 +0000)]
command.c: Trivial whitespace fixes.

No actual changes.

9 years agoMerge branch 'maint'
Andre Noll [Sun, 16 Nov 2014 09:36:05 +0000 (10:36 +0100)]
Merge branch 'maint'

9 years agocommand.c: Replace usleep() by nanosleep().
Andre Noll [Sun, 26 Oct 2014 10:36:35 +0000 (11:36 +0100)]
command.c: Replace usleep() by nanosleep().

POSIX.1-2001 declares usleep() obsolete and POSIX.1-2008 removes the
specification. Fortunately, there is only a single user of usleep()
in the tree: com_sender() which needs to retry the command if another
sender command is currently running. This commit changes com_sender()
to call nanosleep() instead of usleep() and adds a comment which
explains why we are going to sleep at this point.

9 years agobuild: Add message to target maintainer-clean.
Andre Noll [Sat, 30 Aug 2014 18:21:09 +0000 (20:21 +0200)]
build: Add message to target maintainer-clean.

Just to be consistent with clean and distclean. This also makes the
rm commands quiet.

9 years agobuild: Use git version for tarball and AC_INIT().
Andre Noll [Sun, 3 Aug 2014 09:44:48 +0000 (11:44 +0200)]
build: Use git version for tarball and AC_INIT().

It's kind of silly to use "git" as the version string at all times
except for releases. This commit changes the name of the generated
tarball to use the output of git describe. Hence the "tarball"
target creates a tarball named according to the current git HEAD. For
compatibility we provide a symlink with the old name.

9 years agobuild: Run autom4te instead of autoconf.
Andre Noll [Sun, 20 Apr 2014 02:03:39 +0000 (02:03 +0000)]
build: Run autom4te instead of autoconf.

This is equivalent, except we have the option to disable the autom4te
cache. This cache does not give significant speedups but creates the
annoying directory.

9 years agobuild: Remove depend.sh.
Andre Noll [Sat, 12 Jul 2014 11:40:44 +0000 (13:40 +0200)]
build: Remove depend.sh.

This script was rather clumsy, and it referred to gcc rather than
$(CC) as it should be. This commit adds a command to Makefile.real
that generates the .d files directly, which is not more complicated.

Use the opportunity to add -MP to the $(CC) command which generates
the dependency files. This option works around make errors in case
a header file is removed from the tree.

This change gives another speedup of ~15% for make dep.

9 years agobuild: Simplify make clean.
Andre Noll [Sun, 7 Sep 2014 18:26:22 +0000 (20:26 +0200)]
build: Simplify make clean.

This way, the clean target no longer contains on any variable
from autoconf.

9 years agobuild: Do not create .d files for gengetopt source files.
Andre Noll [Sat, 12 Jul 2014 09:50:02 +0000 (11:50 +0200)]
build: Do not create .d files for gengetopt source files.

The generated *.cmdline* files do not depend on headers of the source
tree, so it is pointless to let the compiler create dependencies
for them.

This speeds up make dep by 25%.

9 years agobuild: Introduce cmdlist_dir.
Andre Noll [Sun, 20 Apr 2014 02:03:09 +0000 (02:03 +0000)]
build: Introduce cmdlist_dir.

This puts all files generated by command_util.bash into a new
subdirectory inside the build directory. This way we don't need
to special-case these files any more in .gitignore, Doxyfile, make
clean. The compiler and depend.sh need to know this directory, so
we add -I$(cmdlist_dir) to CPPFLAGS and introduce a new parameter
for depend.sh.

To prevent cpp from including stale versions of the *command_list.h
files in the top level directory (left over from a previous build)
this commit renames the generated files slightly. For example,
audiod_completion.h becomes audiod.completion.h.

9 years agobuild: Remove pointless autoconf checks.
Andre Noll [Sun, 20 Apr 2014 00:20:12 +0000 (00:20 +0000)]
build: Remove pointless autoconf checks.

These checks never fail on any reasonably current system and
probably have never failed on any system this software was ever
compiled. Removing the checks reduces the configure time to 60%, so..

9 years agobuild: Avoid excessive dep generation on Makefile changes.
Andre Noll [Sun, 20 Apr 2014 00:55:12 +0000 (00:55 +0000)]
build: Avoid excessive dep generation on Makefile changes.

Letting error2 depend on config.h instead of Makefile should be no
worse, and it does not cause all dependencies to be recreated in the
common case where config.h remains unchanged after reconfiguration.

9 years agobuild: Add -Wformat to STRICT_CFLAGS.
Andre Noll [Sun, 4 May 2014 19:30:04 +0000 (21:30 +0200)]
build: Add -Wformat to STRICT_CFLAGS.

Avoids

cc1: warning: -Wformat-security ignored without -Wformat

on NetBSD

9 years agobuild: Compile with -Wall -Wunused only on linux.
Andre Noll [Sun, 4 May 2014 19:27:21 +0000 (21:27 +0200)]
build: Compile with -Wall -Wunused only on linux.

On *BSD the old set of CFLAGS causes warnings of the form

/usr/pkg/include/vorbis/vorbisfile.h:75:21: warning: 'OV_CALLBACKS_DEFAULT' defined but not used
/usr/pkg/include/vorbis/vorbisfile.h:82:21: warning: 'OV_CALLBACKS_NOCLOSE' defined but not used
/usr/pkg/include/vorbis/vorbisfile.h:89:21: warning: 'OV_CALLBACKS_STREAMONLY' defined but not used
/usr/pkg/include/vorbis/vorbisfile.h:96:21: warning: 'OV_CALLBACKS_STREAMONLY_NOCLOSE' defined but not used

This commit avoids these warnings by enabling -Wall and -Wunused only
on Linux systems. Let's also collect these flags in STRICT_CFLAGS
rather than CFLAGS to avoid warnings when compiling the *.cmdline.c
files.

9 years agobuild: Separate CPPFLAGS and CFLAGS.
Andre Noll [Sat, 19 Apr 2014 23:38:04 +0000 (23:38 +0000)]
build: Separate CPPFLAGS and CFLAGS.

The CPPFLAGS variable should consist of preprocessor options only and
should not contain any compiler options. Clearly this is not the case
at the moment.

This commit cleans up the mess and separates the per target CFLAGS
settings from the CPPFLAGS settings.

9 years agobuild: Rename DEBUG_CPPFLAGS to STRICT_CFLAGS.
Andre Noll [Sat, 19 Apr 2014 23:22:53 +0000 (23:22 +0000)]
build: Rename DEBUG_CPPFLAGS to STRICT_CFLAGS.

This variable is a misnomer for two reasons: First, its purpose is
unrelated to debugging. We just prefer to compile our own source
files with more strict flags than the flags used for the generated
*.cmdline.c files. Compiling those with the strict flags would
result in warnings we can not fix anyway. Second, these flags are
no preprocessor flags but compiler flags. So STRICT_CFLAGS is more
appropriate than DEBUG_CPPFLAGS.

9 years agobuild: Only compile with osl_cppflags where necessary.
Andre Noll [Sat, 19 Apr 2014 23:22:18 +0000 (23:22 +0000)]
build: Only compile with osl_cppflags where necessary.

Currently we include $(osl_cppflags) in the CC command used to compile
all objects, regardless of whether the command needs these flags. This
commit changes Makefile.real to add the flags only for those objects
which actually include osl.h.

9 years agobuild: Remove pointless -r option to cp for target tarball.
Andre Noll [Sun, 21 Sep 2014 18:54:55 +0000 (20:54 +0200)]
build: Remove pointless -r option to cp for target tarball.

We copy two regular files here, so there is no need to copy recursively.

9 years agobuild: Make tarball commands quiet.
Andre Noll [Sun, 24 Aug 2014 19:23:11 +0000 (21:23 +0200)]
build: Make tarball commands quiet.

There is no need to print all commands, unless V=1 is given
to make.

9 years agobuild: Do not opencode $(tarball).
Andre Noll [Sat, 19 Apr 2014 23:00:24 +0000 (23:00 +0000)]
build: Do not opencode $(tarball).

In Makefile.real the $tarball variable is defined as
$(tarball_pfx).tar.bz2. Use this definition instead of repeating it.

9 years agobuild: Run tr only once in configure.ac.
Andre Noll [Sat, 19 Apr 2014 22:53:00 +0000 (22:53 +0000)]
build: Run tr only once in configure.ac.

The configure script creates the subsystem error enums for config.h
from the list of object file names by turning the base name into
upper case and prepending "SS_". For the conversion to upper case we
currently execute the tr command once for each object.

This patch changes the corresponding shell code of configure.ac to
first build the full enum and then turn all words into upper case
in one go. This way tr is only executed once which should save us a
few cycles.

9 years agobuild: Silence ggo_descriptions_declared command.
Andre Noll [Sun, 4 May 2014 19:28:16 +0000 (21:28 +0200)]
build: Silence ggo_descriptions_declared command.

This command makes the build output a bit noisy.

9 years agobuild: Call AC_CONFIG_HEADERS rather than AM_CONFIG_HEADER.
Andre Noll [Wed, 27 Aug 2014 19:58:31 +0000 (21:58 +0200)]
build: Call AC_CONFIG_HEADERS rather than AM_CONFIG_HEADER.

The AM_CONFIG_HEADER autoconf macro is obsolete.

9 years agobuild: Remove duplicate -Wno-unused-function.
Andre Noll [Thu, 24 Jul 2014 20:05:56 +0000 (22:05 +0200)]
build: Remove duplicate -Wno-unused-function.

We compile the .c files generated by gengetopt with this option to
silence a compiler warning. The option is first added to CPPFLAGS
and then specified again in the rule for the *.cmdline.o target. This
gets rid of the second instance.

9 years agobuild: Honor --with-xxx-headers also for dependencies.
Andre Noll [Thu, 24 Jul 2014 20:47:23 +0000 (22:47 +0200)]
build: Honor --with-xxx-headers also for dependencies.

This is necessary for depend.sh to do the right thing. Without it the
generated dependency files may contain a reference to a system header.

9 years agoMerge branch 't/audiod_exit_cleanup'
Andre Noll [Sun, 26 Oct 2014 12:11:41 +0000 (13:11 +0100)]
Merge branch 't/audiod_exit_cleanup'

Cooked for two months.

* t/audiod_exit_cleanup:
  audiod: Clean up by notifying tasks.

9 years agoMerge branch 'refs/heads/t/server_cmds'
Andre Noll [Thu, 9 Oct 2014 21:37:09 +0000 (21:37 +0000)]
Merge branch 'refs/heads/t/server_cmds'

Was cooking for three weeks.

* Add sender subcommand "status".
* com_si(): Don't print git version string.
* Doxify the sender_subcommand enum.
* Overhaul help texts of server and afs commands.
* com_sender: Replace memcpy by struct copy.

Conflicts:
command.c

9 years agoMerge branch 't/kill_sender_osl_dep'
Andre Noll [Mon, 29 Sep 2014 20:00:01 +0000 (20:00 +0000)]
Merge branch 't/kill_sender_osl_dep'

Was cooking for three weeks.

* t/kill_sender_osl_dep:
  Make senders independent of afs and osl.

9 years agooss: Avoid sound artefacts on some setups.
Andre Noll [Mon, 8 Sep 2014 20:38:35 +0000 (22:38 +0200)]
oss: Avoid sound artefacts on some setups.

Large buffers which result in short writes cause sound artefacts on
certain setups. For example, 22KHz audio on Linux/ALSA in OSS mode
is affected.

This patch caps the number of bytes to write to the maximum possible
value. This value is obtained through the SNDCTL_DSP_GETOSPACE ioctl.

9 years agooss: Introduce sound device lock.
Andre Noll [Tue, 15 Apr 2014 13:18:45 +0000 (13:18 +0000)]
oss: Introduce sound device lock.

Unlike ALSA with dmix, the OSS driver allows only a single opener of
the sound device at any given time. With para_audiod it may happen
that the writer of the buffer tree for the next audio file tries to
open the device while the old writer is still active. If this happens,
the second writer fails to open the device which causes the whole
buffer tree to be aborted.

This patch serializes access to the OSS sound device by adding
a locking mechanism to oss_write.c. Since audiod is single threaded
this is rather simple: The lock is taken in oss_post_select() when
the device is opened. It is released in oss_close() after the file
descriptor has been closed.

9 years agoaudiod: Invalidate current audio format on close.
Andre Noll [Fri, 5 Sep 2014 07:09:03 +0000 (09:09 +0200)]
audiod: Invalidate current audio format on close.

Without this, audiod might start the next decoder instance too early,
using the audio format of the current file. The oss writer seems to
be particularly prone in triggering this.

9 years agoMerge branch 't/mvblob_improvement'
Andre Noll [Sun, 14 Sep 2014 17:01:47 +0000 (19:01 +0200)]
Merge branch 't/mvblob_improvement'

Cooking for two months.

* t/mvblob_improvement:
  mvblob: Improve error diagnostics.

9 years agoMake senders independent of afs and osl.
Andre Noll [Sat, 26 Jul 2014 11:51:35 +0000 (13:51 +0200)]
Make senders independent of afs and osl.

Although senders don't know anything about the osl databases of
the audio file selector, all senders currently include afs.h and
osl.h. This is because:

* senders are part of para_server, so they include server.h,

* server.h has an audio_file_data structure embedded in struct
misc_meta_data, so struct audio_file_data must be declared
before server.h is included,

* struct audio_file_data is declared in afs.h,

* afs.h makes use of structures defined in <osl.h>.

This patch moves the declaration of struct audio_file_data from afs.h
to afh.h, which is also included by all senders. This allows to remove
the two include directives for afs.h and osl.h from all three senders.

9 years agoplay: Fix next and prev on singular playlists.
Andre Noll [Fri, 5 Sep 2014 23:20:55 +0000 (01:20 +0200)]
play: Fix next and prev on singular playlists.

The next and prev commands do not reset the file position if
the playlist consists of one file only. This fixes it.

9 years agoFix typo in logfile.m4.
Andre Noll [Wed, 27 Aug 2014 19:44:34 +0000 (21:44 +0200)]
Fix typo in logfile.m4.

Also add a full stop at the end of the sentence.

9 years agoAdd htacess and icons for fancy indexing.
Andre Noll [Tue, 12 Aug 2014 13:01:59 +0000 (15:01 +0200)]
Add htacess and icons for fancy indexing.

The apache server on people.tuebingen.mpg.de has FancyIndexing via
mod_autoindex enabled. Let's use its features to provide a nicer view
of the download directory.

This adds two .png icons for tarballs and signatures, respectively.
These icons are listed in the new .htaccess file to instruct apache
to show the icons next to the download links, along with a file
description.

On the old page files were listed alphabetically. So one had to scroll
to the bottom to get to the newest tarball link. FancyIndexing lets us
specify the sort order and we use this feature to show new files first.

9 years agoUpdate web URLs to tuebingen.mpg.de.
Andre Noll [Sun, 17 Aug 2014 17:20:58 +0000 (19:20 +0200)]
Update web URLs to tuebingen.mpg.de.

systemlinux.org has been down for a while. Meanwhile the paraslash
web pages have been set up at a new location hosted by the MPI campus
of Tübingen.

This commit lists the alternative URLs in README, INSTALL and manual.

9 years agodoc: Change email address to maan@tuebingen.mpg.de
Andre Noll [Sat, 9 Aug 2014 10:49:56 +0000 (12:49 +0200)]
doc: Change email address to maan@tuebingen.mpg.de

The mail server on systemlinux.org was down for more than a week
lately, so let's use an alternative official address.  This commit
changes all maan@systemlinux.org addresses to maan@tuebingen.mpg.de.

Most .c and .h files contain the email address in the copyright header,
so they must all be patched. Three other files contain the address
for a different reason:

* README lists email and git, gitweb and home page URLs
* configure.ac needs it for configure -h
* version.c contains it for the -V option of all commands

9 years agoChange osl links to new location.
Andre Noll [Sat, 9 Aug 2014 10:47:25 +0000 (12:47 +0200)]
Change osl links to new location.

The osl web pages have been moved to people.tuebingen.mpg.de. This
adjusts the three links in the repository accordingly.

9 years agoMove git services to tuebingen.mpg.de.
Andre Noll [Sun, 17 Aug 2014 17:22:01 +0000 (19:22 +0200)]
Move git services to tuebingen.mpg.de.

Both the gitweb and the git daemon service have been relocated to
tuebingen.mpg.de. This commit changes the git-related URLs in the
repository to their counterparts at the new location.

The new location does not have a gitweb page dedicated to paraslash
alone. Instead, the gitweb service is provided by the gitolite
instance at git.tuebingen.mpg.de which hosts also a couple of other
repositories.

The "Changes" link of the the menu of the paraslash web pages points
to the dedicated gitweb page, so this link is removed from the menu.
There is still a gitweb link on the download page and a new one in
the README file.

Without a dedicated gitweb page, parts of the para.css style sheet
are no longer needed. This patch removes these parts, along with
git-logo.png, header and footer, which also have become unused.

9 years agoweb: Fix logo link.
Andre Noll [Tue, 12 Aug 2014 08:52:07 +0000 (10:52 +0200)]
web: Fix logo link.

The correct destination for this link is the current directory,
rather than /. The latter works only by coincidence since
paraslash.systemlinux.org is an apache vhost.

9 years agoMerge branch 't/daemon_cleanups'
Andre Noll [Sun, 17 Aug 2014 11:17:23 +0000 (13:17 +0200)]
Merge branch 't/daemon_cleanups'

Cooking for two months.

* daemon: Rename public functions.
* Simplify set_server_start_time().

Conflicts:
server.c

9 years agoAdd sender subcommand "status".
Andre Noll [Thu, 19 Jun 2014 09:46:31 +0000 (11:46 +0200)]
Add sender subcommand "status".

Currently, the si (server info) command prints information about each
sender, like the number of connected clients and the access control
lists. As this information is related to senders, the sender command
seems to be a better fit.

This commit introduces the new sender subcommand "status" for this
purpose and changes com_si() to not print the sender information any
more, making the output of com_si() bounded.  It also renames the
->info() function of the senders to ->status() to make it clear that
this function is related to the new status subcommand.

The Networking paragraph of the manual is adjusted accordingly and
now contains an example of the status command.

9 years agocom_si(): Don't print git version string.
Andre Noll [Thu, 19 Jun 2014 09:47:16 +0000 (11:47 +0200)]
com_si(): Don't print git version string.

We have com_version() for this.

9 years agoDoxify the sender_subcommand enum.
Andre Noll [Sun, 13 Apr 2014 23:19:26 +0000 (23:19 +0000)]
Doxify the sender_subcommand enum.

This adds comments to all sender commands and switches to a named enum.

9 years agoOverhaul help texts of server and afs commands.
Andre Noll [Sun, 13 Apr 2014 21:44:36 +0000 (21:44 +0000)]
Overhaul help texts of server and afs commands.

Each server command has a brief help text which is printed by
para_client help <command> and is also included in the para_server
manual page. These texts are defined in server.cmd and afs.cmd and
haven't seen much love for a long time. This commit improves most of
them and also fixes some formating issues.

9 years agocom_sender: Replace memcpy by struct copy.
Andre Noll [Sun, 13 Apr 2014 23:02:56 +0000 (23:02 +0000)]
com_sender: Replace memcpy by struct copy.

This is equivalent and a bit easier to read.

9 years agoaudiod: Clean up by notifying tasks.
Andre Noll [Wed, 1 Jan 2014 22:15:02 +0000 (22:15 +0000)]
audiod: Clean up by notifying tasks.

There are two ways to terminate para_audiod in a controlled way:
by executing the "term" command and by sending SIGINT or SIGTERM
to the process. Currently both code paths call clean_exit() from
some ->post_select function, which terminates para_audiod by calling
exit(3). Despite the name, this is "unclean" because tasks are not shut
down properly, so not all memory can be freed by this approach. While
this is not a big problem, it makes it more difficult to debug real
memory leaks.

This patch tries to overcome this problem by using notifications to
shut down the audiod tasks. Two new error codes E_AUDIOD_TERM and
E_AUDIOD_SIGNAL are introduced for the notification values. All tasks
are modified to check for notifications and now return the (negative)
notification value from their ->post_select() method if a notification
was received. Hence schedule() returns to main() and we may clean up
the resources allocated by the scheduler by calling sched_shutdown(),
along with the usual cleanup performed by clean_exit(). The latter
function is renamed to audiod_cleanup(), which is more to the point.

9 years agoweb: Top-align menu items.
Andre Noll [Tue, 12 Aug 2014 06:47:52 +0000 (08:47 +0200)]
web: Top-align menu items.

Without this, elinks shows the menu items centered with respect to the
main web page. As most pages are short, this is not a real problem. But
for the longer NEWS page the menu was shown in the middle of the page,
making it hard to navigate.

9 years agomanual: Add libopus-dev to package list for the impatient.
Andre Noll [Mon, 11 Aug 2014 16:30:41 +0000 (18:30 +0200)]
manual: Add libopus-dev to package list for the impatient.

Although the opus libraries are not included in the two distributions
on which the paraslash code is build and tested regularly (Ubuntu 10.04
and 12.04), it is available on the newer 14.04 (Trusty) version. Most
people probably run 14.04 by now, so let's include it in the manual.

9 years agoreset version to 'git'
Andre Noll [Fri, 1 Aug 2014 12:28:39 +0000 (14:28 +0200)]
reset version to 'git'

9 years agoparaslash 0.5.3 v0.5.3
Andre Noll [Fri, 1 Aug 2014 12:23:58 +0000 (14:23 +0200)]
paraslash 0.5.3

9 years agobuild: Do not hardcode gcc in depend.sh.
Andre Noll [Thu, 24 Jul 2014 20:42:28 +0000 (22:42 +0200)]
build: Do not hardcode gcc in depend.sh.

Although the clang compiler understands the -MM and -MG options,
we currently rely on gcc to generate the dependency files. Of course
this fails on systems where only clang is installed. The right fix
would be to use the make variable $(CC), but let's go for the minimal
fix that replaces gcc by cc in depend.sh for now.

9 years agobuild: Properly unset CPPFLAGS, LDFLAGS, LIBS.
Andre Noll [Sun, 20 Apr 2014 20:50:45 +0000 (20:50 +0000)]
build: Properly unset CPPFLAGS, LDFLAGS, LIBS.

Currently the directories specified via --with-ogg-headers and
--with-ogg-libs are taken into account also for vorbis/speex/opus
detection. This patch makes sure we start with a pristine values
for the three variables.

9 years agobuild: Compilie opus*.c files with ogg_cppflags.
Andre Noll [Thu, 24 Jul 2014 21:01:09 +0000 (23:01 +0200)]
build: Compilie opus*.c files with ogg_cppflags.

These files include ogg/ogg.h, so we must pass $(ogg_cppflags)
to avoid build failure in case ogg headers are installed at a
non-standard location.

9 years agobuild: Fix --with-gcrypt-headers and --with-vorbis-headers.
Andre Noll [Fri, 2 May 2014 20:07:24 +0000 (22:07 +0200)]
build: Fix --with-gcrypt-headers and --with-vorbis-headers.

The configure script sets the autoconf output variable gcrypt_cppflags
according to the configure option --with-gcrypt-headers, but
gcrypt_cppflags is never used for the build.  Hence, if libgcrypt is
installed in a non-standard location, and that location is specified
as the argument to --with-gcrypt-headers, configure detects the gcrypt
header correctly, but the build fails nevertheless.

The same type of bug also exists for the --with-vorbis-headers option.

To fix this omission this patch sets both variables in Makefile.in
and references it in Makefile.real to compile the affected objects
with the correct flags.

9 years agoMerge branch 'refs/heads/t/play_fix'
Andre Noll [Thu, 31 Jul 2014 06:59:47 +0000 (08:59 +0200)]
Merge branch 'refs/heads/t/play_fix'

Cooking since two weeks.

* 9c1aa5 Never start playback at an empty chunk.

Conflicts:
afh_recv.c

9 years agoMerge branch 't/recv_fix'
Andre Noll [Thu, 31 Jul 2014 06:06:21 +0000 (08:06 +0200)]
Merge branch 't/recv_fix'

Cooking for two months.

* t/recv_fix:
  recv: Don't segfault on invalid chunk values.