Commit graph

26 commits

Author SHA1 Message Date
Kenny Levinsen
52fe75d5a4 libseat: Remove pointless check 2020-08-29 22:55:17 +02:00
Kenny Levinsen
98506d2ba4 libseat: Keep track of error state
Store if an error has occurred and return -1 with ENOTCONN from all
future calls, avoiding attempts to use a broken connection.
2020-08-29 22:45:01 +02:00
Kenny Levinsen
8b4d139873 libseat: Improve logging with seatd conn helpers
Add helpers around connection access to have all logging centralized and
reduce code duplication. Improve existing helpers to further reduce code
duplication.

The seatd backend should have much better logging after this.
2020-08-29 20:56:42 +02:00
Kenny Levinsen
69d57aaf33 libseat: Assert that listener is non-NULL 2020-08-29 20:29:35 +02:00
Kenny Levinsen
6e6903829e logind: Merge PropertiesChanged handlers 2020-08-28 22:55:25 +02:00
Kenny Levinsen
74eee486fa libseat: Expand logging in all backends 2020-08-28 22:55:10 +02:00
Kenny Levinsen
1e6d4f451f libseat: Only print backend attempts for matches 2020-08-28 22:40:10 +02:00
Simon Ser
07ceeeebe0 Introduce libseat_set_log_level
The default level is SILENT. log_init no longer takes an initial log
level (so that calls to libseat_set_log_level prior to log_init work
correctly).
2020-08-28 01:21:57 +02:00
Simon Ser
48b9bf4707 Nuke LIBSEAT_LOGLEVEL
This will be replaced with a libseat API to set the log level.
2020-08-28 01:21:57 +02:00
Simon Ser
a254fe3692 Rename enum log_level to libseat_log_level
This is preparatory work for exposing a public function to set libseat's
log handler.
2020-08-28 01:21:57 +02:00
Kenny Levinsen
ab4b961492 libseat: Remove useless logind fallbacks
The logind code is based on the wlroots implementation, which in turn
contained copy-paste code from Mutter that serves no purpose here.
2020-08-24 02:55:14 +02:00
Kenny Levinsen
26aff21058 logind: Set session type from env 2020-08-23 20:13:05 +02:00
Kenny Levinsen
8ab3fc03aa logind: Remove session type check 2020-08-23 20:12:51 +02:00
Kenny Levinsen
24c66d8c08 logind: Remove useless check 2020-08-23 20:12:29 +02:00
Kenny Levinsen
7d2668e360 logind: Allow SwitchTo for all seats 2020-08-06 02:25:24 +02:00
Kenny Levinsen
0fd525e85e logind: close_device always returned error
Error handling was broken in close_device, always returning -1.

Use the return value, and add a few errno assignments while we're at it.
2020-08-06 02:25:24 +02:00
Kenny Levinsen
3586530d81 libseat: Rename libseat_impl to seat_impl 2020-08-05 23:41:55 +02:00
Kenny Levinsen
493cc2a97d log: Remove libseat prefixes 2020-08-05 23:41:55 +02:00
Kenny Levinsen
563a932659 Remove pointless compiler.h 2020-08-05 23:20:50 +02:00
Kenny Levinsen
250adee852 libseat: Use LIBSEAT_LOGLEVEL instead of SEATD_LOGLEVEL 2020-08-03 02:49:07 +02:00
Kenny Levinsen
e25688fed6 libseat: Convert clients to linked_list 2020-08-03 02:49:04 +02:00
Kenny Levinsen
c35b2d2d88 server: Stack-allocate the server 2020-08-03 02:13:47 +02:00
Kenny Levinsen
3e301b8e70 libseat: Use symbol file instead of -fvisibility 2020-08-03 00:54:55 +02:00
Kenny Levinsen
6f6f5de154 seatd: Perform clean server shutdown 2020-08-01 17:02:28 +02:00
Kenny Levinsen
56947d530e FreeBSD compiler warning fix 2020-08-01 16:53:44 +02:00
Kenny Levinsen
61716a2c77 Initial implementation of seatd and libseat 2020-07-31 00:22:18 +02:00