mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-27 07:09:55 +00:00
coroipcc_dispatch_get(): Fix --enable-small-memory-footprint support
Signed-off-by: Jerome Flesch <jerome.flesch@netasq.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
b112672115
commit
795aa5e24c
@ -847,6 +847,17 @@ coroipcc_dispatch_get (
|
||||
return (error);
|
||||
}
|
||||
|
||||
if (shared_mem_dispatch_bytes_left (ipc_instance) > (ipc_instance->dispatch_size/2)) {
|
||||
/*
|
||||
* Notify coroipcs to flush any pending dispatch messages
|
||||
*/
|
||||
res = ipc_sem_post (ipc_instance->control_buffer, SEMAPHORE_REQUEST_OR_FLUSH_OR_EXIT);
|
||||
if (res != CS_OK) {
|
||||
error = CS_ERR_LIBRARY;
|
||||
goto error_put;
|
||||
}
|
||||
}
|
||||
|
||||
*data = NULL;
|
||||
|
||||
ufds.fd = ipc_instance->fd;
|
||||
@ -881,7 +892,7 @@ coroipcc_dispatch_get (
|
||||
#endif
|
||||
assert (error == CS_OK);
|
||||
|
||||
if (shared_mem_dispatch_bytes_left (ipc_instance) > 500000) {
|
||||
if (shared_mem_dispatch_bytes_left (ipc_instance) > (ipc_instance->dispatch_size/2)) {
|
||||
/*
|
||||
* Notify coroipcs to flush any pending dispatch messages
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user