Added more debugging messages

This commit is contained in:
Nikos Mavrogiannopoulos
2015-05-13 13:49:12 +02:00
parent 66203e1a6d
commit accf63a9e3
2 changed files with 2 additions and 0 deletions

View File

@@ -427,6 +427,7 @@ int recv_socket_msg(void *pool, int fd, uint8_t cmd,
}
if (rcmd != cmd) {
syslog(LOG_ERR, "%s:%u: expected %d, received %d", __FILE__, __LINE__, (int)rcmd, (int)cmd);
return ERR_BAD_COMMAND;
}

View File

@@ -427,6 +427,7 @@ int serve_request_main(sec_mod_st *sec, uint8_t *buffer, unsigned buffer_size)
memcpy(&l16, &buffer[1], 2);
length = l16;
seclog(sec, LOG_DEBUG, "received request %s", cmd_request_to_str(cmd));
if (cmd <= MIN_SM_MAIN_CMD || cmd >= MAX_SM_MAIN_CMD) {
seclog(sec, LOG_ERR, "received invalid message from main of %u bytes (cmd: %u)\n",
(unsigned)length, (unsigned)cmd);