mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
main-worker-cmd: more precise messages
This commit is contained in:
@@ -246,13 +246,13 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
ret = recv_msg_headers(proc->fd, &cmd, MAX_WAIT_SECS);
|
||||
if (ret < 0) {
|
||||
mslog(s, proc, LOG_DEBUG,
|
||||
"cannot obtain metadata from command socket");
|
||||
"cannot obtain metadata from worker's command socket");
|
||||
return ret;
|
||||
}
|
||||
|
||||
length = ret;
|
||||
|
||||
mslog(s, proc, LOG_DEBUG, "main received message '%s' of %u bytes\n",
|
||||
mslog(s, proc, LOG_DEBUG, "main received worker's message '%s' of %u bytes\n",
|
||||
cmd_request_to_str(cmd), (unsigned)length);
|
||||
|
||||
raw = talloc_size(proc, length);
|
||||
@@ -264,8 +264,8 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
raw_len = force_read_timeout(proc->fd, raw, length, MAX_WAIT_SECS);
|
||||
if (raw_len != length) {
|
||||
e = errno;
|
||||
mslog(s, proc, LOG_ERR,
|
||||
"cannot obtain data from command socket: %s",
|
||||
mslog(s, proc, LOG_DEBUG,
|
||||
"cannot obtain data from worker's command socket: %s",
|
||||
strerror(e));
|
||||
ret = ERR_BAD_COMMAND;
|
||||
goto cleanup;
|
||||
@@ -278,7 +278,7 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
|
||||
tmsg = ban_ip_msg__unpack(&pa, raw_len, raw);
|
||||
if (tmsg == NULL) {
|
||||
mslog(s, NULL, LOG_ERR, "error unpacking sec-mod data");
|
||||
mslog(s, NULL, LOG_ERR, "error unpacking worker data");
|
||||
ret = ERR_BAD_COMMAND;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -339,7 +339,7 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
|
||||
tmsg = session_info_msg__unpack(&pa, raw_len, raw);
|
||||
if (tmsg == NULL) {
|
||||
mslog(s, proc, LOG_ERR, "error unpacking data");
|
||||
mslog(s, proc, LOG_ERR, "error unpacking session info data");
|
||||
ret = ERR_BAD_COMMAND;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -397,7 +397,7 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
auth_cookie_req =
|
||||
auth_cookie_request_msg__unpack(&pa, raw_len, raw);
|
||||
if (auth_cookie_req == NULL) {
|
||||
mslog(s, proc, LOG_ERR, "error unpacking data");
|
||||
mslog(s, proc, LOG_ERR, "error unpacking cookie data");
|
||||
ret = ERR_BAD_COMMAND;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -417,7 +417,7 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
|
||||
break;
|
||||
|
||||
default:
|
||||
mslog(s, proc, LOG_ERR, "unknown CMD 0x%x.", (unsigned)cmd);
|
||||
mslog(s, proc, LOG_ERR, "unknown CMD from worker: 0x%x", (unsigned)cmd);
|
||||
ret = ERR_BAD_COMMAND;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user