paraslash.git
10 years agobuffer_tree: Improve documentation of btr_no_parent().
Andre Noll [Wed, 4 Sep 2013 22:13:49 +0000 (22:13 +0000)]
buffer_tree: Improve documentation of btr_no_parent().

10 years agoAvoid gcc warning on FreeBSD.
Andre Noll [Tue, 23 Jul 2013 07:23:32 +0000 (09:23 +0200)]
Avoid gcc warning on FreeBSD.

FreeBSD 9.1 ships a patched gcc-4.2.1 which complains about use of
an initialized variable:

fd.c: In function 'for_each_file_in_dir':
fd.c:728: warning: 'dir' may be used uninitialized in this function

This warning is bogus since para_opendir() only leaves the dir
pointer unset on failures. But in this case for_each_file_in_dir()
returns early without using the pointer.

This commit changes para_opendir() to set dir to NULL before doing
anything else. This avoids the warning at almost no cost.

10 years agocommand.c: Avoid declaration after statement.
Andre Noll [Mon, 22 Jul 2013 23:22:33 +0000 (01:22 +0200)]
command.c: Avoid declaration after statement.

Fixes

command.c:224:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

10 years agoextract_v4_addr(): Don't return a structure.
Andre Noll [Sat, 6 Jul 2013 14:01:26 +0000 (16:01 +0200)]
extract_v4_addr(): Don't return a structure.

When compiling with -Waggregate-return, gcc issues the following warning:

net.c: In function 'extract_v4_addr':
net.c:682: warning: function returns an aggregate
acl.c: In function 'acl_check_access':
acl.c:60: warning: function call has aggregate value

It's not entirely clear how bad it is these days to return a structure, but
extract_v4_addr() is the only function in the tree which does it. Since it
can be easily changed to take a pointer instead and there is only a single
caller, let's implement it this way.

10 years agocommand.c: Remove pointless initialization.
Andre Noll [Sat, 6 Jul 2013 19:31:11 +0000 (21:31 +0200)]
command.c: Remove pointless initialization.

Found by the clang analyzer:

command.c:934:16: warning: Assigned value is always the same as the existing value
for (i = 0, p = iov->iov_base; p < end; i++)
    ~ ^ ~~~~~~~~~~~~~

clang is right: A couple of lines before the for loop we set p to
iov->iov_base and do not modify it.

10 years agocrypt.c: Remove condition which is always true.
Andre Noll [Sun, 7 Jul 2013 16:51:18 +0000 (18:51 +0200)]
crypt.c: Remove condition which is always true.

rsa can never be NULL here.

10 years agoipc: Close proc fd.
Andre Noll [Sat, 20 Jul 2013 19:08:15 +0000 (21:08 +0200)]
ipc: Close proc fd.

We read shmmax only once, so there is no point in keeping this
file descriptor open forever.

10 years agoMake log functions static.
Andre Noll [Sat, 6 Jul 2013 14:23:31 +0000 (16:23 +0200)]
Make log functions static.

All PARA_XXX_LOG() macros use the public para_log function pointer
for quite some time now, so the actual implementations of the various
log functions can be made static.

10 years agoscore: Improve documentation of score_update().
Andre Noll [Wed, 4 Sep 2013 20:05:00 +0000 (20:05 +0000)]
score: Improve documentation of score_update().

Remove a stray "and" and the list of possible errors, which is not
very useful and possibly incomplete.

10 years agoGIT-VERSION-GEN: Don't include output of git update-index.
Andre Noll [Wed, 4 Sep 2013 21:53:32 +0000 (21:53 +0000)]
GIT-VERSION-GEN: Don't include output of git update-index.

GIT-VERSION-GEN calls git update-index which might write something
like "configure.ac: Needs update" to stdout. We don't want this text
to be part of the version string, so make sure we discard the output
of git update-index.

10 years agoNEWS: Update download links to 0.5.0.
Andre Noll [Fri, 23 Aug 2013 18:20:29 +0000 (20:20 +0200)]
NEWS: Update download links to 0.5.0.

10 years agoreset version to 'git'
Andre Noll [Fri, 23 Aug 2013 18:10:18 +0000 (20:10 +0200)]
reset version to 'git'

10 years agoparaslash 0.5.0 v0.5.0
Andre Noll [Fri, 23 Aug 2013 18:03:42 +0000 (20:03 +0200)]
paraslash 0.5.0

10 years agoMerge branch 't/web_improvements'
Andre Noll [Fri, 23 Aug 2013 17:35:56 +0000 (19:35 +0200)]
Merge branch 't/web_improvements'

The new pages have been tested on slnx with no problems, so they're
ready for prime time.

329719 web: Move menu down a bit.
c6ac6c web: Make image rule global.
c53634 Replace main page by NEWS.
3c2dfc NEWS: Replace "to be announced" text.
c2ea0c web: Add tarball and signature link of recent release to NEWS.
b35afc web: Adjust sizes of monospace fonts.
7fb28a web: Avoid gray area on gitweb page.
f3f978 web: Move important parts of the style sheet to the top of the file.
57058e web: Remove some duplicate rules in para.css.
5005fb web: Combine the two .css files.
d74c89 web: Add header to gitweb and API reference sites.
076b70 web: Increase size of log messages and diffs.
0384fd web: Unify link colors.
893669 web: Fix gitweb link on doxygen pages.
607d79 web: Unify <br> elements.
40ceca web: Remove valign tag in header files.
37bfc1 web: Further unify header.html, header2.html and gitweb_header.html.
197add web: Unify css rules for tables.
21422a web: Remove horizontal line at the top of the page.
53963d web: Remove style element in html.
4c061d web: Make the body selector of the two css files consistent.
f9fadc web: Use lower-case css selectors.
22fb31 web: Increase font size.
2f201d web: css whitespace fixes.
51445c web: Remove commented-out sections of css files.
71d445 web: Remove border="0" tag.
02c1a5 web: Don't set border, cellpadding and cellspacing.
6e0b01 web: Remove basefont tag.
42a4cd Update README.
2210c6 web: Remove explanation of the paraslash acronym.

10 years agoMerge branch 't/image-0.5'
Andre Noll [Fri, 23 Aug 2013 17:33:00 +0000 (19:33 +0200)]
Merge branch 't/image-0.5'

After almost three months we finally got there.

8b7b77 The overwhelming new logo for paraslash.0.5.

10 years agooverview.pdf: Fix overfull lines.
Andre Noll [Fri, 23 Aug 2013 08:57:38 +0000 (10:57 +0200)]
overview.pdf: Fix overfull lines.

The Ubuntu version of dia (which is used to create the public file
on the web page) seems to behave differently than the self-compiled
version used on my development box.

This resulted in a rather strange looking pdf. Fix this by manually
adjusting lines using the Ubuntu version.

10 years agotest suite: Change underscores to dashes also in tests script options.
Andre Noll [Fri, 23 Aug 2013 08:22:29 +0000 (10:22 +0200)]
test suite: Change underscores to dashes also in tests script options.

The previous commit broke t0004. Fix is trivial.

10 years agoChange all multi-word options to dashes instead of underscores.
Andre Noll [Thu, 20 Jun 2013 21:20:13 +0000 (23:20 +0200)]
Change all multi-word options to dashes instead of underscores.

Currently some of these options use dashes to separate the words
while others use the underscore character instead. The auto-generated
--detailed-help option contains a dash, so the only consistent way
is to use dashes everywhere.

Hence this commit replaces all underscores in option names by dashes
and updates the documentation accordingly.

Fortunately, this does not require to change the code, because
gengetopt translates dashes into underscores in the generated C code.
It is, however, an API change, so this is 0.5.0 material.

10 years agoMerge branch 't/dia'
Andre Noll [Thu, 22 Aug 2013 17:07:45 +0000 (19:07 +0200)]
Merge branch 't/dia'

Was cooking since 2013-06-07.

f5fb7a Overview: Add new slides, powered by dia.

10 years agoMerge remote-tracking branch 'refs/remotes/bthcx/master'
Andre Noll [Wed, 21 Aug 2013 18:54:51 +0000 (20:54 +0200)]
Merge remote-tracking branch 'refs/remotes/bthcx/master'

10 years agoMerge branch 't/setatt_fnmatch'
Andre Noll [Wed, 21 Aug 2013 18:49:06 +0000 (20:49 +0200)]
Merge branch 't/setatt_fnmatch'

Was cooking for about two weeks and seems to work fine.

73299e com_setatt(): Allow to specify a file name pattern.
fd5f94 Move com_setatt() from attribute.c to aft.c.
a8573c com_setatt(): Use get_attribute_bitnum_by_name().
47dbd9 Mark buffer pointer of pass_buffer_as_shm() as const.

10 years agoFEATURES: Mention ogg/opus.
Andre Noll [Wed, 21 Aug 2013 08:36:16 +0000 (10:36 +0200)]
FEATURES: Mention ogg/opus.

Support for ogg/opus was added in 0.4.13, but we missed to update the
FEATURES text.

10 years agoMerge branch 't/m4_deps'
Andre Noll [Tue, 20 Aug 2013 19:31:38 +0000 (21:31 +0200)]
Merge branch 't/m4_deps'

This branch was cooking since 2013-08-04 and no problems showed up.

e249d1 Generate ggo dependencies automatically.
8bf727 Add para_ prefix for executables in Makefile.in.

10 years agoweb: Move menu down a bit.
Andre Noll [Sun, 18 Aug 2013 17:20:42 +0000 (19:20 +0200)]
web: Move menu down a bit.

This looks better. It can easily be achieved by adding a <br> tag
before the menu.

10 years agoweb: Make image rule global.
Andre Noll [Sun, 18 Aug 2013 17:15:13 +0000 (19:15 +0200)]
web: Make image rule global.

This way it also applies to the paraslash logo. Without this, old
mozilla browsers show a margin around the image, which looks ugly.

10 years agoReplace main page by NEWS.
Andre Noll [Sun, 18 Aug 2013 16:48:57 +0000 (18:48 +0200)]
Replace main page by NEWS.

The main page listed almost only the releases. This information is
also available through the NEWS menu, so remove the main page and
make NEWS.html the new index.html.

This commit also reorders the menu items and adds the new "Development"
item. This page contains the information on the topic branches which
was previously known as cooking.html.

10 years agoNEWS: Replace "to be announced" text.
Andre Noll [Sun, 18 Aug 2013 15:41:45 +0000 (17:41 +0200)]
NEWS: Replace "to be announced" text.

The new text mentions that the changes listed here have already
been merged to the current master branch, which is more valuable
information.

10 years agoweb: Add tarball and signature link of recent release to NEWS.
Andre Noll [Sun, 18 Aug 2013 15:39:30 +0000 (17:39 +0200)]
web: Add tarball and signature link of recent release to NEWS.

This is a first step to replace the main page.

10 years agoweb: Adjust sizes of monospace fonts.
Andre Noll [Sun, 18 Aug 2013 13:52:40 +0000 (15:52 +0200)]
web: Adjust sizes of monospace fonts.

120% is big enough, let's use this size everywhere.

10 years agoweb: Avoid gray area on gitweb page.
Andre Noll [Sun, 18 Aug 2013 12:40:00 +0000 (14:40 +0200)]
web: Avoid gray area on gitweb page.

Removing this section makes it go away.

10 years agoweb: Move important parts of the style sheet to the top of the file.
Andre Noll [Sun, 18 Aug 2013 12:34:18 +0000 (14:34 +0200)]
web: Move important parts of the style sheet to the top of the file.

10 years agoweb: Remove some duplicate rules in para.css.
Andre Noll [Sun, 18 Aug 2013 12:13:33 +0000 (14:13 +0200)]
web: Remove some duplicate rules in para.css.

10 years agoweb: Combine the two .css files.
Andre Noll [Sun, 18 Aug 2013 12:06:57 +0000 (14:06 +0200)]
web: Combine the two .css files.

Having only one style file avoids to duplicate the rules for common
elements.  This is the result of cat gitweb.css >> para.css plus a
minor fix.

gitweb_config.perl on the destination site, and para_adm have to be
updated at the same time to make this work.

10 years agoweb: Add header to gitweb and API reference sites.
Andre Noll [Sun, 18 Aug 2013 11:47:58 +0000 (13:47 +0200)]
web: Add header to gitweb and API reference sites.

This makes the layout of these two pages identical to the main pages.

10 years agoweb: Increase size of log messages and diffs.
Andre Noll [Sat, 17 Aug 2013 23:59:01 +0000 (01:59 +0200)]
web: Increase size of log messages and diffs.

The size of these was hardcoded to 12px.

10 years agoweb: Unify link colors.
Andre Noll [Sat, 17 Aug 2013 22:45:02 +0000 (00:45 +0200)]
web: Unify link colors.

The color on the gitweb page was slightly different.

10 years agoweb: Fix gitweb link on doxygen pages.
Andre Noll [Sat, 17 Aug 2013 22:33:50 +0000 (00:33 +0200)]
web: Fix gitweb link on doxygen pages.

This did not work on the test instances (it did work on the official
site though).

10 years agoweb: Unify <br> elements.
Andre Noll [Sat, 17 Aug 2013 20:21:14 +0000 (22:21 +0200)]
web: Unify <br> elements.

This caused the menu of the gitweb page to occur at a slightly different
location, which was somewhat annoying.

10 years agoweb: Remove valign tag in header files.
Andre Noll [Sat, 17 Aug 2013 20:05:51 +0000 (22:05 +0200)]
web: Remove valign tag in header files.

It does not belong there and seems to have no effect.

10 years agoweb: Further unify header.html, header2.html and gitweb_header.html.
Andre Noll [Sat, 17 Aug 2013 19:52:48 +0000 (21:52 +0200)]
web: Further unify header.html, header2.html and gitweb_header.html.

Indentation was messed up, and a title tag was missing.

10 years agoweb: Unify css rules for tables.
Andre Noll [Sat, 17 Aug 2013 19:30:43 +0000 (21:30 +0200)]
web: Unify css rules for tables.

10 years agoweb: Remove horizontal line at the top of the page.
Andre Noll [Sat, 17 Aug 2013 19:18:23 +0000 (21:18 +0200)]
web: Remove horizontal line at the top of the page.

The gitweb page does not have this line, and the page looks better
without it.

10 years agoweb: Remove style element in html.
Andre Noll [Sat, 17 Aug 2013 19:15:05 +0000 (21:15 +0200)]
web: Remove style element in html.

10 years agoweb: Make the body selector of the two css files consistent.
Andre Noll [Sat, 17 Aug 2013 19:11:37 +0000 (21:11 +0200)]
web: Make the body selector of the two css files consistent.

10 years agoweb: Use lower-case css selectors.
Andre Noll [Sat, 17 Aug 2013 19:00:54 +0000 (21:00 +0200)]
web: Use lower-case css selectors.

In para.css most css element selectors were in upper case, while
gitweb.css used lower case selectors. This patch makes the two
consistent.

10 years agoweb: Increase font size.
Andre Noll [Sat, 17 Aug 2013 18:45:47 +0000 (20:45 +0200)]
web: Increase font size.

The default value of font-size is medium, which seems to be more appropriate.

10 years agoweb: css whitespace fixes.
Andre Noll [Sat, 17 Aug 2013 18:33:23 +0000 (20:33 +0200)]
web: css whitespace fixes.

Indentation was rather inconsistent.

10 years agoweb: Remove commented-out sections of css files.
Andre Noll [Sat, 17 Aug 2013 18:24:58 +0000 (20:24 +0200)]
web: Remove commented-out sections of css files.

10 years agoweb: Remove border="0" tag.
Andre Noll [Sat, 17 Aug 2013 18:22:10 +0000 (20:22 +0200)]
web: Remove border="0" tag.

Again, this has no effect.

10 years agoweb: Don't set border, cellpadding and cellspacing.
Andre Noll [Sat, 17 Aug 2013 18:19:37 +0000 (20:19 +0200)]
web: Don't set border, cellpadding and cellspacing.

It has (almost) no effect.

10 years agoweb: Remove basefont tag.
Andre Noll [Sat, 17 Aug 2013 18:18:20 +0000 (20:18 +0200)]
web: Remove basefont tag.

This is not needed at all.

10 years agoUpdate README.
Andre Noll [Sat, 17 Aug 2013 18:08:49 +0000 (20:08 +0200)]
Update README.

The README file mentions mp3, ogg/vorbis, aac and wma, but speex,
flac and ogg/opus were all missing.  Do not even try to list the
supported audio formats, it always gets out of sync.

Secondly, since this file will not be processed by grutatxt, it's
pointless to format it according to the grutatxt syntax.

Finally, this change adds the URLs of the web page and the git
repository, as well as my email address.

10 years agoweb: Remove explanation of the paraslash acronym.
Andre Noll [Sun, 18 Aug 2013 17:41:22 +0000 (19:41 +0200)]
web: Remove explanation of the paraslash acronym.

It's kind of lame, so get rid of it.

Conflicts:
README

10 years agoMerge branch 't/remove_sb_compat'
Andre Noll [Sat, 17 Aug 2013 11:57:32 +0000 (13:57 +0200)]
Merge branch 't/remove_sb_compat'

This topic branch was cooking for over 4 months and should now be
ready for prime time. The patches break compatibility with earlier
versions, so we need to bump the version number real soon now.

72ffa7 client: Only start stdin task for addblob commands.
85a6ae Remove old stream cipher API.
d1407f Allow addblob commands to create output.
243e31 client: Remove client_recv_buffer().
277ed4 client: Remove sb-compatibility code.
36ba18 Reject non-sideband connections.
6ca50b blob: Avoid zero sized memcpy().
cf308c Fix typo in documentation of stdin_command().
fdb9d2 blob: Simplify fd2buf().

10 years agocom_setatt(): Allow to specify a file name pattern.
Andre Noll [Mon, 22 Jul 2013 20:10:40 +0000 (22:10 +0200)]
com_setatt(): Allow to specify a file name pattern.

The help text of the setatt command claims that file name patterns
may be specified as arguments. The text also contains an example which
involves a wildcard pattern. However, this never worked as advertised
since the command actually accepts only full paths.

This commit teaches the command to process the given arguments as
patterns by employing the same pattern matching loop that is also
used by other commands.

In addition we now also send a "no matches" message to the client
in case there was no match. Previously the command stayed silent and
terminated successfully in this case.

10 years agoMove com_setatt() from attribute.c to aft.c.
Andre Noll [Mon, 22 Jul 2013 18:41:13 +0000 (20:41 +0200)]
Move com_setatt() from attribute.c to aft.c.

This command operates on rows of the audio file table. Pure code
movement, no changes.

10 years agocom_setatt(): Use get_attribute_bitnum_by_name().
Andre Noll [Mon, 22 Jul 2013 18:36:58 +0000 (20:36 +0200)]
com_setatt(): Use get_attribute_bitnum_by_name().

We have this nice helper, so don't open-code it.

10 years agoMark buffer pointer of pass_buffer_as_shm() as const.
Andre Noll [Mon, 22 Jul 2013 18:29:09 +0000 (20:29 +0200)]
Mark buffer pointer of pass_buffer_as_shm() as const.

10 years agoGenerate ggo dependencies automatically.
Andre Noll [Wed, 19 Jun 2013 18:33:43 +0000 (20:33 +0200)]
Generate ggo dependencies automatically.

Currently we maintain the dependency list of each ggo file manually in
m4/gengetopt/makefile. This is tedious and error-prone, and missing
dependencies result in build failures which are not repeatable and
hard to locate.

This changes the build system to keep track of these dependencies
automatically. We now create one .m4d file for each executable. This
file lists the dependencies of the corresponding ggo file, i.e. those
m4 files which are included in order to make the ggo.

All .m4d files are pulled in from the main Makefile via the -include
directive, in the same way we include the object dependency files
(.d) generated by gcc.

10 years agoAdd para_ prefix for executables in Makefile.in.
Andre Noll [Wed, 19 Jun 2013 18:09:20 +0000 (20:09 +0200)]
Add para_ prefix for executables in Makefile.in.

Using make's $(addprefix) function in Makefile.in is simpler than
implementing our own version in configure.ac.  Moreover, in Makefile.in
we now have access to both the prefixed and the un-prefixed list
of executables.

10 years agoserver/gcrypt: Fix sending the empty status items.
Andre Noll [Mon, 29 Jul 2013 22:44:37 +0000 (00:44 +0200)]
server/gcrypt: Fix sending the empty status items.

When para_server enters the "stopped" state, it needs to inform all
clients which are executing the stat command that no audio file is
currently available.

To this aim the stat command handler calls empty_status_items(), which
creates a buffer containing empty values for most status items. This
function tries to be smart by computing the buffer only once. It
saves a reference in a static variable so that on subsequent calls
it can simply return the same buffer.

This works fine when para_server is compiled against the openssl
crypto library. However, it fails when libgcrypt is used because with
libgcrypt the send buffer is encrypted in-place. Hence on subsequent
calls the already encrypted buffer will be encrypted again, resulting
in garbage being sent to the client.

This patch avoids this bug by using a fresh buffer each time the
empty status items are sent.

10 years agonew codename, reset version to git
Andre Noll [Mon, 29 Jul 2013 13:08:32 +0000 (15:08 +0200)]
new codename, reset version to git

10 years agoparaslash 0.4.13 v0.4.13
Andre Noll [Mon, 29 Jul 2013 12:59:50 +0000 (14:59 +0200)]
paraslash 0.4.13

10 years agotime.c: Make declarations match definitions.
Andre Noll [Sat, 6 Jul 2013 13:02:10 +0000 (15:02 +0200)]
time.c: Make declarations match definitions.

Also fix some whitespace issues.

10 years agoAdd two missing GPL and doxygen file headers.
Andre Noll [Sun, 21 Jul 2013 14:40:56 +0000 (16:40 +0200)]
Add two missing GPL and doxygen file headers.

It's a pity that doxygen doesn't warn about this.

10 years agosched.h: Remove outdated comment.
Andre Noll [Sun, 21 Jul 2013 14:30:23 +0000 (16:30 +0200)]
sched.h: Remove outdated comment.

The term "these functions" is undefined here, and setting t->error
is deprecated.  The post_select() functions are supposed to return
an error code instead, but this is already mentioned further down in
the file, so let's just remove the comment.

10 years agoFix documentation of filter->post-select().
Andre Noll [Sun, 21 Jul 2013 14:25:10 +0000 (16:25 +0200)]
Fix documentation of filter->post-select().

The ->post_select() methods return an integer these days and should
*not* set the ->error field of the task struct directly.

10 years agoipc.c: Fix typo in comment.
Andre Noll [Sat, 20 Jul 2013 19:07:06 +0000 (21:07 +0200)]
ipc.c: Fix typo in comment.

10 years agoaft.c: Remove a stray "*" in a comment.
Andre Noll [Sun, 14 Jul 2013 11:13:03 +0000 (13:13 +0200)]
aft.c: Remove a stray "*" in a comment.

10 years agoMove com_select_callback() closer to com_select().
Andre Noll [Tue, 16 Jul 2013 05:38:33 +0000 (07:38 +0200)]
Move com_select_callback() closer to com_select().

It's considered good style to have the command handler and it's
callback next to each other. No actual changes.

10 years agobuffer_tree.c: Add documentation of btr_parent().
Andre Noll [Sat, 6 Jul 2013 18:25:17 +0000 (20:25 +0200)]
buffer_tree.c: Add documentation of btr_parent().

This function was introduced in commit 37e0dfe7 (check_wav: Ask parent
nodes before falling back to defaults) without documentation.

10 years agoggo.c: Document return value of printf_or_die().
Andre Noll [Sat, 6 Jul 2013 18:23:04 +0000 (20:23 +0200)]
ggo.c: Document return value of printf_or_die().

Commit b59a3c41 (filter: Wrap lines in the available filter list)
changed the return value of this function from void to int but missed
to update the documentation.

10 years agoMood: Document return value of moods_event_handler().
Andre Noll [Sat, 6 Jul 2013 18:21:19 +0000 (20:21 +0200)]
Mood: Document return value of moods_event_handler().

Just to make doxygen happy.

10 years agonet.c: Add documentation of flowopt_new().
Andre Noll [Sat, 6 Jul 2013 18:20:41 +0000 (20:20 +0200)]
net.c: Add documentation of flowopt_new().

It's not obvious that the returned structure does not need to
be freed by the caller, so let's document this fact.

10 years agonet: Remove unused flowopt_add_bool().
Andre Noll [Sat, 6 Jul 2013 18:00:57 +0000 (20:00 +0200)]
net: Remove unused flowopt_add_bool().

10 years agorecv.h: Fix comment indentation.
Andre Noll [Sat, 6 Jul 2013 20:02:56 +0000 (22:02 +0200)]
recv.h: Fix comment indentation.

10 years agoRemove some duplicate semicolons.
Andre Noll [Sun, 7 Jul 2013 16:47:36 +0000 (18:47 +0200)]
Remove some duplicate semicolons.

10 years agoRemove some unused error codes.
Andre Noll [Sun, 7 Jul 2013 19:14:21 +0000 (21:14 +0200)]
Remove some unused error codes.

Quite a few error codes have become unused, but the stale entries
of error.h remained. Unfortunately, we have no way to spot these
automatically.

10 years agoDoxyfile: Predefine HAVE_CLOCK_GETTIME.
Andre Noll [Sat, 6 Jul 2013 18:26:59 +0000 (20:26 +0200)]
Doxyfile: Predefine HAVE_CLOCK_GETTIME.

Fixes the following doxygen warning:

time.c:227: Warning: include file sys/time.h not found, perhaps you forgot to add its directory to INCLUDE_PATH?

10 years agoaudiod: Close filters in reverse order.
Andre Noll [Sat, 6 Jul 2013 21:00:14 +0000 (23:00 +0200)]
audiod: Close filters in reverse order.

Otherwise, a subsequent filter might refer to a buffer reference of
the previous filter, accessing freed memory. This is not a bug right
now, as audiod only closes filters after the full buffer tree has
become inactive, i.e. after all buffer tree nodes have unregistered
their task. It's cleaner to reverse the loop though, and it has no
additional cost.

10 years agoopusdec: Get rid of opusdec_pre_select().
Andre Noll [Sun, 7 Jul 2013 15:59:07 +0000 (17:59 +0200)]
opusdec: Get rid of opusdec_pre_select().

The generic one should do just fine and the additional 100ms timeout
should not be necessary.

10 years agoopusdec: avoid __STDC_VERSION__ warning.
Andre Noll [Fri, 12 Jul 2013 14:08:41 +0000 (16:08 +0200)]
opusdec: avoid __STDC_VERSION__ warning.

opusdec_filter.c indirectly includes opus_types.h which checks whether
__STDC_VERSION__ >= 199901L. However, at least some gcc versions
don't define __STDC_VERSION__ which results in

warning: "__STDC_VERSION__" is not defined

For example, this happens on Ubuntu lucid, which ships gcc-4.4.3.

This patch gets rid of the warning by defining __STDC_VERSION__
if necessary prior to including the opus_types header.

10 years agoafh: Initialize audio format handlers only once.
Andre Noll [Sun, 7 Jul 2013 11:22:48 +0000 (13:22 +0200)]
afh: Initialize audio format handlers only once.

afc.c calls afh_init() twice. This does not really hurt as this
function is idempotent, but it causes the initialization log messages
to be printed twice.

This gets rid of the additional call to afh_init() which crept in
in commit 042767ce (Use self-made help to avoid recompilations on
version changes).

10 years agomp3_afh: Use symbolic constants for id3 tag identifiers.
Andre Noll [Sun, 7 Jul 2013 08:44:50 +0000 (10:44 +0200)]
mp3_afh: Use symbolic constants for id3 tag identifiers.

10 years agoMerge branch 't/opus'
Andre Noll [Sat, 6 Jul 2013 00:24:48 +0000 (02:24 +0200)]
Merge branch 't/opus'

Was cooking for two weeks with no problems.

273756 The opus decoder.
7007ae The opus audio format handler.
8bcf75 ogg/opus: Infrastructure.
53133e speex: Don't export spx_ctl().

10 years agoMerge branch 't/versioning_improvements'
Andre Noll [Mon, 1 Jul 2013 19:06:48 +0000 (21:06 +0200)]
Merge branch 't/versioning_improvements'

Cooking for ~2 weeks.

15e99a version.c: Mark version_git() as const.
9bdebf Remove CODENAME macro.
be2f6b gui: Use version_single_line().
d60dae Improve man page layout.
5dbc9a afh/play: Include supported audio formats in help output.
042767 Use self-made help to avoid recompilations on version changes.
48f1fc Provide "purpose" texts.
aa74a9 Revamp ggo help.
9f7a49 afh_recv: Replace ggo text section by description.
b59e0e Make gengetopt descriptions work.
06b3e7 Introduce version.c to limit recompilation on version changes.
75feac Make all commands print git version and improve version string.
b01605 Avoid unwanted log messages during startup.
625fdb Don't check return value of command line parsers unnecessarily.
533b03 Build receivers, filters and writers without -h and -V support.
b59a3c filter: Wrap lines in the available filter list.
9e56d3 audioc: Print config file errors.
e5264d doc: Rewrite udp sender description
5ec373 client: Fix typo in comment.
6d5159 client: Remove duplicate include.

10 years agoversion.c: Mark version_git() as const.
Andre Noll [Mon, 1 Jul 2013 19:02:56 +0000 (21:02 +0200)]
version.c: Mark version_git() as const.

Fixes the following warning on gcc-4.8.1:

version.c:13:13: warning: function might be candidate for attribute 'const' [-Wsuggest-attribute=const]

10 years agoclient: Only start stdin task for addblob commands.
Andre Noll [Wed, 26 Jun 2013 18:28:58 +0000 (20:28 +0200)]
client: Only start stdin task for addblob commands.

Currently the command

para_client -- ls -lv | grep a

fails in a rather strange way, emitting many error messages like

grep: writing output: Resource temporarily unavailable

This is because O_NONBLOCK is a file status flag rather than a file
descriptor flag, i.e. nonblocking mode is a property of the file
description rather than the file descriptor.

In the above command both stdin of the para_client process and
stdout of the grep process refer to the same file description (the
terminal). para_client sets stdin to nonblocking mode, hence stdout
of the grep process is also in nonblocking mode.

We avoid this problem by changing client.c to only set stdin to
nonblocking mode if we actually need to read from stdin, i.e. only
for the addblob commands. This is achieved by registering the stdin
task (which sets the O_NONBLOCK flag) only if the client status
is CL_SENDING.

For addblob commands the client status changes from CL_EXECUTING to
CL_SENDING, so we can not simply terminate the supervisor task any more
after the stdout task has been registered. Instead we must keep this
task alive and (a) remember that stdout has already been started, and
(b) start the stdin task in case the client status becomes CL_SENDING.

Unfortunately, there is no simple way to store this bit of information
as we don't have a dedicated supervisor structure yet. Therefore this
patch introduces this structure as a task struct plus a single boolean.

10 years agoi9e: Fix memory leak in clear_bottom_line().
Andre Noll [Sat, 22 Jun 2013 15:20:15 +0000 (17:20 +0200)]
i9e: Fix memory leak in clear_bottom_line().

In clear_bottom_line() we call readline's rl_copy_text() which
allocates a buffer for the given range of the current input line. But
we never free this buffer, which results in a memory leak. This patch
plugs the leak.

10 years agoHandle empty command lines properly.
Andre Noll [Sat, 22 Jun 2013 14:59:04 +0000 (16:59 +0200)]
Handle empty command lines properly.

Both para_client and para_audioc create an argument vector from the
given command line using create_argv(). If the command line contains
only whitespace characters, this vector has length zero, and argv[0]
is NULL.

We missed to check for this at at least three places in audioc.c,
client.c and audiod_command.c, which resulted in crashes due to NULL
pointer dereferences or failed assertions.

These bugs can easily be triggered by starting para_client or
para_audioc in interactive mode, entering a single space character
and hitting return.

This patch adds the missing checks to prevent the crashes.

10 years agoMerge branch 't/interactive'
Andre Noll [Sat, 22 Jun 2013 13:58:29 +0000 (15:58 +0200)]
Merge branch 't/interactive'

Was cooking for almost two weeks.

f8931d Simplify i9e_line_handler.
f99dbe i9e: Fix a prompt display issue
cf39e4 audioc: Abstract out connection code.

10 years agoImprove text on the download web page.
Andre Noll [Sun, 19 May 2013 12:53:31 +0000 (14:53 +0200)]
Improve text on the download web page.

Enumerate the possible ways to download paraslash and explain when
each option is most suitable.

10 years agogui: Fix off-by-one in add_spaces().
Andre Noll [Sun, 16 Jun 2013 12:22:06 +0000 (14:22 +0200)]
gui: Fix off-by-one in add_spaces().

Commit e90c6c0a (Speed up add_spaces().) changed add_spaces() to print
space characters in chunks rather than one at a time. It introduced
space[], an array of whitespace characters, which is written entirely
if there are more spaces to print than the size of the array. However,
in the calculation of how much was printed so far, we missed the fact
that sizeof(space) includes the terminating NULL byte, so this number
is in fact the number of space characters *plus one*.

Consequently, we printed too few space characters. This resulted in
parts of the previous string still being visible in the top window
of para_gui.

10 years agoMerge branch 't/compress'
Andre Noll [Sun, 16 Jun 2013 11:09:20 +0000 (13:09 +0200)]
Merge branch 't/compress'

Well tested an cooked.

0a6c0e compress: Further optimize inner loop.
be761d compress: Remove log statement in inner loop.
15a54f compress: Avoid PARA_ABS and PARA_MAX in inner loop.
28c03c compress: Compile with -O3.

10 years agoMerge branch 't/oss_error_message_fix'
Andre Noll [Thu, 13 Jun 2013 16:34:04 +0000 (18:34 +0200)]
Merge branch 't/oss_error_message_fix'

9e32ff oss mixer: Improve error message.

10 years agoRemove CODENAME macro.
Andre Noll [Mon, 20 May 2013 20:30:53 +0000 (22:30 +0200)]
Remove CODENAME macro.

This macro is no longer used, so we may remove it from Makefile.in.

10 years agogui: Use version_single_line().
Andre Noll [Mon, 20 May 2013 20:12:40 +0000 (22:12 +0200)]
gui: Use version_single_line().

No need to reinvent the wheel.

10 years agoImprove man page layout.
Andre Noll [Mon, 20 May 2013 17:29:58 +0000 (19:29 +0200)]
Improve man page layout.

This changes the output of --help, --detailed-help and --version
so that the man pages generated from this output by help2man look
much nicer.

Specifically, name and purposes are printed in a single line and
the version text now contains also build data, build system and the
compiler version.

Also the codename is no longer printed in version_single_line(),
since this caused the top and bottom labels of the man pages to
look quite ugly.

10 years agoafh/play: Include supported audio formats in help output.
Andre Noll [Sun, 7 Apr 2013 00:24:13 +0000 (00:24 +0000)]
afh/play: Include supported audio formats in help output.

This is useful information, and it is simple to do, so include it in
the help.

10 years agoUse self-made help to avoid recompilations on version changes.
Andre Noll [Fri, 12 Apr 2013 12:24:54 +0000 (14:24 +0200)]
Use self-made help to avoid recompilations on version changes.

This provides print_help() for all remaining commands so that we can
get rid of the gengetopt generated help output completely.

Hence the *.cmdline.[ch] files no longer depend on git-version.h
which saves a lot of recompilations.