improve logging

This commit is contained in:
Christian Grothoff 2021-01-15 12:18:27 +01:00
parent 3b9c381112
commit 7c8d8b7917
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 7 additions and 6 deletions

View File

@ -126,7 +126,7 @@ try_connect (struct TALER_CRYPTO_DenominationHelper *dh)
dh->my_sa.sun_family = AF_UNIX; dh->my_sa.sun_family = AF_UNIX;
strncpy (dh->my_sa.sun_path, strncpy (dh->my_sa.sun_path,
tmpdir, tmpdir,
sizeof (dh->sa.sun_path)); sizeof (dh->sa.sun_path) - 1);
if (0 != unlink (tmpdir)) if (0 != unlink (tmpdir))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
"unlink", "unlink",
@ -219,7 +219,7 @@ TALER_CRYPTO_helper_denom_connect (
dh->sa.sun_family = AF_UNIX; dh->sa.sun_family = AF_UNIX;
strncpy (dh->sa.sun_path, strncpy (dh->sa.sun_path,
unixpath, unixpath,
sizeof (dh->sa.sun_path)); sizeof (dh->sa.sun_path) - 1);
dh->sock = -1; dh->sock = -1;
{ {
char *tmpdir; char *tmpdir;

View File

@ -127,7 +127,7 @@ try_connect (struct TALER_CRYPTO_ExchangeSignHelper *esh)
esh->my_sa.sun_family = AF_UNIX; esh->my_sa.sun_family = AF_UNIX;
strncpy (esh->my_sa.sun_path, strncpy (esh->my_sa.sun_path,
tmpdir, tmpdir,
sizeof (esh->sa.sun_path)); sizeof (esh->sa.sun_path) - 1);
if (0 != unlink (tmpdir)) if (0 != unlink (tmpdir))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
"unlink", "unlink",
@ -220,7 +220,7 @@ TALER_CRYPTO_helper_esign_connect (
esh->sa.sun_family = AF_UNIX; esh->sa.sun_family = AF_UNIX;
strncpy (esh->sa.sun_path, strncpy (esh->sa.sun_path,
unixpath, unixpath,
sizeof (esh->sa.sun_path)); sizeof (esh->sa.sun_path) - 1);
esh->sock = -1; esh->sock = -1;
{ {
char *tmpdir; char *tmpdir;
@ -484,8 +484,9 @@ TALER_CRYPTO_helper_esign_sign_ (
sizeof (esh->sa)); sizeof (esh->sa));
if (ret < 0) if (ret < 0)
{ {
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
"sendto"); "sendto",
esh->sa.sun_path);
do_disconnect (esh); do_disconnect (esh);
return TALER_EC_EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE; return TALER_EC_EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE;
} }