paraslash.git
14 years agoconfigure.ac: Fix mysql configuration
Andre [Wed, 10 May 2006 23:03:48 +0000 (01:03 +0200)]
configure.ac: Fix mysql configuration

The --enable_mysql_libs option had two cut-and-paste bugs.

14 years agocosmetics
Andre [Tue, 9 May 2006 17:26:47 +0000 (19:26 +0200)]
cosmetics

14 years agocheck barriers also in afs_send_chunk()
Andre [Tue, 9 May 2006 17:25:12 +0000 (19:25 +0200)]
check barriers also in afs_send_chunk()

As this function is called even if the select timeout didn't expire,
we'll have to check the eof_barrier and the data_send barrier also
early in afs_send_chunk() and return if there's time left.

14 years agoortp_send: Fix EOF packet sending
Andre [Tue, 9 May 2006 16:18:44 +0000 (18:18 +0200)]
ortp_send: Fix EOF packet sending

14 years agoserver: call afs_send_chunk() even if no timeout occured.
Andre [Mon, 8 May 2006 22:23:17 +0000 (00:23 +0200)]
server: call afs_send_chunk() even if no timeout occured.

afs_send_chunk() checks the current time anyway.

14 years agoortp_send: kill useless gettimeofday()
Andre [Sat, 6 May 2006 22:49:11 +0000 (00:49 +0200)]
ortp_send: kill useless gettimeofday()

14 years agofix error log message
Andre [Sat, 6 May 2006 15:24:16 +0000 (17:24 +0200)]
fix error log message

Also, make recv_buffer() write a zero even if the underlying recv_bin_buffer()
failed.

14 years agoSend correct http message.
Andre [Sat, 6 May 2006 15:21:10 +0000 (17:21 +0200)]
Send correct http message.

Screwed up since the 1.0 vs. 1.1 fix.

14 years agograb: init gc->audio_format_num to -1
Andre [Sat, 6 May 2006 14:09:16 +0000 (16:09 +0200)]
grab: init gc->audio_format_num to -1

Previously it was 0, which happens to be the mp3 audio format number.
Therefore, grab without args only grabbed mp3 files. This patch makes
it grab any audio format.

14 years agoaudiod: fix minor memory leak
Andre [Sat, 6 May 2006 14:06:31 +0000 (16:06 +0200)]
audiod: fix minor memory leak

The default filter setup code (which is only called at startup)
leaks four bytes.

14 years agocompress: Adjust forumla for clipping
Andre [Fri, 5 May 2006 12:30:57 +0000 (14:30 +0200)]
compress: Adjust forumla for clipping

Use (3 * old + min) / 4 instead of (old + min) / 2 as the new gain
if clipping occures.

14 years agoDoxify the write subsystem
Andre [Fri, 5 May 2006 12:06:10 +0000 (14:06 +0200)]
Doxify the write subsystem

14 years agoaudiod: reset max_fileno at each run.
Andre [Thu, 4 May 2006 18:08:59 +0000 (20:08 +0200)]
audiod: reset max_fileno at each run.

Kill some noisy debug messages also.

14 years agocom_upd: always escape the filename
Andre [Tue, 2 May 2006 18:16:14 +0000 (20:16 +0200)]
com_upd: always escape the filename

Fixes problems with filenames starting with "'"

14 years agograb_client: Error out if given an invalid grab mode
Andre [Tue, 2 May 2006 14:58:32 +0000 (16:58 +0200)]
grab_client: Error out if given an invalid grab mode

14 years agocom_upd: ignore duplicates
Andre [Tue, 2 May 2006 00:26:07 +0000 (02:26 +0200)]
com_upd: ignore duplicates

Previously the update command aborted if files with duplicate basenames
were found. Suggested by Gerd Becker.

14 years agofix trivial compiler warning in net.c
Andre [Mon, 1 May 2006 22:07:35 +0000 (00:07 +0200)]
fix trivial compiler warning in net.c

net.c:347:7: warning: extra tokens at end of #else directive

14 years agoconfigure: add two mysql-related command line options
Andre [Mon, 1 May 2006 21:52:54 +0000 (23:52 +0200)]
configure: add two mysql-related command line options

14 years agoAdd "-I ." to aclocal options
Andre [Mon, 1 May 2006 16:02:31 +0000 (18:02 +0200)]
Add "-I ." to aclocal options

This way, one can put missing m4 files (like pkg.m4) to the paraslash
directory.

14 years agomp3dec: skip invalid frame headers
Andre [Mon, 1 May 2006 03:21:06 +0000 (05:21 +0200)]
mp3dec: skip invalid frame headers

First try to decode the header, and if that fails with a recoverable
error, return FRAME_HEADER_SIZE to skip the invalid frame.

14 years agonet.c: fix ifdef UCRED madness
Andre [Sun, 30 Apr 2006 00:33:30 +0000 (02:33 +0200)]
net.c: fix ifdef UCRED madness

simply use ordinary recv_buffer()/send_buffer() in case ucred is
not available.

14 years agoadd a notice message if the expected pattern was not received
Andre [Sat, 29 Apr 2006 23:34:43 +0000 (01:34 +0200)]
add a notice message if the expected pattern was not received

14 years ago1000 * 1000 microseconds is too much for Darwin
Andre [Sat, 29 Apr 2006 23:28:17 +0000 (01:28 +0200)]
1000 * 1000 microseconds is too much for Darwin

linux never complained about that, but Darwin returns -EINVAL.

14 years agoHTTP_GET_MSG: Do not resist on http 1.0
Andre [Fri, 28 Apr 2006 20:40:32 +0000 (22:40 +0200)]
HTTP_GET_MSG: Do not resist on http 1.0

recent itunes for example sends 1.1. The obvious solution is to just
accept every client that sends at least 'GET / HTTP/'. Spotted by
Gerd Becker.

14 years agoFix another gcc signedness warning in write.c
Andre [Mon, 24 Apr 2006 14:16:04 +0000 (16:16 +0200)]
Fix another gcc signedness warning in write.c

14 years agominor mysql_selector cleanup.
Andre [Mon, 24 Apr 2006 14:15:02 +0000 (16:15 +0200)]
minor mysql_selector cleanup.

make_message() never returns NULL, so remove the check.

14 years agoalsa_writer.c: Fix gcc-4 signedness warning
Andre [Mon, 24 Apr 2006 14:13:44 +0000 (16:13 +0200)]
alsa_writer.c: Fix gcc-4 signedness warning

14 years agoNEWS: Mention the reason for size decrease of the tarball
Andre [Mon, 24 Apr 2006 14:12:53 +0000 (16:12 +0200)]
NEWS: Mention the reason for size decrease of the tarball

14 years agohttp_send.c: Add a comment
Andre [Fri, 21 Apr 2006 14:54:10 +0000 (16:54 +0200)]
http_send.c: Add a comment

14 years agodccp_send.c: Set status to SENDER_OFF on errros.
Andre [Fri, 21 Apr 2006 14:53:05 +0000 (16:53 +0200)]
dccp_send.c: Set status to SENDER_OFF on errros.

14 years agofade.c: whitespace cleanup
Andre [Fri, 21 Apr 2006 14:52:00 +0000 (16:52 +0200)]
fade.c: whitespace cleanup

14 years agoINSTALL: Add more explanations for unexperienced users.
Andre [Thu, 20 Apr 2006 20:36:05 +0000 (22:36 +0200)]
INSTALL: Add more explanations for unexperienced users.

14 years agoMakefile.in: Fix generation of web pages
Andre [Thu, 20 Apr 2006 19:37:54 +0000 (21:37 +0200)]
Makefile.in: Fix generation of web pages

14 years agouse git-tar-tree to make the tarball
Andre [Thu, 20 Apr 2006 18:56:04 +0000 (20:56 +0200)]
use git-tar-tree to make the tarball

This simplifies Makefile.in quite a bit, speeds up the tarball
creation, and reduces the size of the compressed tarball from 560KB
to 408KB, mostly because it no longer contains the screenshot images.

14 years agoSimplify wng_write()
Andre [Thu, 20 Apr 2006 18:06:20 +0000 (20:06 +0200)]
Simplify wng_write()

by killing the variable "p" which is only used once. Fixes

warning: pointer targets in passing argument 1 of 'wn->writer->write' differ in signedness

14 years agowrite.c: fix more compiler warnings on MacOs
Andre [Thu, 20 Apr 2006 18:02:00 +0000 (20:02 +0200)]
write.c: fix more compiler warnings on MacOs

format '%d' expects type 'int', but argument 4 has type 'size_t'
pointer targets in passing argument 1 of 'read_stdin' differ in signedness

14 years agocommand.c: cast members of struct timeval to long unsigned
Andre [Thu, 20 Apr 2006 17:56:39 +0000 (19:56 +0200)]
command.c: cast members of struct timeval to long unsigned

This should fix

command.c:441: warning: format '%lu' expects type 'long unsigned int', but argument 31 has type 'suseconds_t'

on MacOs.

14 years agoremove 1.0
Andre [Thu, 20 Apr 2006 15:49:35 +0000 (17:49 +0200)]
remove 1.0

there's not so much left..

14 years agoMakefile.in: remove unused variable CONFDIR
Andre [Thu, 20 Apr 2006 14:41:13 +0000 (16:41 +0200)]
Makefile.in: remove unused variable CONFDIR

14 years agoMore doxygen updates
Andre [Thu, 20 Apr 2006 14:30:54 +0000 (16:30 +0200)]
More doxygen updates

14 years agoadd doxygen file comments
Andre [Thu, 20 Apr 2006 14:24:56 +0000 (16:24 +0200)]
add doxygen file comments

modified: alsa_writer.c write.h write_common.c write_common.h

14 years agowrite.c: Make check_args() static
Andre [Thu, 20 Apr 2006 14:23:04 +0000 (16:23 +0200)]
write.c: Make check_args() static

14 years agoDoxyfile: replace play.c by write.c
Andre [Thu, 20 Apr 2006 14:21:57 +0000 (16:21 +0200)]
Doxyfile: replace play.c by write.c

14 years agoadd --disable-ortp option to configure
Andre [Thu, 20 Apr 2006 13:13:20 +0000 (15:13 +0200)]
add --disable-ortp option to configure

This is handy if an old ortp library is installed.

14 years agoMakefile.in: kill sample_conf variable
Andre [Wed, 19 Apr 2006 22:59:22 +0000 (00:59 +0200)]
Makefile.in: kill sample_conf variable

There are no more sample configs left. No sample.conf is better than
a notoriously outdated one..

14 years agoremove gui.conf.sample
Andre [Wed, 19 Apr 2006 22:54:27 +0000 (00:54 +0200)]
remove gui.conf.sample

didn't even know it still existed.

14 years agoREADME: mention that gcc-2.95 no longer works.
Andre [Wed, 19 Apr 2006 22:42:15 +0000 (00:42 +0200)]
README: mention that gcc-2.95 no longer works.

14 years agoMakefile.in: activate even more gcc warnings
Andre [Wed, 19 Apr 2006 22:33:19 +0000 (00:33 +0200)]
Makefile.in: activate even more gcc warnings

Add -Wmissing-format-attribute -Wunused-macros (these are unknown
to the now unsupported gcc-2.95).

14 years agowrite.h: mark two variables extern
Andre [Wed, 19 Apr 2006 22:30:16 +0000 (00:30 +0200)]
write.h: mark two variables extern

14 years agoortp_recv compute_next_chunk(): kill unused parameter now
Andre [Wed, 19 Apr 2006 22:12:41 +0000 (00:12 +0200)]
ortp_recv compute_next_chunk(): kill unused parameter now

14 years agoortp_recv.c post_select: mark unused paramters with __a_unused
Andre [Wed, 19 Apr 2006 22:10:32 +0000 (00:10 +0200)]
ortp_recv.c post_select: mark unused paramters with __a_unused

14 years agokill unused BUF_TO_VAL macro
Andre [Wed, 19 Apr 2006 22:06:03 +0000 (00:06 +0200)]
kill unused BUF_TO_VAL macro

14 years agoMakefile.in: Remove special treatment of ortp_send/ortp_recv
Andre [Wed, 19 Apr 2006 21:59:08 +0000 (23:59 +0200)]
Makefile.in: Remove special treatment of ortp_send/ortp_recv

they no longer depend on glib, so use the generic rule for building
object files. This made gcc spit out some trivial warnings about
unused variables which are also fixed in this patch.

14 years agoFix typo in gcc-compat.h
Andre [Wed, 19 Apr 2006 21:20:20 +0000 (23:20 +0200)]
Fix typo in gcc-compat.h

It only affects gcc-2 and non-gcc (which is untested anyway).

14 years agonet.c: make it compile without ucred
Andre [Wed, 19 Apr 2006 20:35:04 +0000 (22:35 +0200)]
net.c: make it compile without ucred

This patch is ugly as hell and only compile-tested. It obviously
needs more work (or a totally different approch like using the usual
send/recv functions in case ucred is not available).

MacOs testers are welcome.

14 years agoREADME updates
Andre [Wed, 19 Apr 2006 15:12:19 +0000 (17:12 +0200)]
README updates

Update info on required gcc version in README, small README.mysql update.

14 years agoaudioc.c, audiod.c, server.c: use para_fd_set()
Andre [Wed, 19 Apr 2006 03:22:14 +0000 (05:22 +0200)]
audioc.c, audiod.c, server.c: use para_fd_set()

14 years agocosmetics
Andre [Wed, 19 Apr 2006 03:06:34 +0000 (05:06 +0200)]
cosmetics

14 years agoNEWS: gcc-2.95 is no longer supported
Andre [Wed, 19 Apr 2006 02:54:20 +0000 (04:54 +0200)]
NEWS: gcc-2.95 is no longer supported

The admin of the single remaining system I have access to which was
still running gcc-2.95 recently upgraded to gcc-3 (a version which
is merely 3 years old rather than the 7 years old gcc-2.95).

This means that upcoming paraslash releases will no longer be
compile-tested with gcc-2.95.

gcc-2.95
finally didn't manage to survive
it served all well for all the time
but no one really cares to whine
as we all meet in some other life

14 years agouse para_fd_set also in gui.c and in http_send.c
Andre [Wed, 19 Apr 2006 01:57:59 +0000 (03:57 +0200)]
use para_fd_set also in gui.c and in http_send.c

14 years agoMakefile.in: kill unused target para_compress
Andre [Wed, 19 Apr 2006 01:38:29 +0000 (03:38 +0200)]
Makefile.in: kill unused target para_compress

para_compress went away in paraslash-0.2.8..

14 years agokill unused E_LIST_WRITERS_GIVEN
Andre [Tue, 18 Apr 2006 23:30:47 +0000 (01:30 +0200)]
kill unused E_LIST_WRITERS_GIVEN

14 years agoQuote the the strings in WRITER_NAME correctly.
Andre [Tue, 18 Apr 2006 21:45:18 +0000 (23:45 +0200)]
Quote the the strings in WRITER_NAME correctly.

That fixes problems on debian.

14 years agoMakefile.in: add tow missing headers for the tarball
Andre [Tue, 18 Apr 2006 21:43:21 +0000 (23:43 +0200)]
Makefile.in: add tow missing headers for the tarball

With this fix, the tarball compiles again.

14 years agoreformat and improve write.ggo
Andre [Tue, 18 Apr 2006 20:36:37 +0000 (22:36 +0200)]
reformat and improve write.ggo

add more documentation for the --writer option, reorder options
and move alsa-specific options to an own section.

14 years agopara_play -> para_write documentation update
Andre [Tue, 18 Apr 2006 20:16:20 +0000 (22:16 +0200)]
para_play -> para_write documentation update

14 years agosplit play.c and rename para_play to para_write
Andre [Tue, 18 Apr 2006 19:53:48 +0000 (21:53 +0200)]
split play.c and rename para_play to para_write

This separates the code to write an audio stream into several
independent pieces:

write.h: definition of writer-related structures
write.c: the para_write main program
write_common.c: functions to be shared between para_write
and para_audiod
write_common.h: exported functions of write_common.c
alsa_writer.c: writes the stream to an alsa sound device
file_writer.c: writes the stream to a file

Other writers (aka output plugins) can be added easily.

14 years agoadd new writer to para_play: file
Andre [Tue, 18 Apr 2006 18:42:15 +0000 (20:42 +0200)]
add new writer to para_play: file

It simply writes the input to a random filename under ~/.paraslash.
Also, add some writer-related macros to config.h and two new options
for para_play: --writer and --list_writers.

14 years agoFurther para_play abstraction: struct writer_node_group
Andre [Tue, 18 Apr 2006 03:28:55 +0000 (05:28 +0200)]
Further para_play abstraction: struct writer_node_group

This structure contains the list of writer nodes and information common to all
of these nodes. The idea is that the wng group code will be shared between
para_audiod and para_play.

14 years agopara_play: simplify play_pcm(), add E_PLAY_OVERRUN, E_PREMATURE_END
Andre [Tue, 18 Apr 2006 01:34:48 +0000 (03:34 +0200)]
para_play: simplify play_pcm(), add E_PLAY_OVERRUN, E_PREMATURE_END

14 years agoswitch to the new struct writer/writer_node abstraction
Andre [Tue, 18 Apr 2006 01:00:53 +0000 (03:00 +0200)]
switch to the new struct writer/writer_node abstraction

There's only one writer possible ATM, but it is designed to allow
more than one.

This patch also, adds a loglevel config option to para_play.

14 years agointroduce struct writer and struct writer_node
Andre [Mon, 17 Apr 2006 21:51:43 +0000 (23:51 +0200)]
introduce struct writer and struct writer_node

They are unused for now.

14 years agoalsa_shutdown(): free struct private_alsa_data
Andre [Mon, 17 Apr 2006 20:54:02 +0000 (22:54 +0200)]
alsa_shutdown(): free struct private_alsa_data

14 years agopara_play: introduce struct private_alsa_data
Andre [Mon, 17 Apr 2006 20:52:27 +0000 (22:52 +0200)]
para_play: introduce struct private_alsa_data

this structure combines all alsa specific state variables of
para_play. Its usage separates alsa specific stuff from the
generic code of para_play.

14 years agomake chunk_size a local var and rename it to period_size
Andre [Mon, 17 Apr 2006 20:31:32 +0000 (22:31 +0200)]
make chunk_size a local var and rename it to period_size

14 years agomake para_play use the error subsystem
Andre [Mon, 17 Apr 2006 20:25:34 +0000 (22:25 +0200)]
make para_play use the error subsystem

14 years agoplay.c: Let alsa_init() return the number of bytes per chunk
Andre [Mon, 17 Apr 2006 18:59:12 +0000 (20:59 +0200)]
play.c: Let alsa_init() return the number of bytes per chunk

14 years agoplay.c: make alsa_write() take the number of _bytes_ to write
Andre [Mon, 17 Apr 2006 18:49:54 +0000 (20:49 +0200)]
play.c: make alsa_write() take the number of _bytes_ to write

rather than the number of frames.

14 years agoplay.c: reorder and rename some functions.
Andre [Mon, 17 Apr 2006 18:44:22 +0000 (20:44 +0200)]
play.c: reorder and rename some functions.

Move everything which depends on ALSA to the three functions
alsa_init(), former set_alsa_params(), alsa_write(), former
pcm_write(), and alsa_shutdown().

14 years agoreplace memcpy by memmove
Andre [Mon, 17 Apr 2006 17:16:18 +0000 (19:16 +0200)]
replace memcpy by memmove

as the areas in question may overlap

14 years agoFix some typos in CREDITS
Andre [Mon, 17 Apr 2006 15:28:54 +0000 (17:28 +0200)]
Fix some typos in CREDITS

14 years agoKill noisy debug message
Andre [Sun, 16 Apr 2006 23:22:55 +0000 (01:22 +0200)]
Kill noisy debug message

14 years agoaudiod: do not use pointers to members of struct timeval for sscanf()
Andre [Sun, 16 Apr 2006 18:37:52 +0000 (20:37 +0200)]
audiod: do not use pointers to members of struct timeval for sscanf()

Use temporary long unsigned variables instead. Fixes warnings of the
form

audiod.c:844: warning: format '%lu' expects type 'long unsigned int *', but argument 4 has type 'suseconds_t *'

on MacOs

14 years agoTypo
Andre [Sun, 16 Apr 2006 18:04:33 +0000 (20:04 +0200)]
Typo

14 years agofix more struct timeval related warnings
Andre [Sun, 16 Apr 2006 17:56:09 +0000 (19:56 +0200)]
fix more struct timeval related warnings

Use tv2ms() which returns long unsigned where appropriate.
For the remaining cases, cast the members of struct timeval
to long unsigned if used via a format string.

14 years agoaudiod: use tv2ms to show the time difference
Andre [Sun, 16 Apr 2006 17:31:51 +0000 (19:31 +0200)]
audiod: use tv2ms to show the time difference

14 years agompdec.c: %d -> %zd conversion
Andre [Sun, 16 Apr 2006 17:13:32 +0000 (19:13 +0200)]
mpdec.c: %d -> %zd conversion

This fixes some warnings of the form

mp3dec.c:66: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

on MacOs.

14 years agokill para_client's interactive mode
Andre [Sun, 16 Apr 2006 15:56:44 +0000 (17:56 +0200)]
kill para_client's interactive mode

Again, it is not worth the compatibility trouble it causes.  It's much
better to implement such functionality with a bash script or similar.

Also, add Gerd Becker to CREDITS and mention that paraslash compiles
under MacOS.

14 years agoconfigure.ac: Add check for unix socket credentials
Andre [Sat, 15 Apr 2006 18:56:15 +0000 (20:56 +0200)]
configure.ac: Add check for unix socket credentials

14 years agoremove null termination.
Andre [Sat, 15 Apr 2006 17:50:59 +0000 (19:50 +0200)]
remove null termination.

The previous patch missed to remove a line. Quite a serious mistake as
'ret' no longer contains the length of the message but the user id..

14 years agoavoid struct ucred in audiod.c
Andre [Sat, 15 Apr 2006 17:40:41 +0000 (19:40 +0200)]
avoid struct ucred in audiod.c

This is a preparation for making ucred optional. It moves everything
which uses unix socket credentials into the single source file net.c.

14 years agorecv_cred_buffer typo: Return proper error number
Andre [Sat, 15 Apr 2006 16:38:59 +0000 (18:38 +0200)]
recv_cred_buffer typo: Return proper error number

14 years agokill mallinfo
Andre [Sat, 15 Apr 2006 16:04:38 +0000 (18:04 +0200)]
kill mallinfo

It is not important enough to care about the compatibility
issues.

14 years agoRename MIN, MAX, ABS macros
Andre [Sat, 15 Apr 2006 15:58:13 +0000 (17:58 +0200)]
Rename MIN, MAX, ABS macros

MIN and MAX are already defined on MacOS.

14 years agogcc-compat.h: rename __unused to __a_unused
Andre [Sat, 15 Apr 2006 15:36:57 +0000 (17:36 +0200)]
gcc-compat.h: rename __unused to __a_unused

__unused is already defined on MacOS.

14 years agogcc-compat: Kill __pure
Andre [Sat, 15 Apr 2006 15:12:40 +0000 (17:12 +0200)]
gcc-compat: Kill __pure

It is not used within paraslash and is already defined on MacOS.

14 years agocom_sa: pedantic mem leak fix.
Andre [Fri, 14 Apr 2006 13:31:48 +0000 (15:31 +0200)]
com_sa: pedantic mem leak fix.

In fact, this memory leak doesn't matter much because it happens in the child
which calls exit shortly afterwards. But it's considered good programming
practice to free all memory, so..

14 years agocom_cs: Return a syntax error if argc > 2.
Andre [Fri, 14 Apr 2006 13:02:44 +0000 (15:02 +0200)]
com_cs: Return a syntax error if argc > 2.

Previously, argv[i] was silently ignored for i > 1.

14 years agomysql selector commands: escape argv[] when used in a query.
Andre [Thu, 13 Apr 2006 00:42:51 +0000 (02:42 +0200)]
mysql selector commands: escape argv[] when used in a query.

14 years agotypo
Andre [Mon, 10 Apr 2006 23:31:45 +0000 (01:31 +0200)]
typo

This was introduced in the previous patch.