Commit Graph

4377 Commits

Author SHA1 Message Date
ejurgensen
0c2773039b [-] Fix alsa.c null pointer deref + some minor bugs and do some housekeeping
Thanks to Denis Denisov and cppcheck for notifying about the below. The leaks
are edge cases, but the warning of dereference of avail in alsa.c points at
a bug that could probably cause actual crashes.

[src/evrtsp/rtsp.c:1352]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/httpd_daap.c:228]: (error) Memory leak: s
[src/library.c:280]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library.c:284]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library/filescanner_playlist.c:251]: (error) Resource leak: fp
[src/library/filescanner_playlist.c:273]: (error) Resource leak: fp
[src/outputs/alsa.c:143]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/alsa.c:657]: (warning) Possible null pointer dereference: avail
[src/outputs/dummy.c:75]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/fifo.c:245]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1806]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1371]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop.c:1471]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop_verification.c:705] -> [src/outputs/raop_verification.c:667]: (warning) Either the condition 'if(len_M)' is redundant or there is possible null pointer dereference: len_M.
2017-10-05 22:13:01 +02:00
ejurgensen
2d27d14f3d [docs] Update README: Hyperfine is only partially working 2017-10-03 23:05:29 +02:00
ejurgensen
1c377035f1 [raop] Restore ATV4/tvOS11 support by removing needless requirement for timing_port (closes #422) 2017-09-26 21:41:53 +02:00
ejurgensen
02e5f02e7f [configure] Fix misplaced av_* declaration checks 2017-09-17 00:34:20 +02:00
ejurgensen
c75097b02e [transcode] Log pix_fmt by name instead of enum 2017-09-17 00:00:24 +02:00
ejurgensen
eec98e3b7e [main/transcode] Fix some libav compability + log what ffmpeg/libav we are using 2017-09-16 23:01:42 +02:00
ejurgensen
7cc9a8b02b [httpd] Fix unused label when compiling without libwebsockets 2017-09-16 17:01:51 +02:00
chme
6c45b808c0 [httpd/jsonapi] Fix unused variables when compiling without (#421)
--enable-spotify
2017-09-16 12:37:32 +02:00
ejurgensen
ab6f599973 [docs] Adjust libwebsockets info in INSTALL 2017-09-16 09:19:56 +02:00
ejurgensen
c0814c56fd Merge pull request #420 from chme/web
[htdocs] Fix size of stats heading on mobile devices
2017-09-16 09:11:05 +02:00
chme
17162abedf [htdocs] Fix size of stats heading on mobile devices 2017-09-16 07:20:08 +02:00
ejurgensen
507bec8b8e [-] Fixup ifdef WEBSOCKET->HAVE_LIBWEBSOCKETS that I missed 2017-09-16 01:25:47 +02:00
ejurgensen
ef6f465aa8 [httpd_jsonapi] Add missing include 2017-09-16 00:10:26 +02:00
ejurgensen
f8c442ba38 [configure] Change so we enable/disable websockets based on libwebsockets >= 2.0.2 presence 2017-09-16 00:05:50 +02:00
ejurgensen
546362980b Merge pull request #408 from chme/web
Add a web api and a webinterface
2017-09-15 23:15:49 +02:00
chme
da2e998c8d [listener] fix typo in comment for stored playlists 2017-09-15 18:49:04 +02:00
chme
ecfea82234 [httpd/spotify] Redirect to admin.html, remove old oauth interface 2017-09-15 18:49:04 +02:00
chme
e4e5fd5d59 [travis] Disable building with websocket support
Travis build runs on ubuntu 14.04 and the libwebsockets version does not
meet the required min version of 2.0.2
2017-09-15 18:49:04 +02:00
chme
4c9d94300a [doc] Update INSTALL 2017-09-15 18:49:04 +02:00
chme
b678542ad6 [htdocs] Add admin web interface 2017-09-15 18:49:04 +02:00
chme
2c51c6571a [misc] Add websocket to buildopts 2017-09-15 07:16:41 +02:00
chme
75eb5420fd [httpd/websocket/conf] Initial websocket implementation
If enabled (default) requires libwebsockets >= 2.0.2, can be disabled
with configure option --disable-websocket.
2017-09-15 07:14:08 +02:00
chme
0abf195347 [httpd/json] Add json api to httpd 2017-09-15 07:07:17 +02:00
chme
42b644020d [conf] Add "websocket_port" to config file 2017-09-15 07:04:18 +02:00
chme
f1e706ee8f [httpd] Allow browsers to cache static files
Setting the response headers "Cache-Control" and "Last-Modified" results
in clients being able to cache the response. For a subsequent request
for the same file, the browser sets the request header
"If-Modified-Since" with the value from "Last-Modified" from the last
response. The server (httpd.c) checks if the file has been modified and
if not returns HTTP 304 Not Modified.
2017-09-15 07:01:53 +02:00
chme
5d5ed42749 [main/misc] Add misc-function to retrieve enabled buildoptions 2017-09-15 07:01:53 +02:00
chme
a04604f693 [logger] New logdomain L_WEB for websocket/jsonapi implementation 2017-09-15 06:56:24 +02:00
chme
9275f7a938 [httpd] Expose function for authenticating admin requests 2017-09-15 06:56:24 +02:00
chme
1d49413070 [httpd/conf] Fix serving files from WEB_ROOT folder and enforce setting
the admin password

Changes the default for the admin password to be unset, by default only
allowing access to the WEB_ROOT files if accessed from localhost.
2017-09-15 06:56:24 +02:00
chme
9b84150f6e [misc_json] New function jparse_obj_from_evbuffer 2017-09-15 06:42:21 +02:00
chme
89fc1fa5b8 [misc/spotify] Move json helper functions into its own file 2017-09-15 06:42:21 +02:00
chme
a832e40bea [spotify] Add function spotify_login_user 2017-09-15 06:42:21 +02:00
chme
29c0264444 [spotify] Add spotify status info and notify about status changes 2017-09-15 06:42:21 +02:00
chme
7bf6aec3a6 [listener] New event type for spotify status changes 2017-09-15 06:42:21 +02:00
chme
f449204ea2 [spotify] Add support for calling sp_session_user_name 2017-09-15 06:42:21 +02:00
chme
4b49ce69e2 [pairing/listener] Add function to retrieve name of remote and notify
about start and finish of remote pairing requests
2017-09-15 06:42:21 +02:00
ejurgensen
b8face2642 [docs] Add another note about previous pairing file format (closes #417) 2017-09-09 19:00:19 +02:00
ejurgensen
400f4ef3ee [main] Fix typo 2017-09-08 08:19:49 +02:00
ejurgensen
c27448418c [httpd/mpd] Make sure daemons listen on both ipv4 and ipv6 if enabled
Before setting ipv6 = enabled on FreeBSD would make the daemon not listen on ipv4
2017-09-07 23:14:18 +02:00
chme
ae446046f5 [mpd] Notify mpd clients on library update events 2017-08-27 11:54:32 +02:00
chme
f81d33701b [listener/library] Notify listeners about start/finish of library update 2017-08-27 11:54:32 +02:00
chme
0b2ee5a9eb [db/mpd] Simplify getting file count from db 2017-08-27 11:54:32 +02:00
ejurgensen
c45a85d143 [dacp] Fix issue where Hyperfine Remote provides speaker ids as decimal
Also align a bit on how we handle hex/dec parameters
2017-08-27 00:02:39 +02:00
ejurgensen
8c0be3a0f3 [docs] Improve Spotify login instructions 2017-08-26 10:33:54 +02:00
ejurgensen
1b8adc11ed [dmap] Use a wrapper for dmap_find_field()
Avoids the need to have definition of dmap_find_field in dmap_common.h that
must be kept in sync with the definition that gperf generates.

Also should fix compilation problems when gperf is not present, ref pr #390
2017-08-25 19:27:41 +02:00
ejurgensen
43abb18e4e [transcode] Fix illegal write when *icy_timer is null (fixes issue #412) 2017-08-20 23:08:36 +02:00
ejurgensen
2d3d641f41 Merge pull request #413 from chme/realpath
[misc] Replace m_realpath with realpath from stdlib.h
2017-08-12 21:52:30 +02:00
ejurgensen
05b15d9679 Merge pull request #384 from chme/storedplaylist3
[mpd] Initial support for stored playlists
2017-08-12 21:49:08 +02:00
chme
14877a49e0 [misc] Replace m_realpath with realpath from stdlib.h 2017-08-12 13:35:22 +02:00
chme
d477294809 [filescanner] Guard against modifying files outside the library and
guard against creating m3u playlists with the same virtual path like pls
playlists
2017-08-12 10:22:18 +02:00