summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-11-16 21:38:24 +0000
committerJeremy Allison <jra@samba.org>2000-11-16 21:38:24 +0000
commitcdac09614ef426092ed1b1de480fe90c3c4cdd83 (patch)
treee8f51d419cdc238fe9d7c181c1ffe1ee60881265 /source3/include
parentfb71f4a0affd90102cc7866dfd081c01bf056410 (diff)
downloadsamba-cdac09614ef426092ed1b1de480fe90c3c4cdd83.tar.gz
samba-cdac09614ef426092ed1b1de480fe90c3c4cdd83.tar.bz2
samba-cdac09614ef426092ed1b1de480fe90c3c4cdd83.zip
Fix for a problem with the new messaging system. If a sender is using the
messaging system as a notification mechanism, and the speed of notification greatly exceeds the speed of message recovery, then you get a massively (>75Mb) growing tdb. If the message is a simple notification, then the message is static, and you only need one of them in transit to a target process at any one time. This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives. If set to False, then before sending a message the sender checks the existing message queue for a target pid for a duplicate of this message, and doesn't add to it if one already exists. Also added code into msgtest.c to test this. Jeremy. (This used to be commit 3aa7995660395ecb85c8e35b638fa9fbbb952558)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 16545b156d..d8d7180cc1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -153,12 +153,12 @@ void mdfour(unsigned char *out, unsigned char *in, int n);
void ping_message(int msg_type, pid_t src, void *buf, size_t len);
void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len);
BOOL message_init(void);
-BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len);
+BOOL message_send_pid(pid_t pid, int msg_type, void *buf, size_t len, BOOL duplicates_allowed);
void message_dispatch(void);
void message_register(int msg_type,
void (*fn)(int msg_type, pid_t pid, void *buf, size_t len));
void message_deregister(int msg_type);
-BOOL message_send_all(int msg_type, void *buf, size_t len);
+BOOL message_send_all(int msg_type, void *buf, size_t len, BOOL duplicates_allowed);
/*The following definitions come from lib/ms_fnmatch.c */