mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
authkey: Rename pa_authkey_load_auto() to pa_authkey_load()
pa_authkey_load() was removed earlier, so the _auto suffix isn't necessary any more.
This commit is contained in:
parent
a54d357729
commit
71ead4989a
6 changed files with 11 additions and 11 deletions
|
|
@ -622,7 +622,7 @@ int pa__init(pa_module*m) {
|
|||
|
||||
/* Prepare the initial request */
|
||||
u->write_data = pa_xmalloc(u->write_length = ESD_KEY_LEN + sizeof(int32_t));
|
||||
if (pa_authkey_load_auto(pa_modargs_get_value(ma, "cookie", ".esd_auth"), true, u->write_data, ESD_KEY_LEN) < 0) {
|
||||
if (pa_authkey_load(pa_modargs_get_value(ma, "cookie", ".esd_auth"), true, u->write_data, ESD_KEY_LEN) < 0) {
|
||||
pa_log("Failed to load cookie");
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie
|
|||
pa_assert(cookie_length > 0);
|
||||
|
||||
if (c->cookie_file_from_env) {
|
||||
r = pa_authkey_load_auto(c->cookie_file_from_env, true, cookie, cookie_length);
|
||||
r = pa_authkey_load(c->cookie_file_from_env, true, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie
|
|||
}
|
||||
|
||||
if (c->cookie_file_from_application) {
|
||||
r = pa_authkey_load_auto(c->cookie_file_from_application, true, cookie, cookie_length);
|
||||
r = pa_authkey_load(c->cookie_file_from_application, true, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie
|
|||
}
|
||||
|
||||
if (c->cookie_file_from_client_conf) {
|
||||
r = pa_authkey_load_auto(c->cookie_file_from_client_conf, true, cookie, cookie_length);
|
||||
r = pa_authkey_load(c->cookie_file_from_client_conf, true, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
|
|
@ -209,15 +209,15 @@ int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie
|
|||
pa_cstrerror(errno));
|
||||
}
|
||||
|
||||
r = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE, false, cookie, cookie_length);
|
||||
r = pa_authkey_load(PA_NATIVE_COOKIE_FILE, false, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
r = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE_FALLBACK, false, cookie, cookie_length);
|
||||
r = pa_authkey_load(PA_NATIVE_COOKIE_FILE_FALLBACK, false, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
r = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE, true, cookie, cookie_length);
|
||||
r = pa_authkey_load(PA_NATIVE_COOKIE_FILE, true, cookie, cookie_length);
|
||||
if (r >= 0)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, bool create, s
|
|||
|
||||
pa_assert_se(pa_shared_set(core, t, c) >= 0);
|
||||
|
||||
if (pa_authkey_load_auto(cn, create, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
|
||||
if (pa_authkey_load(cn, create, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
|
||||
pa_auth_cookie_unref(c);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ static char *normalize_path(const char *fn) {
|
|||
|
||||
/* Load a cookie from a file in the home directory. If the specified
|
||||
* path starts with /, use it as absolute path instead. */
|
||||
int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length) {
|
||||
int pa_authkey_load(const char *fn, bool create, void *data, size_t length) {
|
||||
char *p;
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length);
|
||||
int pa_authkey_load(const char *fn, bool create, void *data, size_t length);
|
||||
|
||||
int pa_authkey_save(const char *path, const void *data, size_t length);
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
pa_client_conf_free(conf);
|
||||
|
||||
if (pa_authkey_load_auto(cookie_file, true, cookie, sizeof(cookie)) < 0) {
|
||||
if (pa_authkey_load(cookie_file, true, cookie, sizeof(cookie)) < 0) {
|
||||
fprintf(stderr, _("Failed to load cookie data\n"));
|
||||
goto finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue