On NixOS all packages are installed into their own immutable prefix.
Because of this get_pkgconfig_variable will return a
path from within systemd's prefix and we cannot write to it.
By using define_variable we can replace the respective directory
to be from the paths from meson.
Don't use pthread_cancel by default to stop the data thread but
instead use an eventfd. pthread_cancel uses a signal and is not
nice to use in a library as it can cause strange crashes.
See #211
Always iterate all params because we are only supposed to
return -ENOENT for unknown params and if we start iterating at some
random start position we might be past the paran and report -ENOENT
wrongly.
When the global is destroyed, free the resource.
When the resource is freed, destroy the global.
Make sure any bound resources are freed when the global is destroyed
by calling pw_global_add_resource().
The choice array might have excess elements when the type has been
changed, for example by fixation. This is not a problem and the
excess elements should simply be ignored.
Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
Sending the errors to the proxy id allows the client to know something
is wrong with the proxy and deal with it better.
Use the port global id in the error message.
Make a function to send an error to another resource. This can be
used to send errors to proxies that now have a resource associated
with them, like in error cases.
We only need to sync clients when start/stop has been issued otherwise
we simply write the new position values in the driver segment.
Don't overwrite bar/video position info with invalid values.
When the client uploads a buffer, copy all data fields except for
the chunk memory that we configured before.
If we overwrite the chunk memory, the users of the buffer would not
be able to find the chunk memory anymore and crash or fail.
The change_mask string generation was buggy and confusing.
Fix it with something more usable.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
A missing XDG_RUNTIME_DIR results in ENOENT, like on the server
side.
A too long name results in ENAMETOOLONG, like on the server side.
When we can't find the socket, return EHOSTDOWN to make it more
obvious what is going.
Log an error when we send an error to the client so that we don't need
to log and error anymore.
Improve the error messages when we can
Move some warnings and errors to debug