paraslash.git
14 years agoortp_recv: Set remote address
Andre [Fri, 7 Jul 2006 13:27:57 +0000 (15:27 +0200)]
ortp_recv: Set remote address

This avoids a ortp warning message

14 years agomysql selector: Always check return value of escape_str()
Andre [Tue, 4 Jul 2006 12:18:30 +0000 (14:18 +0200)]
mysql selector: Always check return value of escape_str()

14 years agoimprove and clean up audiod_status_dump()
Andre [Mon, 3 Jul 2006 01:33:47 +0000 (03:33 +0200)]
improve and clean up audiod_status_dump()

Currently, no status is printed if audiod is off. This is suboptimal
as the _audiod_ status items should be sent in any case. This patch also

- gets rid of some static variables in audiod_status_dump()
- improves readability of audiod_status_dump()
- moves dump_empty_status() from stat.c to audiod_command.c

14 years agoaudiod: always dump the audio status
Andre [Mon, 3 Jul 2006 00:30:12 +0000 (02:30 +0200)]
audiod: always dump the audio status

14 years agorecv.c: Fix receiver node eof handling
Andre [Sun, 2 Jul 2006 16:52:58 +0000 (18:52 +0200)]
recv.c: Fix receiver node eof handling

14 years agoTrivial SFont cleanup
Andre [Sun, 2 Jul 2006 16:48:52 +0000 (18:48 +0200)]
Trivial SFont cleanup

14 years agoMakefile.in: Fix definition of PKGDATADIR
Andre [Sun, 2 Jul 2006 15:26:47 +0000 (17:26 +0200)]
Makefile.in: Fix definition of PKGDATADIR

The thing is called datarootdir, rather than datadir.

14 years agosdl_gui.ggo: update stat command
Andre [Sun, 2 Jul 2006 15:25:37 +0000 (17:25 +0200)]
sdl_gui.ggo: update stat command

The -t option of para_audioc was removed some time ago, so do not
use it in the default stat_command.

14 years agoFix core dump on audiod pipe errors
Andre [Sun, 2 Jul 2006 15:24:10 +0000 (17:24 +0200)]
Fix core dump on audiod pipe errors

if (fd < 0)
close(fd);

is a really bad idea..

14 years agocompress filter: decrease default target signal level
Andre [Sun, 2 Jul 2006 14:44:29 +0000 (16:44 +0200)]
compress filter: decrease default target signal level

14 years agoclient: do not ignore startup log messages
Andre [Wed, 28 Jun 2006 17:38:42 +0000 (19:38 +0200)]
client: do not ignore startup log messages

If an error occurs before the private_client_data struct is initialized,
the error message is silently ignored. Fix it by always printing the
log message if the struct pointer is NULL.

14 years agofix some doxygen warnings
Andre [Wed, 28 Jun 2006 13:23:47 +0000 (15:23 +0200)]
fix some doxygen warnings

These were introduced by the addition of -Wshadow.

14 years agoget rid of -DVERSION
Andre [Wed, 28 Jun 2006 13:02:39 +0000 (15:02 +0200)]
get rid of -DVERSION

It's identical to PACKAGE_VERSION, so use PACKAGE_VERSION in the
C Code and get rid of the preprocessor define.

14 years agoconfigure.ac: Small cleanup
Andre [Wed, 28 Jun 2006 12:51:50 +0000 (14:51 +0200)]
configure.ac: Small cleanup

14 years agoupdate to autoconf-2.60
Andre [Wed, 28 Jun 2006 12:45:14 +0000 (14:45 +0200)]
update to autoconf-2.60

use "datarootdir" instead of hardcoding /usr/local/share.
This also avoids a warning from the new autoconf about not using
"datarootdir".

14 years agoDon't exit if there are no more empty slots
Andre [Sun, 25 Jun 2006 14:07:40 +0000 (16:07 +0200)]
Don't exit if there are no more empty slots

Though this is considered a serious error, it's not fatal. Just try
again one second later.

14 years agoaac: add "mp4" to suffixes for guess_audio_format()
Andre [Sun, 25 Jun 2006 14:06:27 +0000 (16:06 +0200)]
aac: add "mp4" to suffixes for guess_audio_format()

14 years agogui: fix default stat command
Andre [Sat, 24 Jun 2006 17:31:05 +0000 (19:31 +0200)]
gui: fix default stat command

It used the "-t" option of para_audioc which was removed recently.

14 years agoadd -Wshadow to CPPFLAGS
Andre [Fri, 23 Jun 2006 13:08:37 +0000 (15:08 +0200)]
add -Wshadow to CPPFLAGS

14 years agofix gcc warnings on shadowed declarations
Andre [Fri, 23 Jun 2006 13:04:37 +0000 (15:04 +0200)]
fix gcc warnings on shadowed declarations

14 years agofade: wake time defaults to "8 hours from now"
Andre [Fri, 23 Jun 2006 08:29:29 +0000 (10:29 +0200)]
fade: wake time defaults to "8 hours from now"

For all those shiftmen

14 years agoaudiod: fix receiver restart delay
Andre [Thu, 22 Jun 2006 17:35:15 +0000 (19:35 +0200)]
audiod: fix receiver restart delay

The current code started a new receiver node for the current format
only if the receiver_node is NULL for each slot which streams
that format. Since that pointer is only set to NULL _after_ the
writer/filters are closed, audiod did not start the new receiver
early enough.

Fix is simple: Check also the eof field in struct receiver_node.
As we're at it, rename decoder_running() to receiver_running() and
move it straight above its single caller.

As a consequence of this change, the restart_barrier has to be set
already in rn_event_handler() as this is the place where rn->eof is
set to one.

14 years agoReformat fade.ggo
Andre [Thu, 22 Jun 2006 10:53:32 +0000 (12:53 +0200)]
Reformat fade.ggo

14 years agoclient_close(): disable crypt
Andre [Wed, 21 Jun 2006 22:21:51 +0000 (00:21 +0200)]
client_close(): disable crypt

just in case the fd gets reused.

14 years agofix memset bug in enable_crypt()
Andre [Wed, 21 Jun 2006 22:20:20 +0000 (00:20 +0200)]
fix memset bug in enable_crypt()

A high-quality stealth bug. It bites only if enough fds are open, and
the trouble shows up much later. Kill the sucker with pleasure.

14 years agofix return value of para_reap_child()
Andre [Tue, 20 Jun 2006 21:12:55 +0000 (23:12 +0200)]
fix return value of para_reap_child()

In case of errors, this function returned 0 instead of -E_WAITPID.
Not a serious bug though.

14 years agoaudiod: parse receiver arguments in reverse order
Andre [Tue, 20 Jun 2006 21:10:36 +0000 (23:10 +0200)]
audiod: parse receiver arguments in reverse order

This allows to overwrite the receiver args of the config file by command line
options.

14 years agocomment out noisy debug messages
Andre [Sun, 18 Jun 2006 09:41:06 +0000 (11:41 +0200)]
comment out noisy debug messages

14 years agofix audiod stream delay
Andre [Sat, 17 Jun 2006 09:27:15 +0000 (11:27 +0200)]
fix audiod stream delay

This was known to be broken by the sched conversion. It was also the
last remaining missing feature of the new audiod. Let's beat on it
for a while.

14 years agodoxygen: Change color of function parameters
Andre [Fri, 16 Jun 2006 14:46:27 +0000 (16:46 +0200)]
doxygen: Change color of function parameters

It was almost unreadable.

14 years agoupdate to doxygen-1.4.7
Andre [Fri, 16 Jun 2006 14:36:15 +0000 (16:36 +0200)]
update to doxygen-1.4.7

looks much nicer. This also fixes the problem with gitweb where
tabs in patches were not indented on the web page

14 years agofix gcc warning if COMPILE_TIME_LOGLEVEL is non-zero
Andre [Fri, 16 Jun 2006 11:14:23 +0000 (13:14 +0200)]
fix gcc warning if COMPILE_TIME_LOGLEVEL is non-zero

use the old while(0) trick to avoid "empty body in an if-statement" warnings.

14 years agoadd documentation of struct signal_task
Andre [Thu, 15 Jun 2006 15:16:41 +0000 (17:16 +0200)]
add documentation of struct signal_task

and clean up documentation of struct stat_client as well.

14 years agoaudiod: make signal handling functions static
Andre [Thu, 15 Jun 2006 15:01:35 +0000 (17:01 +0200)]
audiod: make signal handling functions static

They are only used in audiod. This might change, but anyway.

14 years agodoxify client.h
Andre [Thu, 15 Jun 2006 14:58:18 +0000 (16:58 +0200)]
doxify client.h

and add documentation for enable_crypt() and enable_crypt().

14 years agodo not use STDIN as a fd for select
Andre [Thu, 15 Jun 2006 13:10:53 +0000 (15:10 +0200)]
do not use STDIN as a fd for select

It was a bad idea to do this to speed up scrolling as it confuses ncurses and
got even worse for nonblocking stdin.

Just decrease the select timeout instead.

14 years agoclient_common.c: clean up log messages
Andre [Thu, 15 Jun 2006 13:08:40 +0000 (15:08 +0200)]
client_common.c: clean up log messages

14 years agoupdate to libortp-0.10.0
Andre [Thu, 15 Jun 2006 12:21:02 +0000 (14:21 +0200)]
update to libortp-0.10.0

Actually, this version of libortp seems to have a bug which causes
the ortp receiver to segfault. Fix seems to be simple and is already
sent out to the linphone mailing list.

Moreover, Simon made msg_to_buf() static ;(
An easy solution to this problem is to provide an own version in
ortp_recv.c.

14 years agogui: mark all fds used for select() as non-blocking.
Andre [Thu, 15 Jun 2006 11:25:37 +0000 (13:25 +0200)]
gui: mark all fds used for select() as non-blocking.

14 years agointegrate para_client into para_audiod
Andre [Thu, 15 Jun 2006 10:43:27 +0000 (12:43 +0200)]
integrate para_client into para_audiod

This allows major simplifications:

- get rid of exec.o: para_audiod no longer executes any external
  programs
- get rid of close_on_fork.o
- get rid of the sigchld handler.

14 years agofix thinko in para_client's para_log()
Andre [Thu, 15 Jun 2006 08:50:38 +0000 (10:50 +0200)]
fix thinko in para_client's para_log()

14 years agoFix some format string warnings on Max OS
Andre [Thu, 15 Jun 2006 08:23:20 +0000 (10:23 +0200)]
Fix some format string warnings on Max OS

Trivial %d -> %zd conversions.

14 years agosplit client.c
Andre [Thu, 15 Jun 2006 08:07:53 +0000 (10:07 +0200)]
split client.c

new file: client.h
new file: client_common.c

This completes the preparations for including para_client into para_audiod.
client_common.c contains all functions that are also useful for para_audiod.

14 years agoaudiod clean_exit(): Only check status fd once
Andre [Thu, 15 Jun 2006 06:08:38 +0000 (08:08 +0200)]
audiod clean_exit(): Only check status fd once

The close_stat_pipe() already does this check.

14 years agoinit_tcp_socket: close socket fd on errors
Andre [Thu, 15 Jun 2006 06:06:44 +0000 (08:06 +0200)]
init_tcp_socket: close socket fd on errors

The current code may leak the fd if bind fails, for example.  This is
a benign bug however, since all paraslash applications that call
init_tcp_socket() terminate on errors anyway.

But it is no good idea to rely on this, so close the fd on errors.

This patch also gets rid of the do_bind() one-liner which was only
called from init_tcp_socket().

14 years agooverview.sk: update to 0.2.13
Andre [Wed, 14 Jun 2006 14:34:50 +0000 (16:34 +0200)]
overview.sk: update to 0.2.13

14 years agoreformat audioc.ggo
Andre [Tue, 13 Jun 2006 11:45:30 +0000 (13:45 +0200)]
reformat audioc.ggo

for better readability.

14 years agoaudioc: kill unused --timeout option
Andre [Tue, 13 Jun 2006 11:41:20 +0000 (13:41 +0200)]
audioc: kill unused --timeout option

14 years agoaudioc: Kill debugging output
Andre [Tue, 13 Jun 2006 11:39:23 +0000 (13:39 +0200)]
audioc: Kill debugging output

14 years agoMake INSTALL, README and README.mysql grutatext-friendly
Andre [Tue, 13 Jun 2006 11:34:38 +0000 (13:34 +0200)]
Make INSTALL, README and README.mysql grutatext-friendly

14 years agomark all fds used for select() as non-blocking
Andre [Tue, 13 Jun 2006 09:41:28 +0000 (11:41 +0200)]
mark all fds used for select() as non-blocking

This shouldn't matter much, but there _are_ (rare) situations where
an fd is marked ready for reading, but a subsequent read will block
nevertheless. It's never wrong to use non-blocking fds, so just do it.

This patch also includes a check in para_fd_set() which spots blocking
fds as they are added to the fd sets. This check is commented out
for performance reasons but can easily be activated.

14 years agoget rid of init_shed()
Andre [Tue, 13 Jun 2006 04:26:45 +0000 (06:26 +0200)]
get rid of init_shed()

Instead, the first call to register_task initializes the scheduler.
User-friendly. Also, make pre_select_list and post_select_list static.

14 years agodoxify missing bits
Andre [Tue, 13 Jun 2006 03:15:52 +0000 (05:15 +0200)]
doxify missing bits

This makes the documentation complete again.

14 years agocomplete documentation of stdin.* and stdout.*
Andre [Tue, 13 Jun 2006 01:53:48 +0000 (03:53 +0200)]
complete documentation of stdin.* and stdout.*

14 years agodoxify stdout.c
Andre [Tue, 13 Jun 2006 01:30:48 +0000 (03:30 +0200)]
doxify stdout.c

14 years agofix documentation of get_host_info()
Andre [Tue, 13 Jun 2006 01:14:33 +0000 (03:14 +0200)]
fix documentation of get_host_info()

14 years agodoxify stdin.h
Andre [Tue, 13 Jun 2006 01:11:14 +0000 (03:11 +0200)]
doxify stdin.h

14 years agoAdd scheduler documentation
Andre [Mon, 12 Jun 2006 13:17:06 +0000 (15:17 +0200)]
Add scheduler documentation

and a GPL header

14 years agofix cut-and paste typo.
Andre [Mon, 12 Jun 2006 13:16:01 +0000 (15:16 +0200)]
fix cut-and paste typo.

14 years agomake para_client use the scheduler.
Andre [Mon, 12 Jun 2006 08:44:54 +0000 (10:44 +0200)]
make para_client use the scheduler.

14 years agostdout pre_select(): use a minimal delay on input eof
Andre [Mon, 12 Jun 2006 07:36:59 +0000 (09:36 +0200)]
stdout pre_select(): use a minimal delay on input eof

14 years agostring.c: fix split_args()
Andre [Mon, 12 Jun 2006 07:34:08 +0000 (09:34 +0200)]
string.c: fix split_args()

If the submitted command started with a newline, the number of
arguments was calculated as zero.

14 years agoclient: introduce client_open()
Andre [Mon, 12 Jun 2006 04:01:55 +0000 (06:01 +0200)]
client: introduce client_open()

and reorder some functions.

14 years agoMake crypo a per fd feature
Andre [Mon, 12 Jun 2006 03:51:41 +0000 (05:51 +0200)]
Make crypo a per fd feature

The current code checked if the global pointers crypt_function_recv and
crypt_function_send are non-NULL. In this case it used the given crypt
functions unconditionally for each fd. This makes it messy to enable
crypto only for some fds.

This patch removes these global pointers in favour of an array of
crypt function pointers. Users may use this function to activate
crypto for each fd separately.

14 years agomove rc4_send_key and rc4_recv_key to struct private_client_data
Andre [Mon, 12 Jun 2006 01:26:08 +0000 (03:26 +0200)]
move rc4_send_key and rc4_recv_key to struct private_client_data

14 years agoclient: preparations for sched conversion
Andre [Mon, 12 Jun 2006 01:18:16 +0000 (03:18 +0200)]
client: preparations for sched conversion

This introduces struct private_client_data and replaces para_client's
get_options() by client_parse_config().

14 years agoclient: rename "args_info" to "conf"
Andre [Sun, 11 Jun 2006 23:17:56 +0000 (01:17 +0200)]
client: rename "args_info" to "conf"

just to be consistent.

14 years agoaudioc: do not duplicate E_CREDENTIALS
Andre [Sun, 11 Jun 2006 08:17:48 +0000 (10:17 +0200)]
audioc: do not duplicate E_CREDENTIALS

14 years agoaudioc: use the error subsystem
Andre [Sun, 11 Jun 2006 08:03:30 +0000 (10:03 +0200)]
audioc: use the error subsystem

and provide a non-empty log-function.

14 years agounify web pages
Andre [Sun, 11 Jun 2006 01:40:56 +0000 (03:40 +0200)]
unify web pages

reformat the text files to make them more friendly to grutatext
and make the headlines of the static pages look the same. Also, remove
the diffstats from NEWS.

Good enough for now.

14 years agoFEATURES: reformat to grutatext-friendly style
Andre [Sun, 11 Jun 2006 00:26:02 +0000 (02:26 +0200)]
FEATURES: reformat to grutatext-friendly style

14 years agorevert recent css changes
Andre [Sat, 10 Jun 2006 21:36:32 +0000 (23:36 +0200)]
revert recent css changes

14 years agoaudiod_command.c: fix doxygen file documentation
Andre [Sat, 10 Jun 2006 21:34:25 +0000 (23:34 +0200)]
audiod_command.c: fix doxygen file documentation

14 years agodelete level3 in grutatext output
Andre [Sat, 10 Jun 2006 21:26:33 +0000 (23:26 +0200)]
delete level3 in grutatext output

14 years agocss test
Andre [Sat, 10 Jun 2006 21:17:19 +0000 (23:17 +0200)]
css test

14 years agoweb: replace <pre> by <p>
Andre [Sat, 10 Jun 2006 21:02:23 +0000 (23:02 +0200)]
web: replace <pre> by <p>

14 years agoaacdec: Introduce error_count
Andre [Sat, 10 Jun 2006 01:29:27 +0000 (03:29 +0200)]
aacdec: Introduce error_count

and abort after 20 consecutive errors.

14 years agoaudiod: move af_status to struct status_task.
Andre [Thu, 8 Jun 2006 03:01:05 +0000 (05:01 +0200)]
audiod: move af_status to struct status_task.

Also add some documentation of struct status_task.

14 years agosplit audiod
Andre [Wed, 7 Jun 2006 18:17:11 +0000 (20:17 +0200)]
split audiod

move everything that is related to audio commands to the new file
audiod_command.c. Also, simplify the handling of the current time:
The "now" pointer is no longer a field of the sched struct but is
globally visable for read-only access.

14 years agopara_client: use the error subsystem
Andre [Tue, 6 Jun 2006 08:33:17 +0000 (10:33 +0200)]
para_client: use the error subsystem

14 years agoclient: always log to stderr
Andre [Tue, 6 Jun 2006 06:10:16 +0000 (08:10 +0200)]
client: always log to stderr

14 years agodccp_send/http_send: add all fds to close_on_fork_list
Andre [Tue, 6 Jun 2006 01:01:59 +0000 (03:01 +0200)]
dccp_send/http_send: add all fds to close_on_fork_list

This caused para_audiod not to recognize the receiver eof because a
child of the server still had the peer fd open. Nasty.

14 years agostruct writer: kill unused write_pointer and update documentation
Andre [Tue, 6 Jun 2006 00:23:10 +0000 (02:23 +0200)]
struct writer: kill unused write_pointer and update documentation

The file writer even had an implementation of the unused write function.

14 years agoaudiod: kill is_frozen() test
Andre [Tue, 6 Jun 2006 00:05:32 +0000 (02:05 +0200)]
audiod: kill is_frozen() test

Just compute the time difference in open_current_receiver()
and set the scheduler timeout accordingly if neccessary.

14 years agofix multiple simultaneous writers
Andre [Mon, 5 Jun 2006 23:13:11 +0000 (01:13 +0200)]
fix multiple simultaneous writers

This broke during the integration of the writers into para_audiod
was was noticed only recently.

14 years agosimplify writer node group
Andre [Mon, 5 Jun 2006 20:51:43 +0000 (22:51 +0200)]
simplify writer node group

It's not neccessary to register a task for each writer in the wng.
So use only one task for the wng that calls the writer's pre_select()
and post_select().

14 years agosched: nuke "flag" field of struct task
Andre [Mon, 5 Jun 2006 19:46:17 +0000 (21:46 +0200)]
sched: nuke "flag" field of struct task

It is unused. Kill PRE_ADD_TAIL and POST_ADD_TAIL too.

14 years agoget_task_list(): construct a more detailed list
Andre [Mon, 5 Jun 2006 19:41:15 +0000 (21:41 +0200)]
get_task_list(): construct a more detailed list

14 years agodo not ignore SIGPIPE
Andre [Mon, 5 Jun 2006 19:40:10 +0000 (21:40 +0200)]
do not ignore SIGPIPE

this _might_ solve problems with hanging audiod process. Also, mention the
name of the receiver in the task status.

14 years agoalsa_writer pre_select: Only set a small timeout if really neccessary.
Andre [Mon, 5 Jun 2006 19:38:17 +0000 (21:38 +0200)]
alsa_writer pre_select: Only set a small timeout if really neccessary.

14 years agogttp_send: kill http_shutdown_clients_real()
Andre [Mon, 5 Jun 2006 19:18:16 +0000 (21:18 +0200)]
gttp_send: kill http_shutdown_clients_real()

as it is identical to http_shutdown_clients().

14 years agohttp_send: shutdown clients even if status is not yet HTTP_STREAMING
Andre [Sun, 4 Jun 2006 23:36:58 +0000 (01:36 +0200)]
http_send: shutdown clients even if status is not yet HTTP_STREAMING

It's better to let the client reconnect than to send a stream it did not
expect. Clean up a superfluous return statement.

14 years agowrite_common: get rid of POST_ADD_TAIL
Andre [Sun, 4 Jun 2006 23:32:34 +0000 (01:32 +0200)]
write_common: get rid of POST_ADD_TAIL

just register the tasks the other way round.

14 years agoMore audiod fixes
Andre [Sun, 4 Jun 2006 20:59:38 +0000 (22:59 +0200)]
More audiod fixes

The bug-quality rises. This patch fixes

the select timeout after receiver open. As the pre_select
function of the receiver just opened will be called _after_
the upcoming select call, we might block for the time of that
call. Only afterwards, the receiver can change the timeout. Fix
this problem by changing the timeout to a minimum from within
start_receiver() (which gets called by audiod_pre_select()).

Resume on server restart. This was broken by design as it
used sleep() and also caused problems with the alsa writer
being restarted too early. We can do much better with the
new scheduler, so introduce a new field "restart_barrier" in
struct status_task and restart para_client and the receivers
not before this time.

Also, set the default timeout to a ridiculous value to detect further
timeout problems and do not kill the decoders even if the status pipe
went south.

14 years agofilter_chain: Don't return eof too early
Andre [Sun, 4 Jun 2006 19:52:00 +0000 (21:52 +0200)]
filter_chain: Don't return eof too early

The current code may miss to transform the remaining buffer if the
receiver has already deactivated its task. Check for the number of
loaded bytes in the input buffer of the filter chain and return eof
only if nothing is loaded.

14 years agoadd some debugging to fd.c
Andre [Sun, 4 Jun 2006 19:48:34 +0000 (21:48 +0200)]
add some debugging to fd.c

Detect an invalid fd if passed to para_fd_set and abort in this case.
A typical "values of beta will cause dom!" candidate.

14 years agokill some dead code
Andre [Sun, 4 Jun 2006 19:45:21 +0000 (21:45 +0200)]
kill some dead code

if pdd is NULL, we have more serious problems, so kill the check.

14 years agosome audiod fixes
Andre [Sun, 4 Jun 2006 19:44:17 +0000 (21:44 +0200)]
some audiod fixes

comment out code for unregistering the receiver node from close_receiver.

kill all decoders if !playing

try to close slots in audiod_post_select() rather than in pre_select().
This should fix BADFD error from select().

14 years agohttp_recv/dccp_recv: simplify post_select()
Andre [Thu, 1 Jun 2006 20:12:47 +0000 (22:12 +0200)]
http_recv/dccp_recv: simplify post_select()

14 years agosched/audiod feature: task list and kill
Andre [Thu, 1 Jun 2006 17:54:45 +0000 (19:54 +0200)]
sched/audiod feature: task list and kill

This allows to control the internal state of the scheduler.