Commit Graph

28 Commits

Author SHA1 Message Date
ejurgensen
2318739a58 [evrtsp] Proper enum return type for evrtsp_parse_headers + evrtsp_parse_firstline
Fixes compiler warnings
2023-04-25 23:09:25 +02:00
ejurgensen
5f342ea60b [httpd/artwork] Drop support for libevent <2.1.4 2023-03-07 21:01:10 +01:00
ejurgensen
0bc574fafe [rtsp] Coverity fixups 2022-01-20 20:17:38 +01:00
ejurgensen
5f1686695a [-] Name update forked-daapd -> owntone throughout the code 2021-04-24 23:54:20 +02:00
ejurgensen
b2b91998d9 [airplay] Fix decryption of large responses
If the response is large evrtsp will not read the entire message from the
socket. This change allows for decryption and parsing of partial messages.
2021-01-14 21:36:47 +01:00
ejurgensen
8368ca7686 [airplay] Add support for AirPlay 2
Includes
- Implementation in src/outputs/airplays2, type OUTPUT_TYPE_AIRPLAY
- Homekit pairing, both normal (with PIN) and transient
- New session startup sequence, incl GET /info, SETPEERS and 2 x SETUP
- No more OPTIONS and ANNOUNCE
- Use POST /feedback for keepalive instead of SET_PARAMETERS
- Sequence dispatching instead of callback chains
- Continue despite "Bad request" to SET_PARAMETER (volume)
- Opening of event connection to receiver (reverse rtsp connection)

Still to be done
- Password authentication
- Handling of events
2021-01-10 14:58:06 +01:00
ejurgensen
8b842be17f [evrtsp] Add support for SETPEERS and GET 2021-01-10 14:45:39 +01:00
ejurgensen
76cd982201 [rtsp] Shorten evrtsp timeouts, 45-50 sec is too long 2020-12-11 17:12:31 +01:00
chme
75432ce73f [rtsp] Initialize addr to avoid scan-build issue "Assigned value is
garbage or undefined"
2018-12-29 16:34:56 +01:00
ejurgensen
83b6bcebcd [raop] Use OPTIONS for keep_alive instead of GET_PARAMETER
Old Airport Express hangs up if we use GET_PARAMETER (despite announcing support
for it...), and since iTunes seems to use OPTIONS we also do that. We weren't
really using the return value of GET_PARAMETER anyway.

See also comment added to commit d9a67b6dce
2018-05-10 21:46:24 +02:00
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
467b652da0 [rtsp] Silence event_del warnings 2017-06-27 22:15:53 +02:00
ejurgensen
736979a9a2 [evrtsp] Add POST rtsp method - used for device verification 2017-06-18 01:31:23 +02:00
ejurgensen
f465f6a77d [raop] Fix possible incorrect address family in SDP 2017-05-04 19:31:26 +02:00
ejurgensen
45d513d206 [rtsp] Do not fail if ContentLength has chars after num value (e.g. whitespace) 2017-01-10 21:09:08 +01:00
ejurgensen
ce998fb38a [rtsp] Additional logging 2016-12-29 21:30:47 +01:00
ejurgensen
55104015e0 Full removal of libevent 1 legacy code. Also drop pipe() in FreeBSD, since pipe2 is available now. 2015-10-19 21:15:29 +02:00
ejurgensen
c740e6e3b0 Make compatible with libevent 2.0 by crippling streaming and ICY metadata (see issue #30) 2014-05-30 23:39:03 +02:00
chme
d5c6f1f72f Use EVBUFFER_EOL_CRLF for evbuffer_readln to make sure that the end of
the rtsp-header (an empty line) is recognized
2014-03-13 23:34:34 +01:00
ejurgensen
687f349927 Let configure check libevent version and include according to version 2014-03-13 23:33:35 +01:00
Julien BLACHE
0dac53f25c Kill unused variable len 2011-04-30 11:41:12 +02:00
Julien BLACHE
09a981807b Avoid leaking addr on error 2011-03-10 21:08:24 +01:00
Julien BLACHE
2d139d77a5 Export evrtsp_method() 2010-09-25 20:57:10 +02:00
Julien BLACHE
b78b90ad0e Remove useless #include <evhttp.h> 2010-09-12 18:43:22 +02:00
Julien BLACHE
09485b0ed8 Update evrtsp based on evhttp 1.4.14b
Up from 1.4.10.
2010-07-23 18:28:50 +02:00
Julien BLACHE
deae610965 evrtsp: Handle IPv6 scoped addresses 2010-07-10 12:36:40 +02:00
Julien BLACHE
ed38ce7dd1 Add IPv6 support to evrtsp 2010-05-14 17:36:41 +02:00
Julien BLACHE
992eb9009a Add evrtsp - RTSP implementation on top of libevent, derived from evhttp 2010-05-02 11:44:43 +02:00