1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00
Commit Graph

1471 Commits

Author SHA1 Message Date
Joseph Wallace
def5a4cf6c Implement EBML-aware parser.
* Loop over elements in input buffer.
* Most are literally copied with their contents without
  inspection into the header or data buffers as appropriate.
* Some only copy the element header, to allow inspecting
  children elements.
* Cluster elements are identified and used as sync points.

No probing is done for keyframes *yet*
2015-11-28 12:41:45 -05:00
Joseph Wallace
50c4984c78 Add functions to comprehend EBML tags. 2015-11-28 12:41:45 -05:00
Joseph Wallace
531d060d16 Adjust EBML parser writing protocol.
This will allow leaving unparsed data in the input buffer to wait for completion.
2015-11-28 12:41:45 -05:00
Joseph Wallace
13dc880d29 Yield sync point status from ebml_read directly.
This simplifies some fragile "was the last chunk a sync point?" logic.
2015-11-28 12:41:45 -05:00
Joseph Wallace
744b66c40e Make the state-machine nature of the EBML parser more evident. 2015-11-28 12:41:45 -05:00
Joseph Wallace
15e7fc6e4a Add comments & braces to format_ebml.c.
This should help make future changes to the code clearer.
2015-11-28 12:41:45 -05:00
Marvin Scholz
2ff8c50d3b Makefile: Fix commons include path 2015-11-28 17:15:42 +01:00
Marvin Scholz
b54afbc6be Correct AC_CONFIG_MACRO_DIRS to AC_CONFIG_MACRO_DIR for compatibility 2015-11-28 17:15:42 +01:00
Marvin Scholz
d16e091e25 Update submodule for more deprecated Makefile INCLUDES fixes 2015-11-28 17:15:42 +01:00
Marvin Scholz
d3c1dafa7e Change deprecated INCLUDES variable in Makefile 2015-11-28 17:15:42 +01:00
Marvin Scholz
4cd55dc166 Add missing AC_CONFIG_MACRO_DIRS and some configure.ac cleanup 2015-11-28 17:15:42 +01:00
Marvin Scholz
d6fa6891d3 Update m4 to fix a bunch of warnings 2015-11-28 17:15:42 +01:00
Marvin Scholz
95fb449d56 Add config.h.in~ to .gitignore 2015-11-28 17:15:42 +01:00
Philipp Schafft
24bc25ec38 Cleanup: fixed some compiler warnings 2015-11-28 11:30:34 +00:00
Philipp Schafft
d51b9afc49 Cleanup: unify util.h a bit with libshout. 2015-11-28 10:51:50 +00:00
Philipp Schafft
32216013b2 Cleanup: unify util.c a bit with libshout. 2015-11-28 10:44:05 +00:00
Marvin Scholz
2608422ce4 Add Makefile.md explicitly, as it does not match GNU naming 2015-11-28 10:57:43 +01:00
Marvin Scholz
0518157700 Correct configure.in name to configure.ac 2015-11-28 10:57:02 +01:00
Philipp Schafft
85b709da04 Merge branch 'matchfile' 2015-11-23 13:01:23 +00:00
Philipp Schafft
752b2f90fe Cleanup: mark constant loopup tables read only 2015-11-23 12:47:56 +00:00
Philipp Schafft
a650965cfd Cleanup: make util_base64_encode() useful for binary data. 2015-11-23 12:47:47 +00:00
Philipp Schafft
de48bdd13f Cleanup: Removed unused member host vom connection struct 2015-11-23 11:44:14 +00:00
Philipp Schafft
69cf9ad6c2 added <errno.h> as we use errno 2015-11-23 11:41:25 +00:00
Philipp Schafft
b7d0188e1d Update: updated submodules 2015-11-22 18:52:15 +00:00
Philipp Schafft
c0e895404e Cleanup: mark key as const (why wasn't it const already?) 2015-11-22 18:47:11 +00:00
Philipp Schafft
b55bae035d Update: Improved matchfile API
This adds support for allow-deny kind of rules with the matchfile API.

See: #2119
2015-11-22 18:47:06 +00:00
Philipp Schafft
d24dda61d0 Cleanup: moved ban and allow file support into generic implementation
ban and allow file support has been moved into a generic implementation
that can be re-used by later code such as proxy matching or other
blacklisting.
See: #1959
2015-11-22 18:47:00 +00:00
Philipp Schafft
3653a1f812 updated submodules 2015-11-19 10:47:08 +00:00
Philipp Schafft
8e2fe8a3f7 Fix: Handle mount=NULL in config_find_mount() correctly. 2015-11-11 12:18:15 +00:00
Philipp Schafft
1653d7489a Fix: corrected comment about <shoutcast-mount>
When unset no default is used but the feature is disabled.
(The Shoutcast listen socket is not opened at all.)

Thanks to Jeremiah Rogers for pointing out.
2015-09-10 14:53:44 +00:00
Marvin Scholz
ae83ea8705 Fix two mistakes in the default config's comments 2015-08-31 22:31:31 +02:00
Philipp Schafft
f5d728d730 Fix: Include required headers 2015-08-10 08:54:21 +00:00
Marvin Scholz
16dac2505e Fix that global listener count could be negative under certain circumstances
This fixes a bug that could cause the global listener count of Icecast to
be negative. This was caused due to wrong handling of errors in the
format_prepare_headers function.

Fixes: #2199

Thanks a lot to Simeon Völkel (0xBD4E031CDB4043C9) for reporting
and investigating the bug.
2015-06-06 14:09:44 +02:00
Marvin Scholz
c35760cd50 Fix possible segfaults when header allocation fails
This fixes some possible segfaults that could happen if the header
(re)allocation fails.
2015-06-06 14:09:44 +02:00
Thomas B. Ruecker
2b9440d671 Clarify spelling, shamelessly lifted from Mailman3
Also adjust formatting a bit, kill some trailing spaces.
2015-05-25 13:12:08 +00:00
Thomas B. Ruecker
56bbc0d12c Fix issue with only "-" and whitespace in element
Fixes: #2198

If there is a single "-" or it is only accompanied by whitespace, then
it wouldn't get escaped as it was detected as as a number. This would
produce invalid JSON.
This makes the numbers part ignore such and thus ensures it gets escaped
as text.

There might be other corner cases related to number parsing, this should be investigated.
2015-05-25 12:56:45 +00:00
Thomas B. Ruecker
0b1ac3e9d5 Essential part of upstream pull req No. 20
https://github.com/doekman/xml2json-xslt/pull/20

 Some numeric values would not get formatted to valid JSON. This
 incorporates the suggestions from issue #15.

Also fixed whitespace of original patch.
Additional fix for related issue will follow.
2015-05-25 12:56:45 +00:00
Philipp Schafft
3d2ab9aec2 Fix: Handle case realloc() is used as free().
This (hopefully) corrects the usage of realloc() as free().
This patch is part of the series based on Denis Denisov's input.
2015-04-08 13:05:10 +00:00
Philipp Schafft
6605f4ddaa Fix: Let util_url_escape() handle NULL parameter.
This let util_url_escape() handle NULL passed as parameter.
In case the parameter is NULL it will also return NULL.

This patch also does some cleanup of the code such as migration
away from int and thus avoiding future failtures.

This is a re-apply of 3baa4e46aa
as git refuses to cherry-pick.
2015-04-08 10:25:25 +00:00
Philipp Schafft
c1f0eaff8a Fix: Fixed some smaller bugs such as leaks and performance improvements.
This is a first commit to correct minor problmes reported by
Denis Denisov. There is likely another commit to correct some more
such problems.

Thank you Denis Denisov.
2015-04-08 09:36:59 +00:00
Philipp Schafft
7402383448 Cleanup: move libcurl specifc code into curl.c
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].

Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
  According to the manpage for curl_easy_setopt()/CURLOPT_URL
  there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
  as User-Agent:, this has be corrected to what is set in the config
  file.
* As curl.c is now a single point for setting parameters all the TLS
  parameters should be reviewed and set (based on config).

Please test!
2015-04-08 07:44:36 +00:00
Philipp Schafft
a1f204c184 Cleanup: Renamed <kartoffelsalat> to <event-bindings>
The parent element for <event> was renamed from <kartoffelsalat>
to <event-bindings> as discussed on the mailinglist and on IRC.
2015-03-31 08:20:37 +00:00
Philipp Schafft
2661d4360e Cleanup: More space corrections 2015-03-31 08:14:42 +00:00
Philipp Schafft
8455dbde57 Cleanup: corrected a space 2015-03-31 08:03:28 +00:00
Philipp Schafft
bfbb8f207c Feature: playlist history for ICY based streams.
This patch adds support for history for ICY based streams.
Of cause this has the same limits for metedata as ICY has.

See: #766
2015-03-28 18:14:41 +00:00
Philipp Schafft
961453b0de Added config option for history size.
This adds a <max-history> config option to the <mount> section.
Default is a history size of 4.

See: #766
2015-03-28 17:34:35 +00:00
Philipp Schafft
06fe442c2d Fixed off-by-one error in playlist truncation.
The playlist truncation (may_tracks) was off by one.
This fixes the problem.
2015-03-28 17:33:09 +00:00
Philipp Schafft
5f77b35d14 Initial patch for playlist history support.
This allows to store a history of played songs along the source
object and report it as part of the status XML.

Additional work needs to be done to make this configurable.
Also format_mp3.c needs work to support this.

A generic song changed handler should be implemented to handle this
in a nice way.
That one should also be the point to call logging_playlist().

See: #766
2015-03-28 16:15:49 +00:00
Philipp Schafft
8d513db405 Added operation mode (omode) "strict".
This adds the operation mode "strict". It does not yet have
any specific features and alias the "normal" mode.
This change is mostly to make the setting of "strict" valid
so it can be used already.
2015-03-27 11:15:22 +00:00
Philipp Schafft
5dac23adda Renamed config file SSL references to TLS.
As we do not support any SSL version but TLS this renames
all TLS related config options. Docs still need to be updated.
Close still uses 'ssl' internally e.g. for variable names.
This should be changed on a later patch.
2015-03-27 11:08:50 +00:00