Commit Graph

37 Commits

Author SHA1 Message Date
Scott Shambarger 8e3797ec43 [threads] Update mutex/cond functions to use new CHECK_ERR macros
Added various macros to check return values and log any errors and abort
if the call fails.
Updated logging to handle early errors before logging initialized.
2017-01-21 07:11:20 -08:00
Scott Shambarger b54d94fda6 [threads] Added missing initializers, check errors on mutex/cond calls 2017-01-13 17:32:59 -05:00
Scott Shambarger ce4ef0aa23 [config] Many updates to configuration and feature checks
- Added custom checks for libraries and pkgconfig modules that test library
 presence with additional checks for use of headers and functions with
 given options.  Also support correct additional feature library checks
 using provided flags.
- Added custom enable/disable feature macros to simplify their use.
- Use custom CFLAGS and LIBS variables for Makefiles to simplify maintenance.
- Update many feature checks from platform to function.
- Streamline many function checks.
- Correctly check gnutls, gcrypt and gpg-error libraries.
- Fix chromecast and spotify config and compile on FreeBSD
- Added inotify, signalfd and kqueue, and byte swap checks.
- Many clarifications of error messages.
- Correct json-c checks to properly use supplied CFLAGS.
- Correct many quoting inconsistencies
- Use __DATE__ in place of BUILDDATE
- Use full path for gperf and antlr3
- Remove unnecessary CFLAGS
- Added tests for pthread_setname_np parameters
- Added tests for clock_gettime and timer_settime
- Added tests for time.h
- Test if pthread, dl and rt libs are required/available.
- Updated checks for libunistring
2017-01-06 00:44:18 -08:00
ejurgensen 03513c56a8 [mdns] Simplify avahi implementation, e.g. drop record browser
- record browser and link level filtering doesn't seem required (I may regret this...)
- fix cast.c so it does not browse for ipv6 when disabled
2016-10-15 19:12:56 +02:00
ejurgensen d3078c6534 [remote] Increase pairing success log level 2016-07-10 20:38:03 +02:00
ejurgensen b454a2fd60 [general] Put back support for platforms without pipe2(), see issue #239 2016-03-17 22:20:16 +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 ada7ccca8f Change log level of .remote message to ease pairing troubleshooting 2014-06-02 21:08:24 +02:00
ejurgensen 5b4ef31758 Migrate all evhttp to non-deprecated libevent2
- well except a troublemaker in httpd_daap.c (req->flags &= ~EVHTTP_PROXY_REQUEST)
2014-05-29 23:22:00 +02:00
ejurgensen 687f349927 Let configure check libevent version and include according to version 2014-03-13 23:33:35 +01:00
ejurgensen 6decdf4eaf Some more Remote pairing logging 2014-01-27 20:36:54 +01:00
ejurgensen 47c61454b6 Minor log message change 2014-01-09 23:01:21 +01:00
ejurgensen b4e1e380e6 Up the level of the Remote discovery pairing log message 2014-01-07 00:06:46 +01:00
Julien BLACHE 52dcd4cb10 Add default case to address family switch for maximum compiler happiness 2011-04-30 11:41:12 +02:00
Julien BLACHE c1fae0012d Add support for DOS-encoded pairing files 2011-04-07 21:01:16 +02:00
Julien BLACHE 4868a3946f Remote pairing wants IPv4 only from mDNS
The pairing process only listens on IPv4 at the moment.
2011-03-10 21:08:45 +01:00
Julien BLACHE 6cd59a1240 Introduce mDNS browser flags for address type selection
Allow each user to specify the address types that should be returned
through the mDNS browse callback.
2011-03-10 21:08:25 +01:00
Julien BLACHE 8411aa48b7 Keep Avahi code inside mdns_avahi.c 2010-09-18 17:25:50 +02:00
Julien BLACHE 7ba3b23f63 Rename mdns_avahi.h to mdns.h 2010-09-18 17:24:34 +02:00
Julien BLACHE d5d1a2d3cb Move code around, no functional changes 2010-09-15 19:05:39 +02:00
Julien BLACHE c9818e9269 Add IPv6 support to Remote pairing agent 2010-05-14 17:37:13 +02:00
Julien BLACHE 4bd09cba62 Browse and resolve mDNS services on both IPv4 and IPv6 2010-05-14 17:36:29 +02:00
Julien BLACHE 6de5c64670 Do not free evhttp_request after make_request() call
At that point, the request has been added to the connection and will be
freed when the connection is freed.
2010-05-08 12:05:52 +02:00
Julien BLACHE e3fb8f00cf Maintain libhash in the conffile module 2010-05-02 11:21:07 +02:00
Julien BLACHE 19b6780a3c Remove provisions for multi-library support
It is now clear that multi-library support will not happen, so remove whatever
provisions were in the code for that.

It comes with a small change to the configuration file, too.

With this, DB schema version went to 9.
2010-03-19 19:09:18 +01:00
Julien BLACHE c9e91532b3 Get rid of the intermediate buffer in itunes_pairing_hash()
No need to build the string to be hashed in advance, it can just
be written piece by piece to the md.
2010-02-22 17:49:24 +01:00
Julien BLACHE 2b4f07195a Kill leftover includes 2010-02-06 07:25:44 +01:00
Julien BLACHE 71a40c5149 Simplify the iTunes pairing hash using standard MD5
The pairing hash actually uses standard MD5, so let's simplify the
code by using a standard MD5 implementation. Now that function is
readable and understandable by mere mortals.

Thanks to Jeff Sharkey for posting that simplified version.
2010-02-05 18:39:03 +01:00
Julien BLACHE cb4320791b Use eventfd instead of pipes if available
eventfd has less overhead than a pipe, works as a counter and uses a
single fd. Use it on Linux if available (that should be pretty much
always given the glibc and kernel requirements).
2010-02-04 18:52:13 +01:00
Julien BLACHE 115d28e24a Parse pairing response and save pairing GUID
The pairing GUID will be used later on to authenticate the Remote
instance when it logs in.
2010-01-30 17:30:22 +01:00
Julien BLACHE dfa3db7732 Use struct pairing_info in struct remote_info 2010-01-30 17:30:22 +01:00
Julien BLACHE 2924a98f1a Fix pairing_cb() - readd event after pairing 2010-01-30 17:30:21 +01:00
Julien BLACHE f425eddb62 Clean up remote list at deinit 2010-01-28 19:19:16 +01:00
Julien BLACHE 7e3b6957b2 Move the pairing agent to the main thread
The pairing agent doesn't need a thread of its own, the main thread can host
it. Move it there and save a thread.
2010-01-25 17:55:11 +01:00
Julien BLACHE 854abd8026 Specify field width for pairing hash
No field width was specified when the 128bit hash is converted to a string;
make sure we get 8 hex digits per 32bit hash component.
2010-01-25 17:51:17 +01:00
Julien BLACHE e6234c35ad Fix field width for 64bit library name hash
Was 8 hex digits, should have been 16 hex digits.
2010-01-25 17:47:37 +01:00
Julien BLACHE 625b8e3177 Add a pairing agent for Remote
Remote is the iPod/iPhone application that can act as a remote control for
iTunes. Remote must be paired with an iTunes instance before it can control
it; this pairing process includes a challenge/response autentication.

This pairing agent makes it possible to pair Remote with a forked-daapd
instance. It is the very first step for Remote support.
2010-01-17 10:52:58 +01:00