diff --git a/src/frontend/sock.c b/src/frontend/sock.c
index e2c52ce31b2cbf3a0dba089187de4efd8ceac5fb..f6656875e4d82a192d1da28b099366ca4913fd4b 100644 (file)
--- a/src/frontend/sock.c
+++ b/src/frontend/sock.c
listener->sock_fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (listener->sock_fd < 0) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to open UNIX socket %s: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to open UNIX socket %s: %s",
listener->address, sdb_strerror(errno, buf, sizeof(buf)));
return -1;
}
status = bind(listener->sock_fd, (struct sockaddr *)&sa, sizeof(sa));
if (status) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to bind to UNIX socket %s: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to bind to UNIX socket %s: %s",
listener->address, sdb_strerror(errno, buf, sizeof(buf)));
return -1;
}
type = get_type(address);
if (type < 0) {
- sdb_log(SDB_LOG_ERR, "sock: Unsupported address type specified "
+ sdb_log(SDB_LOG_ERR, "frontend: Unsupported address type specified "
"in listen address '%s'", address);
return NULL;
}
sock->listeners_num * sizeof(*sock->listeners));
if (! listener) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to allocate memory: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to allocate memory: %s",
sdb_strerror(errno, buf, sizeof(buf)));
return NULL;
}
listener->address = strdup(address);
if (! listener->address) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to allocate memory: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to allocate memory: %s",
sdb_strerror(errno, buf, sizeof(buf)));
listener_destroy(listener);
return NULL;
if (errno == EBADF) /* channel shut down */
break;
- sdb_log(SDB_LOG_ERR, "sock: Failed to read from channel: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to read from channel: %s",
sdb_strerror(errno, buf, sizeof(buf)));
continue;
}
continue;
if (conn.client_addr.ss_family != AF_UNIX) {
- sdb_log(SDB_LOG_ERR, "sock: Accepted connection using unexpected "
- "family type %d", conn.client_addr.ss_family);
+ sdb_log(SDB_LOG_ERR, "frontend: Accepted connection using "
+ "unexpected family type %d", conn.client_addr.ss_family);
continue;
}
/* XXX */
- sdb_log(SDB_LOG_INFO, "Accepted connection on fd=%i\n", conn.fd);
+ sdb_log(SDB_LOG_INFO, "frontend: Accepted connection on fd=%i\n",
+ conn.fd);
close(conn.fd);
}
return NULL;
if (listen(listener->sock_fd, /* backlog = */ 32)) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to listen on socket %s: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to listen on socket %s: %s",
listener->address, sdb_strerror(errno, buf, sizeof(buf)));
return -1;
}
if (errno == EINTR)
continue;
- sdb_log(SDB_LOG_ERR, "sock: Failed to monitor sockets: %s",
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to monitor sockets: %s",
sdb_strerror(errno, buf, sizeof(buf)));
return -1;
}
if (conn.fd < 0) {
char buf[1024];
- sdb_log(SDB_LOG_ERR, "sock: Failed to accept remote "
+ sdb_log(SDB_LOG_ERR, "frontend: Failed to accept remote "
"connection: %s", sdb_strerror(errno,
buf, sizeof(buf)));
continue;
}
}
- sdb_log(SDB_LOG_INFO, "sock: Waiting for connection handler threads "
+ sdb_log(SDB_LOG_INFO, "frontend: Waiting for connection handler threads "
"to terminate");
if (! sdb_channel_shutdown(chan))
for (i = 0; i < SDB_STATIC_ARRAY_LEN(handler_threads); ++i)