summaryrefslogtreecommitdiff
path: root/stat.c (follow)
Commit message (Collapse)AuthorAge
* gui/audiod: Replace for_each_stat_item() by parse_status_items().Andre Noll2026-07-14
| | | | | | | | | | | | | | The old function received a callback, and called it once per item received. This inevitably leads to situations where one status item is already uptodate but others are not. The replacement function no longer takes a callback pointer but a pointer to the array of status items to update, and returns the mask of items that have changed. Parse errors are now regarded as implementation bugs. We still detect them and log an error, but the function can no longer fail. Remove print_all_items() from gui.c since this can now be done in one line by passing ~0 to print_stat_items().
* Kill E_SIZE_PREFIX.Andre Noll2026-05-24
| | | | E_STAT_ITEM_PARSE is a good fit as well.
* Move read_size_header() from string.c to stat.c.Andre Noll2026-05-24
| | | | | This way it can be static, and executables which don't need it don't contain a copy of this function.
* Switch to SPDX identifiers.Andre Noll2026-03-17
| | | | | | | | Generated with sed -i 's|Copyright.*Andre Noll.*|SPDX-License-Identifier: GPL-2.0 */|g' *.c *.h followed by manually tweaking the result a bit. No license change intended.
* Include regex.h from para.h.Andre Noll2025-05-19
| | | | Every .c file includes it anyway.
* Shorten copyright notice.Andre Noll2017-09-22
| | | | | | | | | | | | | | | | | | | | | The GPLv2 line does not add any additional information, so drop it. This leaves a single line of legalese text for most files, which is about the amount of screen real estate it deserves. This patch was created with the following script (plus some manual fixups): awk '{ if (NR <= 5) { gs = gensub(/.*Copyright.* ([0-9]+).*Andre Noll.*/, "\\1", "g") if (gs != $0) year = gs next } if (NR == 6 && year != "") printf("/* Copyright (C) %s Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */\n", year) print }'
* Update year in copyright headers.Andre Noll2015-01-12
| | | | | | | | | | | | | | | | Done with files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2014\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2014 Andre Noll/Copyright (C) \1 Andre Noll/1' $files In previous years we ran a similar script to set the second year in the range to the current year. This is kind of silly, so let's get rid of this useless information. This commit replaces "Copyright (C) A-B" by "Copyright (C) A" in all file headers, i.e. only the first year (A) is left in. Accurate information including time stamps for each change can be obtained from the git history.
* doc: Change email address to maan@tuebingen.mpg.deAndre Noll2014-08-18
| | | | | | | | | | | | | | 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
* Change copyright year to 2014.Andre Noll2014-02-22
| | | | | | | | | This year, we're really on time. The changes in this patch were created by the following silly script: files=$(git grep -l 'Copyright (C) [0-9]\{4\}\(-2013\)* Andre Noll') sed --in-place= -e 's/Copyright (C) \([0-9]\{4\}\)-2013 Andre Noll/Copyright (C) \1-2014 Andre Noll/1' $files sed --in-place= -e 's/Copyright (C) 2013 Andre Noll/Copyright (C) 2013-2014 Andre Noll/1' $files
* Change copyright year to 2013.Andre Noll2013-03-25
| | | | Better late than never.
* Change year in copyright message to 2012.Andre Noll2012-01-07
|
* Replace 2010 in copyright message by 2011.Andre Noll2011-01-17
|
* audiod: Fix status item parsing for long status items.Andre Noll2010-04-19
| | | | | | | | | | | | | | | | | | | This was broken since audiod started to use the buffer tree API. Actually there are two bugs which are both fixed by this patch: - for_each_stat_item() copies the remaining part of the buffer containing the incomplete part of the last status item to the beginning of the buffer. This is necessary if the buffer tree API is not used but messes up the buffer contents if it _is_ used. Move this memmove() call from for_each_status_item(), which is called from audiod.c and gui.c, to gui.c, as only gui.c needs it. - Secondly, audiod.c called btr_node_status() with an minimum input queue size of zero, which is does not work if a status item crosses a buffer boundary. In this case for_each_status_item() will only ever see the first buffer containing the incomplete status item, hence it can never make progress. Fix this by introducing the min_iqs field of struct status_task. Set this field to non-zero if the full buffer size was returned by for_each_status_item(), indicating that the next status item is spread out over two or more buffers.
* Change year in COPYRIGHT to 2010.Andre Noll2010-04-05
| | | | Hey, this is earlier than last year :)
* [btr] Documentation update.Andre Noll2010-01-17
|
* Move functions only needed by audiod from stat.c to audiod_command.c.Andre Noll2009-07-19
| | | | | | | | This was 4 out of 5 and thus should decrease the size of executables for non-Linux systems a bit as we don't use -fdata-sections -ffunction-sections and -Wl,--gc-sections there. Is also allows to remove some entries from para.h.
* Introduce para_regcomp.Andre Noll2009-07-08
| | | | | | | | | | | | | A wrapper for regcomp() that logs an error message if the regcomp() failed and uses a return value according to the paraslash rules. Currently there is only one user of regular expressions, is_v4_dot_quad(), which is converted to para_regex(), but new callers will be added soon. Unfortunately, this change made it necessary to include regex.h in all .c files that use string.h. Clean up the order in which headers are included a bit while we're at it. Maybe I should rethink the rule "Only .c files shall include header files"...
* Revamp status item handling.Andre Noll2009-07-04
| | | | | | | | | | | | | | | | | | | | This patch changes the way the status items are printed and parsed. The new parser-friendly format is used internally and, as a side effect, is also available as an new listing mode for the ls command and for the stat commands of both para_server and para_audiod. With the new format, each status item is prefixed by its size, and the status item identifier is printed as a numerical value. This simplifies the parsing code in para_audiod/para_gui a bit and should make it perform better as the status items do not have to be looked up by name. More importantly, the new format gets rid of the restriction that status items should not contain newline characters because the parser knows in advance how much it has to read to get the complete item. This restriction became a real problem as more and more audio files contain (version 2 id3) tags that contain much more than a single line. For example the linux podcast mp3 files contain the full content of the podcast as text in the command tag.
* Change year of copyright from 2008 to 2009.Andre Noll2009-01-10
|
* stat.c: Comment out noisy debug messages.Andre Noll2008-04-24
|
* Change year in Copyright comment from 2007 to 2008.Andre Noll2008-01-08
|
* 03_STAT_no-clients.diffGerrit Renker2007-12-17
| | | | | | Avoids messages like Dec 15 20:01:25 _tiptop 1 stat_client_write: 0 client(s) which would otherwise flood the debug log.
* stat.c: Simplify stat_client_write().Andre Noll2007-12-11
| | | | Use write_ok() instead of open coding.
* stat.c: Cosmetics.Andre Noll2007-11-17
|
* Use FOR_EACH_STATUS_ITEM everywhere.Andre Noll2007-11-10
|
* handle status items via autoconf.Andre Noll2007-11-10
|
* More status item renames.Andre Noll2007-11-02
| | | | | | | SI_LENGTH_MIN -> SI_BITRATE SI_LENGTH_SEC -> SI_FREQUENCY SI_ATTRIBUTES -> SI_ATTRIBUTES_BITMAP SI_UPTIME -> SI_ATTRIBUTES_TXT
* Rename audio_info status items and get rid of duplicate afh info.Andre Noll2007-11-02
| | | | | | | | SI_AUDIO_INFO1 -> SI_AUDIO_FILE_INFO SI_AUDIO_INFO2 -> SI_TAG_INFO1 SI_AUDIO_INFO3 -> SI_TAG_INFO2 The mp3 and the ogg afh stored bits of information in the info string. Only store there what is not already contained in afh_info.
* Rename length status item to seconds_total and print it only once.Andre Noll2007-11-01
|
* Add LYRICS_ID status item.Andre Noll2007-10-23
|
* Replace status item SELECTOR by IMAGE_ID.Andre Noll2007-10-23
|
* Replace status item DBINFO3 by DIRECTORY.Andre Noll2007-10-23
|
* stat.c: Fix a typo.Andre Noll2007-10-23
|
* Replace status item STATUS_BAR to BASENAME.Andre Noll2007-10-23
| | | | as this is what it actually contains.
* Replace status item DBINFO2 by ATTRIBUTES.Andre Noll2007-10-23
|
* Change dbinfo1 stat item and use it from afs.Andre Noll2007-10-23
|
* Make para_fsck work without specifying tables.Andre Noll2007-09-20
| | | | | Also, move some fd related functions from osl.c to fd.c and introduce para_opendir().
* Merge the new afs code.Andre Noll2007-09-08
|
* replace standard GPL header by a one-line pointer to COPYINGAndre Noll2007-06-28
|
* be more carful wrt. signed vs. unsigned argument passingAndre Noll2007-05-26
|
* add more missing documentationAndre Noll2007-02-10
|
* preparations for user list in memoryAndre2006-11-01
| | | | | | | | | | | | | | | | | | | | | | The idea is to not lookup the user file/rsa key for each connection/each buffer to be sent, but to load it only once on startup. This patch * renames list_add to para_list_add, as list_add is an exported symbol of mysql.h * makes get_key of crypt.c non-static and renames it to get_rsa_key. It is used from server.c to load the rsa key. * introduces struct _user, the new struct to hold user info. It is meant to replace the current struct user soon. * Introdoces init_user_list(), populate_user_list() and _get_user() in server.c. The latter is meant to replace get_user() of command.c The new functions are not used yet.
* improve and clean up audiod_status_dump()Andre2006-07-03
| | | | | | | | | 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
* add documentation of struct signal_taskAndre2006-06-15
| | | | and clean up documentation of struct stat_client as well.
* integrate para_client into para_audiodAndre2006-06-15
| | | | | | | | | 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.
* Kill noisy debug messageAndre2006-04-17
|
* improved version of split_args()Andre2006-04-10
| | | | | | | | Thanks to Lorenzo Bettini for pointing this out. This patch also fixes a bug with the default filter configuration which allocated too little memory for the array of filter configurations. Now we always allocate space for at least three entries.
* introduce para_select()Andre2006-04-07
| | | | | A simple wrapper for select(2) that checks for EINTR and restarts the select call in this case.
* stat_client_write(): add help text for new 'itemnum' parameterAndre2006-03-28
|
* audiod: boost the stat commandAndre2006-03-27
| | | | | | | It now takes any number of arguments, including zero which selects the old behaviour (dump _all_ status items to stdout). If called with arguments, each arg must be a valid status item and only these are written to sdout.