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:
Tanu Kaskinen 2014-06-08 16:32:56 +03:00
parent a54d357729
commit 71ead4989a
6 changed files with 11 additions and 11 deletions

View file

@ -622,7 +622,7 @@ int pa__init(pa_module*m) {
/* Prepare the initial request */ /* Prepare the initial request */
u->write_data = pa_xmalloc(u->write_length = ESD_KEY_LEN + sizeof(int32_t)); 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"); pa_log("Failed to load cookie");
goto fail; goto fail;
} }

View file

@ -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); pa_assert(cookie_length > 0);
if (c->cookie_file_from_env) { 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) if (r >= 0)
return 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) { 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) if (r >= 0)
return 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) { 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) if (r >= 0)
return 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)); 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) if (r >= 0)
return 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) if (r >= 0)
return 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) if (r >= 0)
return 0; return 0;

View file

@ -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); 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); pa_auth_cookie_unref(c);
return NULL; return NULL;
} }

View file

@ -158,7 +158,7 @@ static char *normalize_path(const char *fn) {
/* Load a cookie from a file in the home directory. If the specified /* Load a cookie from a file in the home directory. If the specified
* path starts with /, use it as absolute path instead. */ * 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; char *p;
int ret; int ret;

View file

@ -24,7 +24,7 @@
#include <sys/types.h> #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); int pa_authkey_save(const char *path, const void *data, size_t length);

View file

@ -186,7 +186,7 @@ int main(int argc, char *argv[]) {
pa_client_conf_free(conf); 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")); fprintf(stderr, _("Failed to load cookie data\n"));
goto finish; goto finish;
} }