pulse: improve pa_operation compatibility

Methods that return a pa_operation should not return NULL.

pa_context_success_cb_t should return 1 on success and 0 on failure
with the error set in the context.

When a global is not found, let the info operation return eol = -1
with the error set in the context.
This commit is contained in:
Wim Taymans 2020-02-03 16:44:50 +01:00
parent f79dfcd77f
commit 272fd4bd9f
3 changed files with 254 additions and 161 deletions

View file

@ -124,6 +124,7 @@ static inline const char *pa_strnull(const char *x) {
}
int pa_context_set_error(PA_CONST pa_context *c, int error);
void pa_context_fail(PA_CONST pa_context *c, int error);
#define PA_CHECK_VALIDITY(context, expression, error) \
do { \