[pulseaudio-discuss] [PATCH 4/9] authkey: Rename pa_authkey_load_auto() to pa_authkey_load()

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Jun 8 06:32:56 PDT 2014


pa_authkey_load() was removed earlier, so the _auto suffix isn't
necessary any more.
---
 src/modules/module-esound-sink.c |  2 +-
 src/pulse/client-conf.c          | 12 ++++++------
 src/pulsecore/auth-cookie.c      |  2 +-
 src/pulsecore/authkey.c          |  2 +-
 src/pulsecore/authkey.h          |  2 +-
 src/utils/pax11publish.c         |  2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 8b74ea4..f887962 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -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;
     }
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 8252419..fd1ccbf 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -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;
 
diff --git a/src/pulsecore/auth-cookie.c b/src/pulsecore/auth-cookie.c
index a3d9ca4..09e73ab 100644
--- a/src/pulsecore/auth-cookie.c
+++ b/src/pulsecore/auth-cookie.c
@@ -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;
     }
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 289e6c6..406ce2a 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -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;
 
diff --git a/src/pulsecore/authkey.h b/src/pulsecore/authkey.h
index ccda1fd..cadf89d 100644
--- a/src/pulsecore/authkey.h
+++ b/src/pulsecore/authkey.h
@@ -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);
 
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index 8c9ce7d..86336d0 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -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;
             }
-- 
1.9.3



More information about the pulseaudio-discuss mailing list