[pulseaudio-commits] 2 commits - src/daemon src/pulse src/pulsecore src/tests

David Henningsson diwic at kemper.freedesktop.org
Tue Sep 2 05:41:22 PDT 2014


 src/daemon/caps.c               |    2 -
 src/daemon/main.c               |   68 ++++++++++++++++++++--------------------
 src/pulse/context.c             |    2 -
 src/pulse/def.h                 |    2 -
 src/pulse/error.c               |    2 -
 src/pulsecore/authkey.c         |    6 +--
 src/pulsecore/esound.h          |    2 -
 src/pulsecore/protocol-esound.c |    2 -
 src/pulsecore/protocol-native.c |    2 -
 src/tests/resampler-test.c      |    4 +-
 10 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 58cffdcfc8674e96e9faeaf726a4b86aebdc427b
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Sep 2 11:50:39 2014 +0200

    Replace "authorization" with "authentication"
    
    Since we don't have "limited" clients, a client that authenticates
    correctly is automatically authorized. However, it's the authentication
    that can go wrong, rather than the authorization.
    
    Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=78566
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/pulse/def.h b/src/pulse/def.h
index dfc0c10..ee7404d 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -464,7 +464,7 @@ typedef enum pa_error_code {
     PA_ERR_CONNECTIONREFUSED,      /**< Connection refused */
     PA_ERR_PROTOCOL,               /**< Protocol error */
     PA_ERR_TIMEOUT,                /**< Timeout */
-    PA_ERR_AUTHKEY,                /**< No authorization key */
+    PA_ERR_AUTHKEY,                /**< No authentication key */
     PA_ERR_INTERNAL,               /**< Internal error */
     PA_ERR_CONNECTIONTERMINATED,   /**< Connection terminated */
     PA_ERR_KILLED,                 /**< Entity killed */
diff --git a/src/pulse/error.c b/src/pulse/error.c
index 751d42a..27b8ec4 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -46,7 +46,7 @@ const char*pa_strerror(int error) {
         [PA_ERR_CONNECTIONREFUSED] = N_("Connection refused"),
         [PA_ERR_PROTOCOL] = N_("Protocol error"),
         [PA_ERR_TIMEOUT] = N_("Timeout"),
-        [PA_ERR_AUTHKEY] = N_("No authorization key"),
+        [PA_ERR_AUTHKEY] = N_("No authentication key"),
         [PA_ERR_INTERNAL] = N_("Internal error"),
         [PA_ERR_CONNECTIONTERMINATED] = N_("Connection terminated"),
         [PA_ERR_KILLED] = N_("Entity killed"),
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 3c5827d..7f91f16 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -42,7 +42,7 @@
 
 #include "authkey.h"
 
-/* Generate a new authorization key, store it in file fd and return it in *data  */
+/* Generate a new authentication key, store it in file fd and return it in *data  */
 static int generate(int fd, void *ret_data, size_t length) {
     ssize_t r;
 
@@ -70,7 +70,7 @@ static int generate(int fd, void *ret_data, size_t length) {
 #define O_BINARY 0
 #endif
 
-/* Load an authorization cookie from file fn and store it in data. If
+/* Load an authentication cookie from file fn and store it in data. If
  * the cookie file doesn't exist, create it */
 static int load(const char *fn, bool create, void *data, size_t length) {
     int fd = -1;
@@ -156,7 +156,7 @@ int pa_authkey_load(const char *fn, bool create, void *data, size_t length) {
         return ret;
 
     if ((ret = load(p, create, data, length)) < 0)
-        pa_log_warn("Failed to load authorization key '%s': %s", p, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
+        pa_log_warn("Failed to load authentication key '%s': %s", p, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
 
     pa_xfree(p);
 
diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h
index 5d6ec95..5fc91db 100644
--- a/src/pulsecore/esound.h
+++ b/src/pulsecore/esound.h
@@ -33,7 +33,7 @@
 /* maximum size we can write().  Otherwise we might overflow */
 #define ESD_MAX_WRITE_SIZE (21 * 4096)
 
-/* length of the authorization key, octets */
+/* length of the authentication key, octets */
 #define ESD_KEY_LEN (16)
 
 /* default port for the EsounD server */
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 755109c..a4e0028 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -351,7 +351,7 @@ static int esd_proto_connect(connection *c, esd_proto_t request, const void *dat
     }
 
     if (!c->authorized) {
-        pa_log("Kicked client with invalid authorization key.");
+        pa_log("Kicked client with invalid authentication key.");
         return -1;
     }
 
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 93db157..6ec65d6 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2724,7 +2724,7 @@ static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
         }
 
         if (!success) {
-            pa_log_warn("Denied access to client with invalid authorization data.");
+            pa_log_warn("Denied access to client with invalid authentication data.");
             pa_pstream_send_error(c->pstream, tag, PA_ERR_ACCESS);
             return;
         }

commit 764da4260a2ab44816d4b1f4c4e709f4684b1b9a
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Sep 2 12:09:44 2014 +0200

    Make all debug/info level messages untranslatable
    
    Debug and info messages are primarily meant for developers,
    rather than end users. Let's save translators' time,
    and leave them untranslated.
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 669d6e2..91c7f95 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -51,7 +51,7 @@ void pa_drop_root(void) {
     uid_t uid;
     gid_t gid;
 
-    pa_log_debug(_("Cleaning up privileges."));
+    pa_log_debug("Cleaning up privileges.");
     uid = getuid();
     gid = getgid();
 
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 150ce6d..23fb660 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -112,7 +112,7 @@ int __padsp_disabled__ = 7;
 #endif
 
 static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
-    pa_log_info(_("Got signal %s."), pa_sig2str(sig));
+    pa_log_info("Got signal %s.", pa_sig2str(sig));
 
     switch (sig) {
 #ifdef SIGUSR1
@@ -139,7 +139,7 @@ static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void
         case SIGINT:
         case SIGTERM:
         default:
-            pa_log_info(_("Exiting."));
+            pa_log_info("Exiting.");
             m->quit(m, 1);
             break;
     }
@@ -166,7 +166,7 @@ static int change_user(void) {
         return -1;
     }
 
-    pa_log_info(_("Found user '%s' (UID %lu) and group '%s' (GID %lu)."),
+    pa_log_info("Found user '%s' (UID %lu) and group '%s' (GID %lu).",
                 PA_SYSTEM_USER, (unsigned long) pw->pw_uid,
                 PA_SYSTEM_GROUP, (unsigned long) gr->gr_gid);
 
@@ -244,7 +244,7 @@ static int change_user(void) {
     if (!getenv("PULSE_STATE_PATH"))
         pa_set_env("PULSE_STATE_PATH", PA_SYSTEM_STATE_PATH);
 
-    pa_log_info(_("Successfully changed user to \"" PA_SYSTEM_USER "\"."));
+    pa_log_info("Successfully changed user to \"" PA_SYSTEM_USER "\".");
 
     return 0;
 }
@@ -270,7 +270,7 @@ static int set_one_rlimit(const pa_rlimit *r, int resource, const char *name) {
     rl.rlim_cur = rl.rlim_max = r->value;
 
     if (setrlimit(resource, &rl) < 0) {
-        pa_log_info(_("setrlimit(%s, (%u, %u)) failed: %s"), name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
+        pa_log_info("setrlimit(%s, (%u, %u)) failed: %s", name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
         return -1;
     }
 
@@ -584,9 +584,9 @@ int main(int argc, char *argv[]) {
             }
 
             if (pa_pid_file_check_running(&pid, "pulseaudio") < 0)
-                pa_log_info(_("Daemon not running"));
+                pa_log_info("Daemon not running");
             else {
-                pa_log_info(_("Daemon running as PID %u"), pid);
+                pa_log_info("Daemon running as PID %u", pid);
                 retval = 0;
             }
 
@@ -769,7 +769,7 @@ int main(int argc, char *argv[]) {
             if (retval)
                 pa_log(_("Daemon startup failed."));
             else
-                pa_log_info(_("Daemon startup successful."));
+                pa_log_info("Daemon startup successful.");
 
             goto finish;
         }
@@ -886,67 +886,67 @@ int main(int argc, char *argv[]) {
 
     pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
 
-    pa_log_info(_("This is PulseAudio %s"), PACKAGE_VERSION);
-    pa_log_debug(_("Compilation host: %s"), CANONICAL_HOST);
-    pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS);
+    pa_log_info("This is PulseAudio %s", PACKAGE_VERSION);
+    pa_log_debug("Compilation host: %s", CANONICAL_HOST);
+    pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
 
     s = pa_uname_string();
-    pa_log_debug(_("Running on host: %s"), s);
+    pa_log_debug("Running on host: %s", s);
     pa_xfree(s);
 
-    pa_log_debug(_("Found %u CPUs."), pa_ncpus());
+    pa_log_debug("Found %u CPUs.", pa_ncpus());
 
-    pa_log_info(_("Page size is %lu bytes"), (unsigned long) PA_PAGE_SIZE);
+    pa_log_info("Page size is %lu bytes", (unsigned long) PA_PAGE_SIZE);
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
-    pa_log_debug(_("Compiled with Valgrind support: yes"));
+    pa_log_debug("Compiled with Valgrind support: yes");
 #else
-    pa_log_debug(_("Compiled with Valgrind support: no"));
+    pa_log_debug("Compiled with Valgrind support: no");
 #endif
 
-    pa_log_debug(_("Running in valgrind mode: %s"), pa_yes_no(pa_in_valgrind()));
+    pa_log_debug("Running in valgrind mode: %s", pa_yes_no(pa_in_valgrind()));
 
-    pa_log_debug(_("Running in VM: %s"), pa_yes_no(pa_running_in_vm()));
+    pa_log_debug("Running in VM: %s", pa_yes_no(pa_running_in_vm()));
 
 #ifdef __OPTIMIZE__
-    pa_log_debug(_("Optimized build: yes"));
+    pa_log_debug("Optimized build: yes");
 #else
-    pa_log_debug(_("Optimized build: no"));
+    pa_log_debug("Optimized build: no");
 #endif
 
 #ifdef NDEBUG
-    pa_log_debug(_("NDEBUG defined, all asserts disabled."));
+    pa_log_debug("NDEBUG defined, all asserts disabled.");
 #elif defined(FASTPATH)
-    pa_log_debug(_("FASTPATH defined, only fast path asserts disabled."));
+    pa_log_debug("FASTPATH defined, only fast path asserts disabled.");
 #else
-    pa_log_debug(_("All asserts enabled."));
+    pa_log_debug("All asserts enabled.");
 #endif
 
     if (!(s = pa_machine_id())) {
         pa_log(_("Failed to get machine ID"));
         goto finish;
     }
-    pa_log_info(_("Machine ID is %s."), s);
+    pa_log_info("Machine ID is %s.", s);
     pa_xfree(s);
 
     if ((s = pa_session_id())) {
-        pa_log_info(_("Session ID is %s."), s);
+        pa_log_info("Session ID is %s.", s);
         pa_xfree(s);
     }
 
     if (!(s = pa_get_runtime_dir()))
         goto finish;
-    pa_log_info(_("Using runtime directory %s."), s);
+    pa_log_info("Using runtime directory %s.", s);
     pa_xfree(s);
 
     if (!(s = pa_get_state_dir()))
         goto finish;
-    pa_log_info(_("Using state directory %s."), s);
+    pa_log_info("Using state directory %s.", s);
     pa_xfree(s);
 
-    pa_log_info(_("Using modules directory %s."), conf->dl_search_path);
+    pa_log_info("Using modules directory %s.", conf->dl_search_path);
 
-    pa_log_info(_("Running in system mode: %s"), pa_yes_no(pa_in_system_mode()));
+    pa_log_info("Running in system mode: %s", pa_yes_no(pa_in_system_mode()));
 
     if (pa_in_system_mode())
         pa_log_warn(_("OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.\n"
@@ -976,9 +976,9 @@ int main(int argc, char *argv[]) {
     pa_disable_sigpipe();
 
     if (pa_rtclock_hrtimer())
-        pa_log_info(_("Fresh high-resolution timers available! Bon appetit!"));
+        pa_log_info("Fresh high-resolution timers available! Bon appetit!");
     else
-        pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
+        pa_log_info("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!");
 
     if (conf->lock_memory) {
 #if defined(HAVE_SYS_MMAN_H) && !defined(__ANDROID__)
@@ -1113,13 +1113,13 @@ int main(int argc, char *argv[]) {
     }
 #endif
 
-    pa_log_info(_("Daemon startup complete."));
+    pa_log_info("Daemon startup complete.");
 
     retval = 0;
     if (pa_mainloop_run(mainloop, &retval) < 0)
         goto finish;
 
-    pa_log_info(_("Daemon shutdown initiated."));
+    pa_log_info("Daemon shutdown initiated.");
 
 finish:
 #ifdef HAVE_DBUS
@@ -1145,7 +1145,7 @@ finish:
         pa_scache_free_all(c);
 
         pa_core_unref(c);
-        pa_log_info(_("Daemon terminated."));
+        pa_log_info("Daemon terminated.");
     }
 
     if (!conf->no_cpu_limit)
diff --git a/src/pulse/context.c b/src/pulse/context.c
index d572406..8897de0 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -574,7 +574,7 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
     c->pdispatch = pa_pdispatch_new(c->mainloop, c->use_rtclock, command_table, PA_COMMAND_MAX);
 
     if (pa_client_conf_load_cookie(c->conf, cookie, sizeof(cookie)) < 0)
-        pa_log_info(_("No cookie loaded. Attempting to connect without."));
+        pa_log_info("No cookie loaded. Attempting to connect without.");
 
     t = pa_tagstruct_command(c, PA_COMMAND_AUTH, &tag);
 
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 566b69f..60345af 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -415,8 +415,8 @@ int main(int argc, char *argv[]) {
         pa_memchunk i, j;
         pa_usec_t ts;
 
-        pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS);
-        pa_log_debug(_("=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"), seconds,
+        pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
+        pa_log_debug("=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)", seconds,
                    a.rate, a.channels, pa_sample_format_to_string(a.format),
                    b.rate, b.channels, pa_sample_format_to_string(b.format));
 



More information about the pulseaudio-commits mailing list