svn commit: samba r4943 - in branches/SAMBA_4_0/source: include lib lib/messaging libcli/nbt libcli/raw libcli/resolve ntvfs/posix rpc_server/echo smbd

tridge at samba.org tridge at samba.org
Sun Jan 23 11:49:15 GMT 2005


Author: tridge
Date: 2005-01-23 11:49:15 +0000 (Sun, 23 Jan 2005)
New Revision: 4943

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4943

Log:
Smplified the events handling code a lot. The first source of
complexity was that events didn't automatically cleanup
themselves. This was because the events code was written before we had
talloc destructors, so you needed to call event_remove_XX() to clean
the event out of the event lists from every piece of code that used
events. I have now added automatic event destructors, which in turn
allowed me to simplify a lot of the calling code.

The 2nd source of complexity was caused by the ref_count, which was
needed to cope with event handlers destroying events while handling
them, which meant the linked lists became invalid, so the ref_count ws
used to mark events for later destruction.

The new system is much simpler. I now have a ev->destruction_count,
which is incremented in all event destructors. The event dispatch code
checks for changes to this and handles it.

Modified:
   branches/SAMBA_4_0/source/include/events.h
   branches/SAMBA_4_0/source/lib/events.c
   branches/SAMBA_4_0/source/lib/messaging/messaging.c
   branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c
   branches/SAMBA_4_0/source/libcli/raw/clisocket.c
   branches/SAMBA_4_0/source/libcli/raw/clitransport.c
   branches/SAMBA_4_0/source/libcli/resolve/host.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c
   branches/SAMBA_4_0/source/rpc_server/echo/rpc_echo.c
   branches/SAMBA_4_0/source/smbd/service.c


Changeset:
Sorry, the patch is too large (676 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4943


More information about the samba-cvs mailing list