1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

157 Commits

Author SHA1 Message Date
Andrew Tridgell
fd62df6418 r4943: 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.
(This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
5ffedbac3d r4922: fixed an infinite loop in the name resolve code when handling a method
in smb.conf that isn't implemented in the library
(This used to be commit dd5b43ed37b37feec4708f8f13033b42eb6a838c)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
d069c368fb r4919: if a caller doesn't provide an event context to the resolver library,
then create one. This fixes a crash in the RAW-NEGNOWAIT test for
'host' resolution.
(This used to be commit 3268d523cc381b9b3077f794bb53daf0865d139c)
2007-10-10 13:09:06 -05:00
Andrew Tridgell
b9a1e9a667 r4916: added "host" name resolution using fork() per gethostbyname()
comments welcome, but please think about the alternatives first :-)
(This used to be commit 3d40b479907226be349137117e0d2bd718efa1a8)
2007-10-10 13:09:05 -05:00
Andrew Tridgell
6f0aef31cd r4898: - removed the unused wins_srv_*() code
- expanded the generic async name resolver to try multiple methods

- added wins resolutions to the list of methods tried

- fixed up the random trn id generation to use the good random generator
(This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
c0e21a4d3e r4896: make sure the event context doesn't go away while waiting for event completion
(This used to be commit c1063919c069b0b36dd3da6dc6853236629804e3)
2007-10-10 13:09:04 -05:00
Andrew Tridgell
2383787f19 r4891: - added a generic resolve_name() async interface in libcli/resolve/,
which will eventually try all resolution methods setup in smb.conf

 - only resolution backend at the moment is bcast, which does a
   parallel broadcast to all configured network interfaces, and takes
   the first reply that comes in (this nicely demonstrates how to do
   parallel requests using the async APIs)

 - converted all the existing code to use the new resolve_name() api

 - removed all the old nmb code (yay!)
(This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3)
2007-10-10 13:09:03 -05:00