summaryrefslogtreecommitdiff
path: root/source4/lib/messaging/messaging.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r3360: improved the deletion of tmp files. smbd now puts all tmp files in ↵Andrew Tridgell1-2/+2
var/locks/smbd.tmp/ and deletes that dir on startup. (This used to be commit 7e942e7f1bd2c293a0e6648df43a96f8b8a2a295)
2007-10-10r3314: added a option "socket:testnonblock" to the generic socket code. IfAndrew Tridgell1-1/+1
you set this option (either on the command line using --option or in smb.conf) then every socket recv or send will return short by random amounts. This allows you to test that the non-blocking socket logic in your code works correctly. I also removed the flags argument to socket_accept(), and instead made the new socket inherit the flags of the old socket, which makes more sense to me. (This used to be commit 406d356e698da01c84e8aa5b7894752b4403f63c)
2007-10-10r3304: changed the API to lib/socket/ a little.Andrew Tridgell1-19/+17
The main change is to make socket_recv() take a pre-allocated buffer, rather than allocating one itself. This allows non-blocking users of this API to avoid a memcpy(). As a result our messaging code is now about 10% faster, and the ncacn_ip_tcp and ncalrpc code is also faster. The second change was to remove the unused mem_ctx argument from socket_send(). Having it there implied that memory could be allocated, which meant the caller had to worry about freeing that memory (if for example it is sending in a tight loop using the same memory context). Removing that unused argument keeps life simpler for users. (This used to be commit a16e4756cd68ca8aab4ffc59d4d9db0b6e44dbd1)
2007-10-10r3271: use "struct messaging_context *" instead of "void *" in messaging APIAndrew Tridgell1-22/+19
(This used to be commit cc93813e4a09c538ad485dc2b3cb4c9be34f3d18)
2007-10-10r3183: moved the unlink of the messaging unixdom socket to the messaging ↵Andrew Tridgell1-0/+1
destructor (This used to be commit ab222b236a091d31b1f5f2cba150a11585ab5836)
2007-10-10r3034: - fixed a bug in message dispatch, when the dispatch function called ↵Andrew Tridgell1-2/+3
messaging_deregister() - added a pvfs_lock_close_pending() hook to remove pending locks on file close - fixed the private ptr argument to messaging_deregister() in pvfs_wait - fixed a bug in continuing lock requests after a lock that is blocking a pending lock is removed - removed bogus brl_unlock() call in lock continue - corrected error code for LOCKING_ANDX_CHANGE_LOCKTYPE - expanded the lock cancel test suite to test lock cancel by unlock and by close - added a testsuite for LOCKING_ANDX_CHANGE_LOCKTYPE (This used to be commit 5ef80f034d4aa4dd6810532c63ad041bfc019cb8)
2007-10-10r3029: implemented byte range lock timeouts.Andrew Tridgell1-2/+3
This adds a pvfs_wait_message() routine which uses the new messaging system, event timers and talloc destructors to give a nice generic async event handling system with a easy to use interface. The extensions to pvfs_lock.c are based on calls to pvfs_wait_message() routines. We now pass all of our smbtorture locking tests, although while writing this code I have thought of some additonal tests that should be added, particularly for lock cancel operations. I'll work on that soon. This commit also extends the smbtorture lock tests to test the rather weird 0xEEFFFFFF locking semantics that I have discovered in win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will give different error codes on either side of it. Locks on both sides are allowed, the only difference is which error code is given when a lock is denied. Anyone like to hazard a guess as to why? It has me stumped. (This used to be commit 4395c0557ab175d6a8dd99df03c266325949ffa5)
2007-10-10r3026: - added automatic retry to messages when the servers listen queue isAndrew Tridgell1-2/+47
full. This means callers can just "send and forget" rather than having to check for a temporary failure. The mechanism takes nice advantage of the timed events handling is our events code. A message will only fail now if we completely run out of some resource (such as memory). - changed the test code not to do retries itself, but only to warn on real failures (This used to be commit 8cddc610a25e64c1ad39dd6a2fc2e7f467e04fc9)
2007-10-10r3023: added immediate send of messages when they are first queued. This ↵Andrew Tridgell1-0/+2
makes things a bit more efficient (This used to be commit 8380225d326e4bfb3f15fddc72c097870713132a)
2007-10-10r3018: handle STATUS_MORE_ENTRIES from socket_recv() in the messaging codeAndrew Tridgell1-0/+2
(This used to be commit 13739b68d8357d5d330f12b851d0311feb81e545)
2007-10-10r3016: - converted the events code to tallocAndrew Tridgell1-0/+445
- added the new messaging system, based on unix domain sockets. It gets over 10k messages/second on my laptop without any socket cacheing, which is better than I expected. - added a LOCAL-MESSAGING torture test (This used to be commit 3af06478da7ab34a272226d8d9ac87e0a4940cfb)