Commit af389ad6 authored by Niels De Graef's avatar Niels De Graef Committed by Daiki Ueno

Prefer g_info() over g_message()

Libraries shouldn't really use `g_message()` as it will show up in
consumer application outputs. Let's use `g_info()` instead.

Fixes #40
parent ba462746
Pipeline #160018 passed with stages
in 7 minutes and 37 seconds
...@@ -806,8 +806,7 @@ _secret_file_backend_check_portal_version (void) ...@@ -806,8 +806,7 @@ _secret_file_backend_check_portal_version (void)
0, -1, NULL, &error); 0, -1, NULL, &error);
g_object_unref (connection); g_object_unref (connection);
if (!ret) { if (!ret) {
g_message ("secret portal is not available: %s", g_info ("secret portal is not available: %s", error->message);
error->message);
g_error_free (error); g_error_free (error);
return FALSE; return FALSE;
} }
...@@ -817,8 +816,7 @@ _secret_file_backend_check_portal_version (void) ...@@ -817,8 +816,7 @@ _secret_file_backend_check_portal_version (void)
version = g_variant_get_uint32 (value); version = g_variant_get_uint32 (value);
g_variant_unref (value); g_variant_unref (value);
if (version != PORTAL_SECRET_VERSION) { if (version != PORTAL_SECRET_VERSION) {
g_message ("secret portal version mismatch: %u != %u", g_info ("secret portal version mismatch: %u != %u", version, PORTAL_SECRET_VERSION);
version, PORTAL_SECRET_VERSION);
return FALSE; return FALSE;
} }
......
...@@ -393,12 +393,12 @@ service_decode_aes_secret (SecretSession *session, ...@@ -393,12 +393,12 @@ service_decode_aes_secret (SecretSession *session,
gsize pos; gsize pos;
if (n_param != 16) { if (n_param != 16) {
g_message ("received an encrypted secret structure with invalid parameter"); g_info ("received an encrypted secret structure with invalid parameter");
return NULL; return NULL;
} }
if (n_value == 0 || n_value % 16 != 0) { if (n_value == 0 || n_value % 16 != 0) {
g_message ("received an encrypted secret structure with bad secret length"); g_info ("received an encrypted secret structure with bad secret length");
return NULL; return NULL;
} }
...@@ -439,7 +439,7 @@ service_decode_aes_secret (SecretSession *session, ...@@ -439,7 +439,7 @@ service_decode_aes_secret (SecretSession *session,
if (!pkcs7_unpad_bytes_in_place (padded, &n_padded)) { if (!pkcs7_unpad_bytes_in_place (padded, &n_padded)) {
egg_secure_clear (padded, n_padded); egg_secure_clear (padded, n_padded);
egg_secure_free (padded); egg_secure_free (padded);
g_message ("received an invalid or unencryptable secret"); g_info ("received an invalid or unencryptable secret");
return FALSE; return FALSE;
} }
...@@ -457,7 +457,7 @@ service_decode_plain_secret (SecretSession *session, ...@@ -457,7 +457,7 @@ service_decode_plain_secret (SecretSession *session,
const gchar *content_type) const gchar *content_type)
{ {
if (n_param != 0) { if (n_param != 0) {
g_message ("received a plain secret structure with invalid parameter"); g_info ("received a plain secret structure with invalid parameter");
return NULL; return NULL;
} }
...@@ -485,7 +485,7 @@ _secret_session_decode_secret (SecretSession *session, ...@@ -485,7 +485,7 @@ _secret_session_decode_secret (SecretSession *session,
g_variant_get_child (encoded, 0, "o", &session_path); g_variant_get_child (encoded, 0, "o", &session_path);
if (session_path == NULL || !g_str_equal (session_path, session->path)) { if (session_path == NULL || !g_str_equal (session_path, session->path)) {
g_message ("received a secret encoded with wrong session: %s != %s", g_info ("received a secret encoded with wrong session: %s != %s",
session_path, session->path); session_path, session->path);
g_free (session_path); g_free (session_path);
return NULL; return NULL;
......
...@@ -125,8 +125,7 @@ _secret_util_strip_remote_error (GError **error) ...@@ -125,8 +125,7 @@ _secret_util_strip_remote_error (GError **error)
remote = g_dbus_error_get_remote_error (*error); remote = g_dbus_error_get_remote_error (*error);
if (remote) { if (remote) {
if (g_dbus_error_strip_remote_error (*error)) { if (g_dbus_error_strip_remote_error (*error)) {
g_message ("Remote error from secret service: %s: %s", g_info ("Remote error from secret service: %s: %s", remote, (*error)->message);
remote, (*error)->message);
} }
g_free (remote); g_free (remote);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment