mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2026-02-01 19:59:04 +00:00
knet: Fix knet log buffer size
knet sends log messages as struct knet_log_msg, not a string of KNET_MAX_LOG_MSG_SIZE (which is only part of that structure). So we were both losing and corrupting messages. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
23e17953fe
commit
5dda71ae29
@ -542,7 +542,7 @@ static int log_deliver_fn (
|
||||
void *data)
|
||||
{
|
||||
struct totemknet_instance *instance = (struct totemknet_instance *)data;
|
||||
char buffer[KNET_MAX_LOG_MSG_SIZE*4];
|
||||
char buffer[sizeof(struct knet_log_msg)*4];
|
||||
char *bufptr = buffer;
|
||||
int done = 0;
|
||||
int len;
|
||||
@ -572,8 +572,8 @@ static int log_deliver_fn (
|
||||
msg->msg);
|
||||
break;
|
||||
}
|
||||
bufptr += KNET_MAX_LOG_MSG_SIZE;
|
||||
done += KNET_MAX_LOG_MSG_SIZE;
|
||||
bufptr += sizeof(struct knet_log_msg);
|
||||
done += sizeof(struct knet_log_msg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user