OpenBSD CVS

CVS log for src/usr.bin/sndiod/file.c


[BACK] Up to [local] / src / usr.bin / sndiod

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:03 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.25 / (download) - annotate - [select for diffs], Wed Nov 27 08:18:22 2019 UTC (4 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Initialize nfds fields of new file structures.

Fixes a possible crash when a new file structure is added in the
time-out processing code-path.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Oct 27 04:37:47 2016 UTC (7 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Fix many typos in comments, from Michael W. Bombardieri <mb at ii.net>

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jun 30 21:37:29 2016 UTC (7 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.21: +6 -6 lines
Diff to previous 1.21 (colored)

Use CLOCK_UPTIME instead of CLOCK_MONOTONIC, as the later makes jumps
during suspend/resume cycles which triggers watchdog time-outs and
in turn prevents sndiod from resuming.

Revision 1.21 / (download) - annotate - [select for diffs], Wed May 25 05:37:12 2016 UTC (7 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.20: +1 -4 lines
Diff to previous 1.20 (colored)

Log files skipped during poll() as well, and flush the log buffer
right before we call poll().

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jan 18 11:41:13 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

Allow time differences between two clock_gettime() calls to
be up to 60s without logging a warning.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 8 16:17:31 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Make code fit in 80 columns, remove trailing spaces & tabs.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 8 13:09:42 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.17: +10 -10 lines
Diff to previous 1.17 (colored)

On programming error, flush log buffer and abort() rather than
calling exit().

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 8 10:50:26 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +0 -4 lines
Diff to previous 1.16 (colored)

remove redundant debug message

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 8 10:44:15 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.15: +12 -10 lines
Diff to previous 1.15 (colored)

Don't calculate clock deltas is there are no time-outs. Removes (harmless)
warnings about out-of-bounds clock deltas.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Aug 27 07:38:38 2015 UTC (8 years, 8 months ago) by ratchov
Branch: MAIN
Changes since 1.14: +4 -3 lines
Diff to previous 1.14 (colored)

backout previous for now, as it causes me portability problems

Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 11 16:49:50 2015 UTC (8 years, 9 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Use INTIM instead of -1 as poll(2) time-out argument.

Suggested by deraadt.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Aug 11 16:43:04 2015 UTC (8 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +13 -4 lines
Diff to previous 1.12 (colored)

Don't call poll(2) with few millisecond time-out argument when -1
could be used. Avoids syscalls when the daemon is not being used.

Requested by deraadt.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Aug 1 10:47:30 2015 UTC (8 years, 9 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +74 -44 lines
Diff to previous 1.11 (colored)

Move processing of polled files in its own function, and call it
twice: once for files that need immediate handling, and once for files
that would block. No behavior change.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 17 10:15:24 2015 UTC (8 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.10: +22 -21 lines
Diff to previous 1.10 (colored)

Use an offsets in the array of pollfd structures instead of pointers. No
behaviour change.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 17 09:51:18 2015 UTC (8 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

rename nfds to max_nfds, no object change

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 17 09:43:28 2015 UTC (8 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Move non-debug varibles outside #ifdef DEBUG block

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 17 09:37:07 2015 UTC (8 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +25 -43 lines
Diff to previous 1.7 (colored)

Simplify debug info: log poll descriptors on a single line, record
timestamps only when they are needed.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 17 08:14:48 2015 UTC (8 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +3 -39 lines
Diff to previous 1.6 (colored)

Stop using interval timers (not inherited by fork(2), obsolete in
newer posix releases), use the poll(2) timeout parameter instead.
Fixes hangs during clean-up after the audio device is disconnected
or an unrecoverable error is detected. Suggested by and discussed
with millert@.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 16 06:26:24 2015 UTC (9 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.5: +23 -16 lines
Diff to previous 1.5 (colored)

Allow files to be skipped in the poll(2) event loop, in case
there are events already available (for immediate processing)

Revision 1.5 / (download) - annotate - [select for diffs], Mon Mar 17 17:17:01 2014 UTC (10 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

fix wrong file status strings

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 18 17:37:45 2013 UTC (10 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.3: +6 -1 lines
Diff to previous 1.3 (colored)

add missing prototypes

Revision 1.3 / (download) - annotate - [select for diffs], Fri Feb 1 09:06:27 2013 UTC (11 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.2: +3 -2 lines
Diff to previous 1.2 (colored)

if a device doesn't respond within two seconds, then just close it
and drop all connections. This is shameful but unfortunately it's
still necessery on certain MP machines and audio driver combinations

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 7 08:04:58 2012 UTC (11 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

move log_level in utils.h with other logging bits

Revision 1.1 / (download) - annotate - [select for diffs], Fri Nov 23 07:03:28 2012 UTC (11 years, 5 months ago) by ratchov
Branch: MAIN

Remplace aucat server by a new sndiod daemon aimed to be simpler
smaller and faster than aucat. It's a drop in replacement with the
following exceptions that don't affect the default setup:
  - The sample rate and the encoding are a per-device parameters
    thus -r and -e options must precede the corresponding -f option
  - MIDI thru boxes are dynamically created and no -M option
    is required anymore, so -M was removed.
  - MIDI ports are exposed with a new ``midi/N'' name, rather
    than abusing MIDI thru boxes.
with help from armani@, ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.