sesman: reflect review suggestions on cleanup_sockets

* Use LOG_LEVEL_WARNING for the deletion failure
* Log the error condition when the deletion failed
This commit is contained in:
Koichiro IWAO 2020-12-20 22:04:20 +09:00
parent 5114d1ee64
commit 31214f15a6
No known key found for this signature in database
GPG Key ID: 03993B4065E7193B

View File

@ -1162,8 +1162,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}
@ -1174,8 +1175,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}
@ -1186,8 +1188,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}
@ -1198,8 +1201,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}
@ -1213,8 +1217,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}
@ -1225,8 +1230,9 @@ cleanup_sockets(int display)
LOG(LOG_LEVEL_DEBUG, "cleanup_sockets: deleting %s", file);
if (g_file_delete(file) == 0)
{
LOG(LOG_LEVEL_DEBUG,
"cleanup_sockets: failed to delete %s", file);
LOG(LOG_LEVEL_WARNING,
"cleanup_sockets: failed to delete %s (%s)",
file, g_get_strerror());
error++;
}
}