summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/server.c b/src/server/server.c
index ae13b129..5cf5788d 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -62,14 +62,15 @@ int add_connection(service_t *service, command_context_t *cmd_ctx)
address_size = sizeof(c->sin);
c->fd = accept(service->fd, (struct sockaddr *)&service->sin, &address_size);
+
+ INFO("accepting '%s' connection from %i", service->name, c->sin.sin_port);
if ((retval = service->new_connection(c)) == ERROR_OK)
{
- INFO("accepted '%s' connection from %i", service->name, c->sin.sin_port);
}
else
{
close_socket(c->fd);
- INFO("attempted '%s' connection rejected", service->name);
+ ERROR("attempted '%s' connection rejected", service->name);
free(c);
return retval;
}