aboutsummaryrefslogtreecommitdiff
path: root/nDPIsrvd.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-08-15 13:05:49 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-08-15 13:05:49 +0200
commit84448d5e4e9207835c62fd19a4109f07ad5ca595 (patch)
tree86aa124e898516f10b96c2916dc9cb539b7e3fd8 /nDPIsrvd.c
parent9ab656dbe264b6c216cc9e890a50d9e20b623fa5 (diff)
error handling enhancements
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'nDPIsrvd.c')
-rw-r--r--nDPIsrvd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index cb38d7b87..63cf8da0e 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -166,7 +166,8 @@ static void disconnect_client(int epollfd, struct remote_desc * const current)
{
if (epoll_ctl(epollfd, EPOLL_CTL_DEL, current->fd, NULL) < 0)
{
- syslog(LOG_DAEMON | LOG_ERR, "Error deleting fd from epollq: %s", strerror(errno));
+ syslog(LOG_DAEMON | LOG_ERR, "Error deleting fd %d from epollq %d: %s",
+ current->fd, epollfd, strerror(errno));
}
if (close(current->fd) != 0)
{
@@ -446,9 +447,7 @@ int main(int argc, char ** argv)
}
if (bytes_read == 0)
{
- syslog(LOG_DAEMON,
- "%s connection closed during read",
- (current->type == JSON_SOCK ? "collector" : "distributor"));
+ syslog(LOG_DAEMON, "collector connection closed during read");
disconnect_client(epollfd, current);
continue;
}