Max Kellermann
12de22d3bb
net/StaticSocketAdress: new class wrapping struct sockaddr_storage
2015-02-13 21:16:43 +01:00
Max Kellermann
4e30e74739
net/SocketAddress: light wrapper for struct sockaddr
2015-02-10 22:06:06 +01:00
Max Kellermann
42890b9acf
system/{Resolver,Socket{Error,Util}}: move to new library libnet.a
2015-02-10 22:06:06 +01:00
Max Kellermann
0cf57cc7ca
event/ServerSocket: remove obsolete macro DEFAULT_PORT
2015-02-10 20:27:45 +01:00
Max Kellermann
68fcbaf4c8
event/ServerSocket: remove obsolete typedef
2015-02-10 20:24:23 +01:00
Max Kellermann
712ed555e6
Copyright year 2015
2015-01-01 19:48:13 +01:00
Max Kellermann
adfc5db3d2
Merge branch 'v0.19.x'
2014-12-15 00:46:56 +01:00
Max Kellermann
3c29aa6271
event/Loop: read the "again" flag while holding mutex
2014-12-14 14:47:36 +01:00
Max Kellermann
88b75b57d0
playlist, InotifySource, ...: update GLib comments
2014-12-04 23:33:08 +01:00
Max Kellermann
a8ebfd7a92
event/DeferredMonitor: include cleanup
2014-11-25 10:44:06 +01:00
Max Kellermann
dc03f003ac
release v0.18.18
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABAgAGBQJUa62OAAoJECNuiljG20US1CkP/3YaAg76hJDaeFAyi7/10lOs
yI8tPmpQk8S+nuclsBJeIr+9xNRsjb1ebW4tI9uBRxqMT10SF7rMCH/qAmgnS9tQ
6M48hF0o9xegjz4x5BosEJjXtiekYN068Xi/hk+H27guVy14f6Xx7oRpdr5oI/O0
F83D1V2+vs6FuOyn42UQQNHVlYMac5SScHoSFomnwRYWI2wb2ay4H5Dlykb5BUl0
tTjJ2lYwN18vUoMxjmCNS+bLd7jag6FZ/PXntB1zXe22R17eAIuFZAMKaQvnQtUi
QZjFPhpd+mBsZLfokB3belyNNb4F6qSG2W6lZrFRB+SU/LqnY2AL/dxPJD9eiufs
5jEIOw9hNBBKo217+hkPwp5pAF50u11tKXUXbKGeR42zAO0zll/+g2afVwoqdAfD
llPDyQyXiB3tmA1bgJD7u9gaud3UaaXoxajPb5LnmklzGxiN5u1rnoo+E5ppBvQ4
31wPHGpzsjxEC7Xn9hErPP17jYXY1HT/xRb8XZNrFqJVZxSyjqQlDWomhCWDcvPc
Du1PyKaQ08zgElEM5trwC9RjJxQdr0sckQcTnYC/0ksfJ7Nhh8M2yepEI/gmWbnO
JBQ7YzpQhE9oMMH8jzVLLdC44yF6QvXcGQ3D9eUfwvPk9Z70mHlNI3Q6kbZ76U5j
RHLp+oSaxFUXfPdciZaw
=GO+k
-----END PGP SIGNATURE-----
Merge tag 'v0.18.18' into v0.19.x
2014-11-18 21:38:44 +01:00
Max Kellermann
3f5f96ac91
event/ServerSocket: fix get_remote_uid() error value
...
Must return -1 on error, not 0. 0 is root.
2014-11-18 20:53:59 +01:00
Max Kellermann
a9c3ca8606
event/IdleMonitor: remove redundant comment
2014-10-10 22:39:11 +02:00
Max Kellermann
c84508ae9f
Merge branch 'v0.18.x'
2014-08-24 13:20:35 +02:00
Max Kellermann
f06fe1ea98
event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout()
...
The previous commit was broken. D'oh!
2014-08-24 13:19:50 +02:00
Max Kellermann
77f2cd6513
Merge branch 'v0.18.x'
2014-08-24 13:15:17 +02:00
Max Kellermann
d16fb79708
event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()
...
The IsActive() method returned true even if the timer was not active,
after it completed once. This broke the state file timer, and the
state file was not saved periodically.
2014-08-24 13:13:12 +02:00
Max Kellermann
8921b4f9d1
event/BufferedSocket: fix inversed buffer check
...
This was broken by commit 84d20d9e
, which deleted the "!" from the
check.
2014-08-07 16:07:48 +02:00
Max Kellermann
c3f111a56c
event/BufferedSocket: fix inversed buffer check
...
This was broken by commit 84d20d9e
, which deleted the "!" from the
check.
2014-08-07 16:03:44 +02:00
Max Kellermann
ea26da0be7
util/FifoBuffer: rename to StaticFifoBuffer
2014-08-06 17:29:05 +02:00
Max Kellermann
0efb67b51e
DeferredMonitor: fix race condition when using GLib event loop
...
Turns out the lock-free code using atomics was not thread-safe. The
given callback could be invoked by GLib before the source_id attribute
was assigned. This commit changes the DeferredMonitor class to use a
Mutex to block the event loop until source_id is assigned. This bug
does not exist in the 0.19 branch because it does not use the GLib
main loop anymore.
2014-04-26 22:11:23 +02:00
Max Kellermann
7d353bbe2a
configure.ac: always define _GNU_SOURCE on Linux
...
Make sure glibc gives us all features.
2014-03-15 18:27:09 +01:00
Max Kellermann
0102a8665a
event/SignalMonitor: fix build failure due to missing signal.h include
2014-03-02 10:21:31 +01:00
Max Kellermann
c32477a223
Merge branch 'v0.18.x'
2014-02-18 21:46:41 +01:00
Max Kellermann
5e1e92626c
event/SignalMonitor: unblock signals after fork
...
Fixes hanging child process in the "pipe" output plugin.
2014-02-18 19:13:50 +01:00
Max Kellermann
4a28333039
event/Loop: remove the dummy constructor argument
2014-02-05 00:00:03 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
eb23ef1747
event/Loop: allow AddTimer() after Run() has returned
...
Kludge for libavahi-client quirk.
2014-01-09 20:56:00 +01:00
Max Kellermann
61b938d6fa
event/Loop: allow scheduling events before Run()
...
Add the debug-only flag "virgin" which gets checked by assert()
calls. Fixes assertion failures when using zeroconf/avahi.
2014-01-09 17:52:55 +01:00
Max Kellermann
27ca0db7a6
util/Alloc: new library replacing GLib's g_malloc()
2014-01-07 23:35:18 +01:00
Max Kellermann
582c2105a9
event/Loop: cancel the WakeFD monitor in destructor
2014-01-06 21:57:40 +01:00
Max Kellermann
08f5b9f1f9
event/MultiSocketMonitor: add method ClearSocketList()
2014-01-06 18:27:26 +01:00
Max Kellermann
793962c5b8
event/SocketMonitor: don't close the socket automatically
...
Users now have to call Close() explicitly. This simplifies using the
class, as most users have automatic socket management already, and
Steal() had to be used often.
2014-01-06 18:26:55 +01:00
Max Kellermann
617090cfda
event/IdleMonitor: cancel in destructor only if active
...
Debug-mode workaround for bogus assertion failure.
2014-01-06 18:21:45 +01:00
Max Kellermann
a9e604d51d
event/MultiSocketMonitor: API documentation
2014-01-06 08:59:27 +01:00
Max Kellermann
e599b86424
event/Loop: try to avoid the WakeFD when adding DeferredMonitor
...
Add a flag that indicates whether the EventLoop is currently "busy".
As long as that flag is set, it does not need to be woken up - we can
simply add the DeferredMonitor to the list, and it will be caught by
EventLoop very soon. This eliminates nearly all of the
DeferredMonitor overhead when compared to IdleMonitor, rendering
IdleMonitor mostly obsolete.
2014-01-05 02:15:34 +01:00
Max Kellermann
da9e584921
event/Loop: combine multiple WakeFD::Write() calls
...
Reduce DeferredMonitor overhead.
2014-01-05 02:15:10 +01:00
Max Kellermann
e9d764d7ad
event/Loop: add attribute "again"
...
Improved support for added events.
2014-01-05 02:15:01 +01:00
Max Kellermann
6268955778
event/Loop: add thread-safety assertions
2014-01-05 02:14:31 +01:00
Max Kellermann
c12da599b9
event/Loop: remove obsolete assertion
2014-01-05 01:41:03 +01:00
Max Kellermann
f685a48008
event/Loop: move code to HandleDeferred()
2014-01-05 01:35:12 +01:00
Max Kellermann
7c15e41da5
event/MultiSocketMonitor: add missing <algorithm> include
...
For std::find_if().
2014-01-05 01:35:12 +01:00
Max Kellermann
7b540f0226
event/MultiSocketMonitor: add method ReplaceSocketList()
...
Move code from AlsaMixerPlugin.
2014-01-05 01:28:36 +01:00
Max Kellermann
e29c22e662
event/MultiSocketMonitor: include cleanup
2014-01-05 00:39:29 +01:00
Max Kellermann
f0d3b47ad8
event/Loop: remove the GLib implementation
...
Now that the remaining known bugs in poll() implementation are fixed,
we can go on without the GLib implementation.
2014-01-04 19:31:23 +01:00
Max Kellermann
880bf17dae
event/poll: eliminate one vector::size() call
2014-01-04 19:10:21 +01:00
Max Kellermann
19424e95db
event/Loop: remove bogus "!quit" assertion
...
Commit 1f11959
allowed modifying the "quit" attribute from any thread,
and thus the assertion may fail spuriously. This assertion is too
strict for the relaxed use of "quit". Let's remove it and move the
"quit" check to before the SockedMonitor::Dispatch() call.
2014-01-04 17:06:05 +01:00
Max Kellermann
0f9ef2506f
event/Loop: remove unused method AddCall()
2014-01-04 16:00:45 +01:00
Max Kellermann
1f1195975f
event/Loop: non-recursive Break() implementation
...
Simply set the "quit" flag and wake up the thread. This works even if
we're inside this thread. Setting "quit" to a new value without mutex
protection is usually not safe, but good enough here.
2014-01-04 15:59:00 +01:00
Max Kellermann
d2a4f64fd6
event/BlockingCall: always use DeferredMonitor internally
...
There is no advantage of using EventLoop::AddCall(), now that
DeferredMonitor is thread-safe.
2014-01-04 15:58:59 +01:00